When I attempt to compile emacs-21.4, everything goes smoothly until the following occurs: gcc -c -D_BSD_SOURCE -D_BSD_SOURCE -O2 -march=pentium4 -pipe -fomit-frame-pointer -DEMACS_BITMAP_FILES -DHAVE_CONFIG_H -Demacs -I. -I../src -I/home/exports/portage/emacs-21.4/work/emacs-21.4/lwlib -I/home/exports/portage/emacs-21.4/work/emacs-21.4/lwlib/../src lwlib-Xm.c lwlib-Xm.c:37:26: Xm/BulletinB.h: No such file or directory lwlib-Xm.c:38:25: Xm/CascadeB.h: No such file or directory lwlib-Xm.c:39:26: Xm/CascadeBG.h: No such file or directory lwlib-Xm.c:40:25: Xm/DrawingA.h: No such file or directory lwlib-Xm.c:41:23: Xm/FileSB.h: No such file or directory lwlib-Xm.c:42:22: Xm/Label.h: No such file or directory lwlib-Xm.c:43:21: Xm/List.h: No such file or directory lwlib-Xm.c:44:22: Xm/MainW.h: No such file or directory ... And on and on with more missing files. Apparently some include is missing. If I attempt to run my current emacs, I end up with: emacs: error while loading shared libraries: libXm.so.3: cannot open shared object file: No such file or directory Obviously some library is missing. I just re-emerged xorg yesterday. Everything else works fine as far as I can tell. Reproducible: Always Steps to Reproduce: 1. Attempt to run Emacs. 2. Get Missing library error. 3. Attempt to 'emerge emacs'. 4. Error. Actual Results: Error output as described above. Expected Results: Emacs should compile and run fine Portage 2.0.51.19 (default-linux/x86/2004.3, gcc-3.4.3, glibc-2.3.4.20050125-r0, 2.6.10-gentoo-r7 i686) ================================================================= System uname: 2.6.10-gentoo-r7 i686 Intel(R) Pentium(R) M processor 1500MHz Gentoo Base System version 1.6.9 Python: dev-lang/python-2.3.5 [2.3.5 (#1, Feb 17 2005, 23:38:49)] dev-lang/python: 2.3.5 sys-devel/autoconf: 2.59-r6, 2.13 sys-devel/automake: 1.7.9-r1, 1.8.5-r3, 1.5, 1.4_p6, 1.6.3, 1.9.5 sys-devel/binutils: 2.15.92.0.2-r4 sys-devel/libtool: 1.5.10-r5 virtual/os-headers: 2.4.22-r1 ACCEPT_KEYWORDS="x86 ~x86" AUTOCLEAN="yes" CFLAGS="-O3 -march=pentium4 -pipe -fomit-frame-pointer" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/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/lib/X11/xkb /usr/share/config /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS="-O3 -march=pentium4 -pipe -fomit-frame-pointer" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs autoconfig ccache distlocks sandbox sfperms" GENTOO_MIRRORS="http://lug.mtu.edu/gentoo/ http://128.213.5.34/gentoo/ http://gentoo.oregonstate.edu http://distro.ibiblio.org/pub/Linux/distributions/gentoo" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/home/exports" PORTDIR="/usr/portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="X acpi alsa apm arts avi berkdb bitmap-fonts bonobo cdr crypt cups curl dvd emacs emboss encode esd f77 fam fbcon font-server foomaticdb fortran gdbm gif gnome gpm gstreamer gtk gtk2 imap imlib ipv6 java jpeg kde libg++ libwww mad mikmod motif mozilla mp3 mpeg msn ncurses nls oggvorbis opengl oscar oss pam pcmcia pdflib perl png python qt quicktime readline samba sdl slang spell ssl svga tcltk tcpd tiff truetype truetype-fonts type1-fonts unicode usb x86 xml xml2 xmms xv yahoo zlib" Unset: ASFLAGS, CBUILD, CTARGET, LANG, LC_ALL, LDFLAGS, PORTDIR_OVERLAY
remerge motif-config,openmotif and then emacs
That didn't fix the problem for me. What seems to have happened is that /usr/include/Xm was already a directory, so when openmotif tried to create a symbolic link pointing from /usr/include/Xm to /usr/include/openmotif-2.2/Xm, the link that was created was /usr/include/Xm/Xm. Fixing the link let emacs compile properly.
Yeah I just upgraded openmotif today - this bug is definitely not fixed and not resolved by the solution posed in comment 1. It definitely is, however, the exact same issue noted in comment 2. By changing the link, everything works just fine. Obviously some script is doing something wrong.
*** This bug has been marked as a duplicate of 83018 ***