While emerging xfree-4.3.0-r2, compiling glxinfo fails because of unresolved symbols in libGLU.so Reproducible: Always Steps to Reproduce: 1. emerge unmerge xfree 2. emerge rsync 3. emerge xfree Actual Results: [LONG COMPILATION OUTPUT OMITTED FOR BREVITY] make[3]: Entering directory `/var/tmp/portage/xfree-4.3.0-r2/work/xc/programs/glxinfo' rm -f glxinfo gcc -m32 -o glxinfo -mno-mmx -ansi -pedantic -Wno-return-type -w -L../../exports/lib glxinfo.o -lGLU -lGL -lXext -lX11 -lpthread -lm -Wl,-rpath-link,../../exports/lib ../../exports/lib/libGLU.so: undefined reference to `operator new(unsigned)@GLIBCPP_3.2' ../../exports/lib/libGLU.so: undefined reference to `vtable for __cxxabiv1::__class_type_info@GLIBCPP_3.2' ../../exports/lib/libGLU.so: undefined reference to `vtable for __cxxabiv1::__vmi_class_type_info@GLIBCPP_3.2' ../../exports/lib/libGLU.so: undefined reference to `__gxx_personality_v0@CXXABI_1.2' ../../exports/lib/libGLU.so: undefined reference to `operator delete[](void*)@GLIBCPP_3.2' ../../exports/lib/libGLU.so: undefined reference to `vtable for __cxxabiv1::__si_class_type_info@GLIBCPP_3.2' ../../exports/lib/libGLU.so: undefined reference to `__cxa_pure_virtual@CXXABI_1.2' ../../exports/lib/libGLU.so: undefined reference to `operator new[](unsigned)@GLIBCPP_3.2' ../../exports/lib/libGLU.so: undefined reference to `operator delete(void*)@GLIBCPP_3.2' collect2: ld returned 1 exit status make[3]: *** [glxinfo] Error 1 make[3]: Leaving directory `/var/tmp/portage/xfree-4.3.0-r2/work/xc/programs/glxinfo' make[2]: *** [install] Error 2 make[2]: Leaving directory `/var/tmp/portage/xfree-4.3.0-r2/work/xc/programs' make[1]: *** [install] Error 2 make[1]: Leaving directory `/var/tmp/portage/xfree-4.3.0-r2/work/xc' make: *** [install] Error 2 !!! ERROR: x11-base/xfree-4.3.0-r2 failed. !!! Function src_install, Line 475, Exitcode 2 !!! (no error message) Expected Results: Successful compilation and merging. Portage 2.0.47-r10 (default-x86-1.4, gcc-3.2.2, glibc-2.2.5-r4,2.3.1-r4) ================================================================= System uname: 2.4.19-rthal5 i686 Intel(R) Xeon(TM) CPU 1.70GHz GENTOO_MIRRORS="http://www.ibiblio.org/gentoo" CONFIG_PROTECT="/etc /var/qmail/control /usr/kde/2/share/config /usr/kde/3/share/config /opt/jakarta/tomcat/conf /usr/X11R6/lib/X11/xkb /usr/kde/3.1/share/config /usr/share/config" 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="x86 oss 3dnow apm cups nls xv zlib gdbm berkdb slang bonobo svga java sdl gpm libwww perl gnome opengl cdr scanner mmx sse gphoto2 X fbcon kde qt qtmt arts gtk motif tcltk imlib ncurses readline lcms gif jpeg png tiff avi mpeg quicktime alsa esd mikmod nas xmms oggvorbis encode pam ssl crypt imap tcpd mozilla truetype spell xml xml2 pdflib plotutils tetex guile python libg++ samba" COMPILER="gcc3" CHOST="i686-pc-linux-gnu" CFLAGS="-mcpu=i686 -O3 -pipe" CXXFLAGS="-mcpu=i686 -O3 -pipe" ACCEPT_KEYWORDS="x86" MAKEOPTS="-j4" AUTOCLEAN="no" SYNC="rsync://rsync.gentoo.org/gentoo-portage" FEATURES="sandbox ccache"
Did you upgrade/downgrade gcc/glibc in the last few days ?
Ivan, well?
I have not upgraded glibc or gcc recently. Now fontconfig also fails to emerge (bug #21195), so I can't even get around to emerging xfree...
Well, I fixed fontconfig, but xfree still fails with the same error. Any more suggestions?
why do you have 2 different versions of glibc installed? (look at the emerge info output you pasted). I have a feeling you've been playing around with glibc/gcc versions.
What do you mean by "playing around"? I've been just steadily upgrading the system since about Gentoo 1.1 or so. I imagine the older glibc is still needed by some packages, otherwise `emerge clean` would have gotten rid of it, right? If not, let me know how to remove the old version.
sorry I should have been clearer. Seems as though you have had multiple versions of glibc/gcc going back and forth. I would recommend you to re-emerge gcc because those things it is missing are part of libstdc++
Okay, so I managed to remove the older version of glibc, then I re-emerged gcc, but building xfree fails with the exact same error. Here's the output of 'emerge info' again. Portage 2.0.48 (default-x86-1.4, gcc-3.2.2, glibc-2.3.1-r4) ================================================================= System uname: 2.4.19-rthal5 i686 Intel(R) Xeon(TM) CPU 1.70GHz GENTOO_MIRRORS="http://www.ibiblio.org/gentoo" CONFIG_PROTECT="/etc /var/qmail/control /usr/kde/2/share/config /usr/kde/3/share/config /opt/jakarta/tomcat/conf /usr/X11R6/lib/X11/xkb /usr/kde/3.1/share/config /usr/share/config" 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="x86 oss apm avi crypt cups gif jpeg libg++ mikmod mmx mpeg ncurses pdflib png quicktime spell xml2 xmms xv zlib gdbm berkdb slang readline arts nas bonobo svga java sdl gpm tcpd pam libwww ssl perl python imlib oggvorbis motif opengl gphoto2 scanner -gtk -gnome 3dnow alsa cdr curl dga doc dvd emacs esd encode fbcon gd guile imap ipv6 kde lcms ldap leim mbox mozilla mule nls qt sasl sse tcltk tetex tiff truetype usb wmf X Xaw3d xml" COMPILER="gcc3" CHOST="i686-pc-linux-gnu" CFLAGS="-mcpu=i686 -O3 -pipe" CXXFLAGS="-mcpu=i686 -O3 -pipe" ACCEPT_KEYWORDS="x86" MAKEOPTS="-j4" AUTOCLEAN="no" SYNC="rsync://rsync.gentoo.org/gentoo-portage" FEATURES="sandbox ccache fixpackages"
can you try export MAKEOPTS="-j2" and try please? if this is being distcc'd please disable distcc
Tried "-j2". Same error.
Looks like glxinfo isn't linking with libstdc++. You can force this by appending '-lstdc++' to the GLULIB variable in xc/programs/glxinfo/Makefile. Not sure of the proper way of doing this w/in the ebuild framework ...
looks like it is using "gcc" rather than "g++" when compiling those glx programs.
I can get it to compile and install if I add -lstdc++, or if I use g++ instead of gcc. Now the question is how to tell Imake to do this.
What is CXX set to ? # source /etc/profile; echo $CXX
bash-2.05b# whoami root bash-2.05b# source /etc/profile bash-2.05b# echo $CXX g++ bash-2.05b#
Hrmph, so it turns out that my environment was kind of confused because I had added some mounted directories (containing shared libs/binaries) to my PATH. Some utilities were using these, some weren't, and the whole system was generally getting confused. After a fresh reinstall without adding these mounts until all was said and done, everything works fine. Doesn't seem to be a Gentoo problem ...
glad to hear that, coz this was confusing as hell.
Um, I don't know that I categorize this as INVALID. I mean, it did cause a few people quite a bit of grief for a while. Perhaps some sort of entry in the FAQ or whatever would be appropriate ...
I'mn a dev and one that can work around most problems and I can confirm that glxinfo/glxgears also don't compile for me. The conditions are slightly different for me. But more or less it's also libstd++ and undefined references to _Unwind_blah@GCC_3.3 symbols that are not even supported or (should be enabled) in any glibc/gcc. I worked around the problem of xorg not not building the glx toys by adding. if use !glxtoys; then einfo "We are going to skip building glxgears glxinfo" sed -i -e s:'glxinfo':'':g -i -e s:'glxgears':'':g \ ${S}/programs/Imakefile || die "sed: glx failed" fi My last attempt to recompile xorg without the following modifcations failed.