Jozef Babjak
2004-Jan-12 22:35 UTC
undefined reference to pthread_cond_init during many ports compilation
Hi all, I installed FreeBSD-4.9 Release, CVSup-ed system sources according to /usr/share/examples/cvsup/stable-supfile and ports according to /usr/share/examples/cvsup/ports-supfile yesterday. Updating by make buildworld, make buildkernel, make installkernel and shutdown now and make installworld was fine and without any errors. Now I'm trying to install applications from CVSup-ed ports collection and lot of installations ends with the same error (this one from /usr/ports/graphics/gimp1): /usr/X11R6/lib/libXt.so: undefined reference to `pthread_cond_signal' /usr/X11R6/lib/libXThrStub.so.6: undefined reference to `_Xthr_zero_stu b_' /usr/X11R6/lib/libX11.so: undefined reference to `pthread_cond_broadcas t' /usr/X11R6/lib/libXThrStub.so.6: undefined reference to `_Xthr_self_stu b_' /usr/X11R6/lib/libXt.so: undefined reference to `pthread_cond_init' /usr/X11R6/lib/libXt.so: undefined reference to `pthread_mutex_unlock' /usr/X11R6/lib/libXt.so: undefined reference to `pthread_self' /usr/X11R6/lib/libXt.so: undefined reference to `pthread_mutex_destroy' /usr/X11R6/lib/libXt.so: undefined reference to `pthread_mutex_lock' /usr/X11R6/lib/libXt.so: undefined reference to `pthread_cond_wait' /usr/X11R6/lib/libXt.so: undefined reference to `pthread_cond_destroy' /usr/X11R6/lib/libXt.so: undefined reference to `pthread_mutex_init' gmake: *** [bin/gs] Error 1 *** Error code 2 Stop in /usr/ports/print/ghostscript-gnu. *** Error code 1 Stop in /usr/ports/print/cups-pstoraster. *** Error code 1 Stop in /usr/ports/print/gimp-print. *** Error code 1 Stop in /usr/ports/graphics/gimp1. I obtain the same end of installation trials of XFree86-4-Server, KDE3... My system: [babjak]{~}<7:32:39>uname -a FreeBSD cronin.chtf.stuba.sk 4.9-STABLE FreeBSD 4.9-STABLE #0: Mon Jan 12 16:03:27 CET 2004 root@cronin.chtf.stuba.sk:/usr/src/sys/compile/KERONIN i386 [babjak]{~}<7:32:41> Oh, it's terrible to spend all day by unsuccessful installations. :-( Jozef Babjak.
Doug White
2004-Jan-13 11:40 UTC
undefined reference to pthread_cond_init during many ports compilation
On Tue, 13 Jan 2004, Jozef Babjak wrote:> I installed FreeBSD-4.9 Release, CVSup-ed system sources according to > /usr/share/examples/cvsup/stable-supfile and ports according to > /usr/share/examples/cvsup/ports-supfile yesterday. Updating by make > buildworld, make buildkernel, make installkernel and shutdown now and > make installworld was fine and without any errors. Now I'm trying to > install applications from CVSup-ed ports collection and lot of > installations ends with the same error (this one from > /usr/ports/graphics/gimp1): > > /usr/X11R6/lib/libXt.so: undefined reference to `pthread_cond_signal' > /usr/X11R6/lib/libXThrStub.so.6: undefined reference to `_Xthr_zero_stu > b_' > /usr/X11R6/lib/libX11.so: undefined reference to `pthread_cond_broadcas > t' > /usr/X11R6/lib/libXThrStub.so.6: undefined reference to `_Xthr_self_stu > b_' > /usr/X11R6/lib/libXt.so: undefined reference to `pthread_cond_init' > /usr/X11R6/lib/libXt.so: undefined reference to `pthread_mutex_unlock' > /usr/X11R6/lib/libXt.so: undefined reference to `pthread_self' > /usr/X11R6/lib/libXt.so: undefined reference to `pthread_mutex_destroy' > /usr/X11R6/lib/libXt.so: undefined reference to `pthread_mutex_lock' > /usr/X11R6/lib/libXt.so: undefined reference to `pthread_cond_wait' > /usr/X11R6/lib/libXt.so: undefined reference to `pthread_cond_destroy' > /usr/X11R6/lib/libXt.so: undefined reference to `pthread_mutex_init'There appear to be multipe issues here. XThrStub is getting pulled in, yet -lc_r wasn't selected so the pthread stuff is missing. Since you're building this from a port, it looks like the port is broken. Try updating the port and rebuilding. I'd have to see the command line (prior to the errors) to make sure the libraries were selected properly.> [babjak]{~}<7:32:39>uname -a > FreeBSD cronin.chtf.stuba.sk 4.9-STABLE FreeBSD 4.9-STABLE #0: Mon Jan 12 16:03:27 CET 2004 > root@cronin.chtf.stuba.sk:/usr/src/sys/compile/KERONIN i386This all works on -current, but that has special handling WRT threads. -- Doug White | FreeBSD: The Power to Serve dwhite@gumbysoft.com | www.FreeBSD.org