emerge of x11-libs/qt fails to build at uic, complaining of libqt-mt.so: undefined reference to `__pthread_unregister_cancel libqt-mt.so: undefined reference to `__pthread_register_cancel This problem GOES AWAY IF COMPILING AS A USER RATHER THAN AS ROOT/PORTAGE. These symbols only occur in NPTL, and in recent NPTL they are supposed to be hidden with hidden_symbol() macros. (I am running the older nptl 0.29 that is in the glibc-2.3.2-r1 ebuild.) I tried emerge of qt-3.1.2-r4, qt-3.2.0, and a qt-3.2.1 (from trolltech rsync on 24-august-2003) with gcc-2.3.2-r1, gcc-3.3.1, and gcc-3.4 -- always got this error... ...UNTIL I compiled the trolltech-rsync sources with gcc-3.3.1 as a USER rather than via the ebuild! I tried to be very careful to use the "./configure" flags that are used in the ebuild. I do NOT get the linkage errors when compiling as a user! I have no other QT libraries installed in this system, this is a new installation with xfree-4.3.99.10 and a tiny windowmanager called PWM. It is a rather strange configuration, as I built from scratch with gcc-3.3.1, glibc-2.3.2-r1, kernel-2.6.0-test3, and userspace kernel headers from -test3. So I don't expect a "resolution", but I felt it was worth a heads-up. ----- here is the compiler/make output: g++ -fno-exceptions -Wl,-rpath,/usr/qt/3.2.1/lib -o ../../../bin/uic .obj/release-shared-mt/main.o .obj/release-shared-mt/uic.o .obj/release-shared-mt/form.o .obj/release-shared-mt/object.o .obj/release-shared-mt/subclassing.o .obj/release-shared-mt/embed.o .obj/release-shared-mt/widgetdatabase.o .obj/release-shared-mt/domtool.o .obj/release-shared-mt/parser.o -L/var/tmp/portage/qt-3.2.1/work/qt-3.2.1/lib -L/usr/X11R6/lib -L/usr/X11R6/lib -lqt-mt -lmng -ljpeg -lpng -lz -lGLU -lGL -lXmu -lXi -lXrender -lXrandr -lXinerama -lXft -lfreetype -lfontconfig -lXext -lX11 -lm -lSM -lICE -ldl -lpthread /var/tmp/portage/qt-3.2.1/work/qt-3.2.1/lib/libqt-mt.so: undefined reference to `__pthread_unregister_cancel' /var/tmp/portage/qt-3.2.1/work/qt-3.2.1/lib/libqt-mt.so: undefined reference to `__pthread_register_cancel' collect2: ld returned 1 exit status make[3]: *** [../../../bin/uic] Error 1 make[3]: Leaving directory `/var/tmp/portage/qt-3.2.1/work/qt-3.2.1/tools/designer/uic' ---- Here is emerge --info (note that QT ignores portage CFLAGS): Portage 2.0.49 (default-x86-1.4, gcc-3.3.1, glibc-2.3.2-r1, 2.6.0-test3-mm3) ================================================================= System uname: 2.6.0-test3-mm3 i686 Pentium III (Coppermine) ACCEPT_KEYWORDS="x86 ~x86" AUTOCLEAN="yes" CFLAGS="-fstack-protector -ftracer -pipe -march=pentium3 -O1 -fstrength-reduce -fprefetch-loop-arrays -finline-functions -fgcse -freduce-all-givs" CHOST="i686-pc-linux-gnu" COMPILER="gcc3" 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" CXXFLAGS="-fstack-protector -ftracer -pipe -march=pentium3 -O1 -fstrength-reduce -fprefetch-loop-arrays -finline-functions -fgcse -freduce-all-givs" DISTDIR="/usr/portage/distfiles" FEATURES="sandbox ccache autoaddcvs keepwork nosandbox buildpkg" GENTOO_MIRRORS="http://gentoo.mirrors.pair.com http://gentoo.oregonstate.edu http://www.ibiblio.org/pub/Linux/distributions/gentoo" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="x86 oss 3dnow apm avi crypt cups encode foomaticdb gif imlib jpeg libg++ libwww mad mikmod mpeg ncurses nls pdflib png qt quicktime sdl slang spell truetype xml2 xmms xv zlib alsa gdbm berkdb readline X tcpd pam ssl perl python oggvorbis gtk opengl mozilla acpi acpi4linux dnd emacs gtk2 imap ipv6 maildir mmx mozcalendar mozinterfaceinfo moznocompose moznoirc mozsvg nptl ofx pcmcia pda pic sse threads usb -gnome -motif -svga -arts -kde -tcltk -java -gpm"
What happens if you first unmerge qt, and then remerge it. Probably it picks up parts of the old qt library.
Sorry. Perhaps I should be more clear: 1) erase hard disk 2) install build system from gentoo 1.4 cd-rom 3) install gcc-3.3.1 4) install development-sources-2.6.0-test3 5) install usr/include headers from -test3 6) install glibc-2.3.2-r1 7) modify /usr/portage/profiles/default-x86-1.4/{packages,virtuals} to use glibc with NPTL and GCC as installed above 8) scripts/boostrap.sh 9) emerge -u system 10) emerge qt There was NO previous version of QT installed on this system, to the best of my knowlege. Certainly none was indicated in /var/db/pkg and the like. So I think this is odd. Yes, I have a somewhat odd configuration. But I think it is odd for hidden symbols in glibc/NPTL to "pollute" non-glibc namespace, thus breaking link. I've only noticed this for QT build, and building QT as a USER (not emerge) seems to avoid this. I don't know why; it's the same "configure/make" sequence.
I think this problem should now be fixed when using the latest Qt ebuild (3.3.1). Re-open if it persists.