I have set PORTAGE_TMPDIR to an directory different from the default. This usually works just fine, but not so with the emacs ebuild. It seems like a wrong path is being compiled into the binaries so that emacs can't find its libraries. Here's what happens when I try to start emacs after building it in my temporary directory (/mnt/pcbackup/tmp): bash-2.05b# emacs Warning: arch-dependent data dir (/mnt/pcbackup/tmp/portage/emacs-21.3-r3/image//usr/libexec/emacs/21.3/i686-pc-linux-gnu/) does not exist. Warning: arch-independent data dir (/mnt/pcbackup/tmp/portage/emacs-21.3-r3/image//usr/share/emacs/21.3/etc/) does not exist. Warning: Lisp directory `/mnt/pcbackup/tmp/portage/emacs-21.3-r3/image//usr/share/emacs/21.3/site-lisp' does not exist. Warning: Lisp directory `/mnt/pcbackup/tmp/portage/emacs-21.3-r3/image//usr/share/emacs/site-lisp' does not exist. Warning: Lisp directory `/mnt/pcbackup/tmp/portage/emacs-21.3-r3/image//usr/share/emacs/21.3/leim' does not exist. Warning: Lisp directory `/mnt/pcbackup/tmp/portage/emacs-21.3-r3/image//usr/share/emacs/21.3/lisp' does not exist. Cannot open load file: term/x-win It seems like a wrong path has been compiled into the binaries: bash-2.05b# cd /usr bash-2.05b# find * -exec grep "/mnt/pcbackup/tmp/portage/emacs-21.3-r3/image/" {} /dev/null \; Binary file bin/emacs-21.3 matches Binary file bin/emacs matches However, after commenting out PORTAGE_TMPDIR in make.conf, the build is good and everything works alright. (Note that /mnt/pcbackup is an NFS mounted file system, but I don't think that is an issue here). Reproducible: Always Steps to Reproduce: 1. Set PORTAGE_TMPDIR to something other than the default (in my case NFS-mounted /mnt/pcbackup/tmp). 2. emerge emacs 3. Now trying to start emacs fails. Actual Results: emacs failed to start as detailed above. Expected Results: It should have started :-) bash-2.05b# emerge info Portage 2.0.50-r11 (default-x86-2004.2, gcc-3.3.4, glibc-2.3.3.20040420-r1, 2.6.8-gentoo-r1) ================================================================= System uname: 2.6.8-gentoo-r1 i686 Intel(R) Pentium(R) III Mobile CPU 1200MHz Gentoo Base System version 1.4.16 Autoconf: sys-devel/autoconf-2.59-r4 Automake: sys-devel/automake-1.8.5-r1 ACCEPT_KEYWORDS="x86" AUTOCLEAN="yes" CFLAGS="-O2 -march=pentium3 -mcpu=i686 -pipe -fomit-frame-pointer" CHOST="i686-pc-linux-gnu" COMPILER="" CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3.2/share/config /usr/kde/3.3/env /usr/kde/3.3/share/config /usr/kde/3.3/shutdown /usr/kde/3/share/config /usr/share/config /usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/ /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS="-O2 -march=pentium3 -mcpu=i686 -pipe -fomit-frame-pointer" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs ccache sandbox" GENTOO_MIRRORS="ftp://ftp.du.se/pub/os/gentoo" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/mnt/pcbackup/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="X alsa apache2 apm arts avi berkdb bitmap-fonts bzlib cdr crypt cups dga directfb divx4linux dvd emacs encode flac flash foomaticdb ftp gd gdbm gif gpm gstreamer gtk gtk2 imagemagick imap imlib jabber java jpeg kde libg++ libwww mad mikmod mime mmap mng motif mozilla mpeg mysql ncurses nls odbc offensive oggvorbis openal opengl orinoco oss pam pcmcia pcre pda pdflib perl php png posix python qt quicktime readline samba sdl shared slang soap sockets spell sse sslsvg svga tcltk tcpd tetex tiff truetype unicode usb videos x86 xine xml xml2 xmms xpm xprint xsl xv xvid zlib"
*** This bug has been marked as a duplicate of 22563 ***