Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 500704 - app-editors/xemacs-21.5.34-r1 - Load file misc: not found
Summary: app-editors/xemacs-21.5.34-r1 - Load file misc: not found
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: Normal normal (vote)
Assignee: XEmacs team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 378027
  Show dependency tree
 
Reported: 2014-02-08 17:23 UTC by jimmij
Modified: 2014-08-01 21:02 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
xemacs-21.5.34-r1_build.log (build.log,125.30 KB, text/plain)
2014-02-08 18:30 UTC, jimmij
Details

Note You need to log in before you can comment on or make changes to this bug.
Description jimmij 2014-02-08 17:23:03 UTC
Emerge xemacs-21.5.34-r1 fails due to missing file 'misc':

$> emerge xemacs
[...]
./xemacs -nd -no-packages -batch -l /var/tmp/portage/app-editors/xemacs-21.5.34-r1/work/xemacs-21.5.34/src/../lisp/update-elc.el

Loading /var/tmp/portage/app-editors/xemacs-21.5.34-r1/work/xemacs-21.5.34/src/../lisp/update-elc.el...
  Loading find-paths.el...
  Loading packages.el...
  Loading setup-paths.el...
  Loading /var/tmp/portage/app-editors/xemacs-21.5.34-r1/work/xemacs-21.5.34/lisp/dumped-lisp.el...
Wrote /var/tmp/portage/app-editors/xemacs-21.5.34-r1/work/xemacs-21.5.34/src/NEEDTODUMP
  Loading loadup-el.el...
    Loading loadup.el...
Using load-path (/var/tmp/portage/app-editors/xemacs-21.5.34-r1/work/xemacs-21.5.34/lisp/)
Using module-load-path (/var/tmp/portage/app-editors/xemacs-21.5.34-r1/work/xemacs-21.5.34/modules)
      Loading dumped-lisp.el...
      Loading backquote.el...
      Loading bytecomp-runtime.el...
      Loading subr.el...
      Loading cl.el...
      Loading cl-extra.el...
        Requiring obsolete.el...
        Loading cl-macs.el...
      Loading cl-seq.el...
      Loading post-gc.el...
      Loading version.el...
      Loading custom.el...
        Requiring cus-face.el...
          Requiring font.el...
            Requiring disp-table.el...
        Requiring widget.el...
      Loading cus-start.el...
      Loading find-paths.el...
      Loading packages.el...
      Loading setup-paths.el...
      Loading replace.el...
      Loading widget.el...
      Loading cmdloop.el...
      Loading keymap.el...
      Loading syntax.el...
      Loading syntax-ppss.el...
      Loading device.el...
      Loading console.el...
      Loading obsolete.el...
      Loading specifier.el...
      Loading frame.el...
      Loading x-faces.el...
      Loading faces.el...
      Loading glyphs.el...
      Loading fontcolor.el...
      Loading extents.el...
      Loading events.el...
      Loading hash-table.el...
      Loading text-props.el...
      Loading process.el...
      Loading multicast.el...
      Loading map-ynp.el...
      Loading undo-stack.el...
      Loading window.el...
      Loading window-xemacs.el...
      Loading resize-minibuffer.el...
      Loading simple.el...

      Loading newcomment.el...
      Loading keydefs.el...
      Loading abbrev.el...
      Loading derived.el...
      Loading minibuf.el...
      Loading list-mode.el...
      Loading modeline.el...
      Loading cus-file.el...
      Loading startup.el...

