The xscreensaver ebuild fails if lesstif( or openmotif, I suppose) is not installed. The compilation fails when it tries to link to the Xm library. I fixed the problem on my system by emerging lesstif prior to upgrading to xscreensaver version 4.0.5-r3. Previous versions of xscreensaver did not require the Xm library. Reproducible: Always Steps to Reproduce: 1. Unmerge lesstif ( all packages that supply the Xm library ) 2. Emerge xscreensaver Actual Results: source compilation fails attempting to link libXm Expected Results: Completed the source compilation
hmm, how odd virtual/motif is, in fact, listed as a dependency if "motif" is in USE, so this is rather puzzling.
I had 'motif' listed in my USE variable, but the libraries were not emerged. This might of had something to do with it. In any regards, the ebuild should have detected this and emerged lesstif for me.
hmm .. can you paste the output of "emerge info"? xscreensaver-4.05-r3 is going to be obseleted by 4.09 real soon, but this not merging openmotif is rather bizzare, i'm thinking it might be a portage problem.
Here's the output of my "emerge info" Portage 2.0.47-r10 (default-x86-1.4, gcc-3.2.2, glibc-2.3.1-r2) ================================================================= System uname: 2.4.20-gentoo-r1 i686 AMD Athlon(tm) XP 1600+ GENTOO_MIRRORS=" ftp://ftp.gtlib.cc.gatech.edu/pub/gentoo http://csociety-ftp.ecn.purdue.edu/pub/gentoo/ ftp://csociety-ftp.ecn.purdue.edu/pub/gentoo/" CONFIG_PROTECT="/etc /var/qmail/control /usr/share/config /usr/kde/2/share/config /usr/kde/3/share/config /usr/X11R6/lib/X11/xkb" CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d" PORTDIR="/usr/portage" DISTDIR="/usr/portage/distfiles" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR_OVERLAY="" USE="-3dfx 3dnow aalib -acl acpi afs alsa -apache2 -apm -arts -atlas avi berkdb bonobo -canna cdr -cjk crypt cups dga -directfb doc dvd ethereal encode -esd evo -fbcon flash -freewnn -gb gdbm ggi gif gnome -gphoto2 -gpm gps -gtk gtk2 gtkhtml guile -icc -icc-pgo -impa imlib -innodb -ipv6 java -jikes jpeg junit -kde -kerberos lcms ldap leim libg++ libgda libwww -matrox maildir -mbox mikmod mmx motif mozilla mpeg mule -mysql nas ncurses nls oav -oci8 odbc oggvorbis opengl oss pam -pcmcia pda pdflib perl pic plotutils png -pnp postgres python -qt quicktime readline ruby samba sasl scanner sdl slang slp snmp -socks5 spell sse ssl -static svga tcltk tcpd tetex tiff truetype -trusted usb -voodoo3 wmf X xface -xml xml2 xmms xv -zeo zlib x86" COMPILER="gcc3" CHOST="i686-pc-linux-gnu" CFLAGS="-march=athlon-xp -O3 -pipe" CXXFLAGS="-march=athlon-xp -O3 -pipe" ACCEPT_KEYWORDS="x86" MAKEOPTS="-j2" AUTOCLEAN="yes" SYNC="rsync://rsync.us.gentoo.org/gentoo-portage/" FEATURES="sandbox ccache"
ok .. well 4.05-r3 depends on openmotif and not virtual/motif. only the new version 4.09 depends on virtual/motif, so it should of tried to merge openmotif. would you mind actually providing the actually log of where it fails?
its most likely a conflicting lesstif/openmotif install that corruped the header file. i've modified the xscreensaver 4.05 ebuild to use the new virtual/motif dependency, meaning it will use either lesstif or openmotif if it is available. you'll need to make sure whether your current *tif implementation has registered as a provider of this virtual package. simple do: fgrep motif /var/cache/edb/virtuals if there is no output, then you'll need to: emerge sync emerge lesstif or emerge openmotif as for why it didn't pull lesstif, it is because openmotif was the original dependency, but you must of installed lesstif over openmotif and removed the Xm.h header file. right now openmotif and lesstif is a real pain because they provide the same files in the same dir. until something like motif-config is setup, the virtual solution is the best we can do right now. so by re-emerging openmotif or lesstif, it should compile again.
After Unmergine (emerge -C) both openmotif and lesstif, I was able to recreate the error. Portage actually did re-emerge openmotif, but I still got the following errors when it attempted to emerge xscreensaver. (A bunch more of these prior) .... : undefined reference to `_XmStrings' demo-Xm-widgets.o(.text+0x14b9): In function `create_options_page': : undefined reference to `XmCreateToggleButtonGadget' demo-Xm-widgets.o(.text+0x14d0): In function `create_options_page': : undefined reference to `_XmStrings' demo-Xm-widgets.o(.text+0x14ef): In function `create_options_page': : undefined reference to `XmCreateToggleButtonGadget' demo-Xm-widgets.o(.text+0x1506): In function `create_options_page': : undefined reference to `_XmStrings' demo-Xm-widgets.o(.text+0x1525): In function `create_options_page': : undefined reference to `XmCreateToggleButtonGadget' demo-Xm-widgets.o(.text+0x1544): In function `create_options_page': : undefined reference to `_XmStrings' demo-Xm-widgets.o(.text+0x155b): In function `create_options_page': : undefined reference to `XmCreateToggleButtonGadget' demo-Xm-widgets.o(.text+0x157d): In function `create_options_page': : undefined reference to `XmCreateSeparatorGadget' demo-Xm-widgets.o(.text+0x159f): In function `create_options_page': : undefined reference to `XmCreatePushButtonGadget' demo-Xm-widgets.o(.text+0x15c1): In function `create_options_page': : undefined reference to `XmCreatePushButtonGadget' demo-Xm-widgets.o(.text+0x15d3): In function `create_options_page': : undefined reference to `_XmStrings' demo-Xm-widgets.o(.text+0x15e9): In function `create_options_page': : undefined reference to `_XmStrings' demo-Xm-widgets.o(.text+0x15f9): In function `create_options_page': : undefined reference to `_XmStrings' demo-Xm-widgets.o(.text+0x1609): In function `create_options_page': : undefined reference to `_XmStrings' demo-Xm-widgets.o(.text+0x1619): In function `create_options_page': : undefined reference to `_XmStrings' demo-Xm-widgets.o(.text+0x1629): more undefined references to `_XmStrings' follow collect2: ld returned 1 exit status make[1]: *** [xscreensaver-demo-Xm] Error 1 make[1]: Leaving directory `/var/tmp/portage/xscreensaver-4.05-r3/work/xscreensaver-4.05/driver' make: *** [default] Error 5 !!! ERROR: x11-misc/xscreensaver-4.05-r3 failed. !!! Function src_compile, Line 80, Exitcode 2 !!! (no error message) Emerging Lesstif fixes this problem. Is it bad to have both lesstif and openmotif merged at the same time?
having them both at the same time is not ideal. you should only have one or the other. lesstif should work fine. please only have either lesstif or openmotif installed.
did removing one of the *tif's work for you?
No, xscreensaver wouldn't build with the version of openmotif I have installed. I get the error I posted a few posts prior. It works with lesstif though. Currently, I have both *tifs emerged because I have several programs (like emacs) compiled against openmotif. I know I should just re-emerge the guilty programs, but everything seems to be running smoothly with both *tifs emerged. If it ain't broke, don't fix it. :-) The libraries have different version numbers.
I am having the same problem, but I found that the Makefiles for xscreensaver are not being properly configures. For example, the link line is looking only in /usr/lib for -lXm, -lX11, -lXext, and -lXext instead of in /usr/X11R6/lib as it should be. Also, the config step fails to include -ldl which is needed by the X11 libraries. Manually fixing these resolves the compiliation errors, but I don't know how to change this in the configure step. Hopefully this all makes sense.
Follow up to my previous post. Reading through the INSTALL instructions with xscreensaver, it says, "For packages that use the X Window System, `configure' can usually find the X include and library files automatically, but if it doesn't, you can use the `configure' options `--x-includes=DIR' and `--x-libraries=DIR' to specify their locations." This solves the problem I was having, which means that this should be set in the ebuild script.
I've just committed the fix suggested by Jason, it seems to work for me. Dan, can you resync and re-emerge xscreensaver?
It is fixed, now. Good work and thanks.
thanks guys for bearing with me. and thanks to Jason for figuring it out for us :)