Loads of undefined reference to `pthread_foo`

Philip Paeps philip at paeps.cx
Mon Apr 28 18:34:45 PDT 2003


On 2003-04-28 20:46:05 (-0400), Joe Marcus Clarke <marcus at marcuscom.com> wrote:
> On Mon, 2003-04-28 at 20:22, Philip Paeps wrote:
> > For some obscure reason, I can't get anything to link properly with libxml2
> > today.  I keep getting errors like:
> > 
> >   /usr/local/lib/libxml2.so: undefined reference to `pthread_cond_signal'
> >   [...]
> > 
> > I don't know what all changed on the box either, perhaps someone could
> > point me in the right direction towards debugging this, and preferably
> > fixing it :-)
> 
> libxml2 as of 2.5.7 has thread supported enabled by default.  Therefore, you
> need to link in -pthread on -STABLE or -lc_r on -CURRENT.  If you're
> building your own app, you should be using either pkg-config --libs
> libxml-2.0 or gnome-config --libs libxml-2.0 to get the libraries needed for
> libxml2.

Ah, thanks for the hint, I located the problem :-)

This machine has loads of things compiled manually instead of entrusting them
to the ports with proper dependencies listed.  Both internal things and things
which are in the 'real' ports tree.

I just put up thttpd with a little blurb telling $USER that I'm fixing things,
and am now rebuilding all these things from the ports as they should have been
in de first place.

> If this is a port in the system, let me know which one is failing.

It's the fatal mix of ports and non-ports which is causing pain.  Portupgrade
upgraded libxml but not the sepparately installed Apache/PHP and the internal
muck.

Thanks again!

 - Philip [compile compile]

-- 
Philip Paeps
philip at paeps.cx

+32 486 114 720


More information about the freebsd-ports mailing list