undefined reference to pthread_cond_init during many ports compilation

Doug White dwhite at gumbysoft.com
Tue Jan 13 11:40:11 PST 2004


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 at cronin.chtf.stuba.sk:/usr/src/sys/compile/KERONIN  i386

This all works on -current, but that has special handling WRT threads.

-- 
Doug White                    |  FreeBSD: The Power to Serve
dwhite at gumbysoft.com          |  www.FreeBSD.org


More information about the freebsd-stable mailing list