Load file misc: not found
Fatal error during load, aborting
make[1]: *** [NEEDTODUMP] Error 1
make[1]: Leaving directory `/var/tmp/portage/app-editors/xemacs-21.5.34-r1/work/xemacs-21.5.34/src'
make: *** [src] Error 2
 * ERROR: app-editors/xemacs-21.5.34-r1::gentoo failed (compile phase):
 *   emake failed
 *
 * If you need support, post the output of `emerge --info '=app-editors/xemacs-21.5.34-r1::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=app-editors/xemacs-21.5.34-r1::gentoo'`.
 * The complete build log is located at '/var/tmp/portage/app-editors/xemacs-21.5.34-r1/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/app-editors/xemacs-21.5.34-r1/temp/environment'.
 * Working directory: '/var/tmp/portage/app-editors/xemacs-21.5.34-r1/work/xemacs-21.5.34'
 * S: '/var/tmp/portage/app-editors/xemacs-21.5.34-r1/work/xemacs-21.5.34'

>>> Failed to emerge app-editors/xemacs-21.5.34-r1, Log file:

>>>  '/var/tmp/portage/app-editors/xemacs-21.5.34-r1/temp/build.log'

 * Messages for package app-editors/xemacs-21.5.34-r1:

 * ERROR: app-editors/xemacs-21.5.34-r1::gentoo failed (compile phase):
 *   emake failed
 *
 * If you need support, post the output of `emerge --info '=app-editors/xemacs-21.5.34-r1::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=app-editors/xemacs-21.5.34-r1::gentoo'`.
 * The complete build log is located at '/var/tmp/portage/app-editors/xemacs-21.5.34-r1/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/app-editors/xemacs-21.5.34-r1/temp/environment'.
 * Working directory: '/var/tmp/portage/app-editors/xemacs-21.5.34-r1/work/xemacs-21.5.34'
 * S: '/var/tmp/portage/app-editors/xemacs-21.5.34-r1/work/xemacs-21.5.34'
 *
 * The following package has failed to build or install:
 *
 *  (app-editors/xemacs-21.5.34-r1::gentoo, ebuild scheduled for merge), Log file:
 *   '/var/tmp/portage/app-editors/xemacs-21.5.34-r1/temp/build.log'
 * 


Reproducible: Always

Steps to Reproduce:
1. emerge -1 "=xemacs-21.5.34-r1"
Actual Results:  
xemacs configured, but not compiled

Expected Results:  
xemacs configured, compiled and installed successfully

$> emerge --info

Portage 2.2.7 (default/linux/x86/13.0/desktop/gnome/systemd, gcc-4.7.3, glibc-2.17, 3.10.17-gentoo.jj i686)
=================================================================
System uname: Linux-3.10.17-gentoo.jj-i686-Intel-R-_Atom-TM-_CPU_N450_@_1.66GHz-with-gentoo-2.2
KiB Mem:     1020284 total,     86316 free
KiB Swap:    2047996 total,   1875756 free
Timestamp of tree: Fri, 07 Feb 2014 22:45:01 +0000
ld GNU ld (GNU Binutils) 2.23.2
app-shells/bash:          4.2_p45
dev-java/java-config:     2.1.12-r1
dev-lang/python:          2.7.5-r3, 3.3.3
dev-util/cmake:           2.8.11.2
dev-util/pkgconfig:       0.28
sys-apps/baselayout:      2.2
sys-apps/openrc:          0.12.4
sys-apps/sandbox:         2.6-r1
sys-devel/autoconf:       2.13, 2.69
sys-devel/automake:       1.11.6, 1.12.6, 1.13.4
sys-devel/binutils:       2.23.2
sys-devel/gcc:            4.7.3-r1
sys-devel/gcc-config:     1.7.3
sys-devel/libtool:        2.4.2
sys-devel/make:           3.82-r4
sys-kernel/linux-headers: 3.9 (virtual/os-headers)
sys-libs/glibc:           2.17
Repositories: gentoo jjoverlay mv
ACCEPT_KEYWORDS="x86"
ACCEPT_LICENSE="* -@EULA Broadcom"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe -fomit-frame-pointer -mfpmath=sse"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.4/ext-active/ /etc/php/apache2-php5.5/ext-active/ /etc/php/cgi-php5.4/ext-active/ /etc/php/cgi-php5.5/ext-active/ /etc/php/cli-php5.4/ext-active/ /etc/php/cli-php5.5/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-march=native -O2 -pipe -fomit-frame-pointer -mfpmath=sse"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--keep-going"
FCFLAGS="-O2 -march=i686 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms splitdebug strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync"
FFLAGS="-O2 -march=i686 -pipe"
GENTOO_MIRRORS="http://ftp.vectranet.pl/gentoo/ ftp://ftp.vectranet.pl/gentoo/ http://distfiles.gentoo.org"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/jjportage/overlay /var/lib/layman/mv"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="X a52 aac acl acpi alsa berkdb branding bzip2 cairo cdda cdr cli colord cracklib crypt cups cxx dbus dri dts dvd dvdr eds emacs emboss encode evo exif fam firefox flac fortran gdbm gif gnome gnome-keyring gpm gstreamer gtk iconv introspection ipv6 java jpeg lcms ldap libnotify libsecret mad mbox mng modemmanager modules mp3 mp4 mpeg nautilus ncurses nls nptl ogg opengl openmp pam pango pcre pdf png policykit ppds pulseaudio python qt3support qt4 readline sdl session socialweb spell ssl startup-notification svg systemd tcpd tiff truetype udev udisks unicode upower usb vorbis wxwidgets x264 x86 xcb xemacs xml xv xvid zlib zsh-completion" ABI_X86="32" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="keyboard mouse evdev synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_3" RUBY_TARGETS="ruby19 ruby18" USERLAND="GNU" VIDEO_CARDS="intel" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CPPFLAGS, CTARGET, INSTALL_MASK, LANG, LC_ALL, MAKEOPTS, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON
Comment 1 Alex Xu (Hello71) 2014-02-08 18:19:05 UTC
Please attach the full build.log.
Comment 2 jimmij 2014-02-08 18:30:52 UTC
Created attachment 369900 [details]
xemacs-21.5.34-r1_build.log

See attachment.
Comment 3 jimmij 2014-02-08 18:31:18 UTC
See attachment.
Comment 4 Fernando (likewhoa) 2014-02-08 19:55:19 UTC
confirmed here on amd64
Comment 5 Mats Lidell gentoo-dev 2014-02-08 21:26:40 UTC
This is an odd problem which I can recreate only by deleting the files misc.el and misc.elc (maybe only misc.elc need to be missing) under 
/usr/share/xemacs-21.5-b34/lisp/. Could you please check if you have that folder installed and if so what is there?

This is part of the darker corners of XEmacs build logic which on an upgrade uses files stored under /usr/share/xemacs-21.5-b34/lisp/ so if files there are manipulated in some way, either deliberately or by a previous install that was interrupted, this situation could occur.

If you have edited files under /usr/share/xemacs-21.5-b34/lisp/ that you want to keep please make a copy of them and then either try "rm -rf /usr/share/xemacs-21.5-b34/" and rebuild or use portage to remove xemacs first and reinstall. That should solve the problem.
Comment 6 jimmij 2014-02-08 23:37:43 UTC
I had two files in /usr/share/xemacs-21.5-b34/lisp/
misc.elc and misc.el.gz

I unmerged installed package (xemacs-21.5.34) and merged 21.5.34-r1, now it compiled. Afterwards, just for test, I run yet again 'emerge xemacs', and it did not compile. There is obviously some conflict with existing package what is strange for me since compilation takes place in /var/tmp/portage/app-editors/xemacs-21.5.34-r1 so should not interact with live system.

Anyway this bug probably is somehow similar to https://bugs.gentoo.org/show_bug.cgi?id=373281#c11 in the sense of similar workaround.
Comment 7 Mats Lidell gentoo-dev 2014-02-09 12:52:58 UTC
Things are not getting clearer. Really strange.

You should have many files installed in /usr/share/xemacs-21.5-b34/lisp/ not just two. Check what is expected with "equery files xemacs". Is that the situation after the successful build or did the successful build just install misc.el?

You also reported that you had the file misc.el.gz. Although the el-files can be compressed that option is not used by the ebuild? Have you installed XEmacs from sources yourself?

Are you getting the same error with misc missing when you rebuild?

About interacting with live system. I'm afraid that the upstream build system works that way so files in /usr/share/xemacs-21.5-b34/lisp/ are used for the dump. The idea being that if a user changes these they would like it to be used when they rebuild. That is maybe relevant for a user building from sources but is not what you want for Gentoo. Unfortunately as things are now we get that behavior from upstream and it is nothing I can change at the moment. How XEmacs handles the initial load-path during build and dump is not something that is easily changed.
Comment 8 jimmij 2014-02-09 15:59:15 UTC
(In reply to Mats Lidell from comment #7)
> Things are not getting clearer. Really strange.

OK, things are getting clearer right now ;)
But first things first...

> You should have many files installed in /usr/share/xemacs-21.5-b34/lisp/ not
> just two.

Most probably I was not clear enough in my previous post, sorry for that -- I had only two files 'misc' in that directory (misc.elc and misc.el.gz), but there are obviously many more different lisp files.

> You also reported that you had the file misc.el.gz. Although the el-files
> can be compressed that option is not used by the ebuild? Have you installed
> XEmacs from sources yourself?

I just use standard 'emerge xemacs'.

> Are you getting the same error with misc missing when you rebuild?

Yes.

> About interacting with live system. I'm afraid that the upstream build
> system works that way so files in /usr/share/xemacs-21.5-b34/lisp/ are used
> for the dump. The idea being that if a user changes these they would like it
> to be used when they rebuild. That is maybe relevant for a user building
> from sources but is not what you want for Gentoo. Unfortunately as things
> are now we get that behavior from upstream and it is nothing I can change at
> the moment. How XEmacs handles the initial load-path during build and dump
> is not something that is easily changed.

So here lies the source of the problem, I believe.


Now to the point:
From your explanation I understood, that the crucial is to have '*.el' files, not '*.el.gz', so I've just gunzipped everything in /usr/share/xemacs-21.5-b34/lisp/ and voila - no rebuilding xemacs works! Moreover now there are 3 different file types in /usr/share/xemacs-21.5-b34/lisp/ : *.el, *.el.gz and *.elc. It means that *.el were not deleted/changed - I think it is expected behavior from what you have said.

So the question is why *.el files are compressed during installation in the first place? I'm not an expert of ebuilds, but I looked into xemacs.ebuild and under function src_install() there is command
install gzip-el || die

and gzip-el is most probably defined in main xemacs Makefile (at line 200):

        @echo "If you would like to save approximately 4M of disk space, do"
        @echo "make gzip-el"
        @echo "or you may run "
        @echo ${srcdir}/lib-src/gzip-el.sh lispdir " from the command line."
        @echo "Where lispdir is where the lisp files were installed, i.e.,"
        @echo "${lispdir}"
gzip-el:
        $(SHELL) ${srcdir}/lib-src/gzip-el.sh $(DESTDIR)${lispdir}

where gzip.el.sh is just a script under /var/tmp/portage/app-editors/xemacs-21.5.34-r1/work/xemacs-21.5.34/lib-src/gzip-el.sh which compresses everything:

echo Compressing .el files in "$1"...
find "$1" -type f -name "*.el" -print |
        while read file; do
                [ -s "${file}c" ] && echo "$file" && gzip -f9 "$file"
        done


Hope this is enough clue to resolve the mystery and correct ebuild/makefile/whatever.
Comment 9 Mats Lidell gentoo-dev 2014-02-09 21:21:50 UTC
That is correct. For some reason the gzip-el target is not executed, that I know of, on any of my machines. I need to take a deeper look on this. 

Thanks for pointing out that the gzip-el target is part of the ebuild. I jumped to the conclusion it wasn't since it was not executed on my machines. Why it is executed on your machine and not on mine and why it then causes these problems, it has been part of upstream for ages, is yet to be found out. 

At least I now have something to go on. Thanks.
Comment 10 Henrik Grubbström 2014-02-15 10:51:49 UTC
I can confirm that the workaround

  emerge -c xemacs; emerge xemacs

worked for me.
Comment 11 jimmij 2014-03-28 22:11:26 UTC
Is there anybody out there?
I believe the fix is obvious - just remove one line in ebuild or play a bit with Makefile.
Why it takes almost 2 months?
Comment 12 Mats Lidell gentoo-dev 2014-03-29 13:55:12 UTC
(In reply to jimmij from comment #11)
> Is there anybody out there?

Yes! Still alive.

> I believe the fix is obvious - just remove one line in ebuild or play a bit
> with Makefile.
> Why it takes almost 2 months?

The problem with the compressed files can be solved simply by not compressing them. What is a few megabytes these days compared to build problems? So maybe we should just do that to fix that part of the issue.

I write part of the problem. I thought the suggested workarounds could be sufficient until we find a proper solution to all issues related with the el-files. (There is a problem when the mule USE flag is changed.) So I have sent the issue upstream to myself and the rest of the XEmacs project. Unfortunately there has been no suggested solution to the general problem yet. This decision might explain the long delay.

A potential solution (not tested yet) to the whole problem could be to delete the files under /usr/share/xemacs-21.5-b34/ during the install phase. Thus avoiding XEmacs to trip over them. I don't feel good about that so I wanted to first look for an upstream solution.
Comment 13 Ulrich Müller gentoo-dev 2014-04-02 14:15:27 UTC
The build process really shouldn't depend on the presence or absence of files from the installed version. So there is some load-path issue in the upstream build system.

I was able to work around the problem by adding the following src_compile function to the ebuild:

src_compile() {
    emake EMACSLOADPATH="${S}"/lisp
}
Comment 14 Mats Lidell gentoo-dev 2014-04-03 22:31:09 UTC
Thanks for the patch. 

To complement that I removed the compression of el-files since even with the patch /usr/share/xemacs-21.5-b34/ was touched during the build process. If the el-files where missing a crash will result.

With these two things together rebuilds caused by a change of the mule USE flag works as well as plain rebuilds.

An update to xemacs-21.5.34-r2.ebuild has been commited.
Comment 15 Mats Lidell gentoo-dev 2014-08-01 21:02:03 UTC
xemacs-21.5.34-r2 solves the problem.