Loads of undefined reference to `pthread_foo`

Joe Marcus Clarke marcus at marcuscom.com
Mon Apr 28 20:07:44 PDT 2003


On Mon, 2003-04-28 at 21:17, Larry Rosenman wrote:
> PHP4 did NOT get recompiled, now my apache won't start because of the 
> LIBXML2 recompile
> withOUT a shlibversion bump.

There wasn't a shared lib version bump for this since neither major or
minor versions changed.  I don't know if it was that good of an idea for
the libxml people to enable such a feature by default with just a micro
version bump.  I had to gratuitously bump scrollkeeper's PORTREVISION.

All in all, this wouldn't be a problem if FreeBSD linked libc_r into
shared libraries.  I know there's a reason why we don't, but it seems to
me like _not_ doing it causes more problems than doing it.

Joe

> 
> LER
> 
> 
> --On Monday, April 28, 2003 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'
> >>   /usr/local/lib/libxml2.so: undefined reference to `pthread_getspecific'
> >>   /usr/local/lib/libxml2.so: undefined reference to `pthread_equal'
> >>   /usr/local/lib/libxml2.so: undefined reference to `pthread_once'
> >>   /usr/local/lib/libxml2.so: undefined reference to `pthread_key_create'
> >>   /usr/local/lib/libxml2.so: undefined reference to
> >>   `pthread_mutex_unlock' /usr/local/lib/libxml2.so: undefined reference
> >>   to `pthread_self' /usr/local/lib/libxml2.so: undefined reference to
> >>   `pthread_mutex_destroy' /usr/local/lib/libxml2.so: undefined reference
> >>   to `pthread_mutex_lock' /usr/local/lib/libxml2.so: undefined reference
> >>   to `pthread_cond_wait' /usr/local/lib/libxml2.so: undefined reference
> >>   to `pthread_mutex_init' /usr/local/lib/libxml2.so: undefined reference
> >>   to `pthread_setspecific'
> >>
> >> 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.
> >
> > If this is a port in the system, let me know which one is failing.
> >
> > Joe
> >
> >>
> >> Things which were linked with libxml2 (such as PHP) die with errors like:
> >>
> >>   /usr/libexec/ld-elf.so.1: /usr/local/lib/libxml2.so.5: Undefined
> >>   symbol "pthread_once"
> >>
> >> This might be a bit thin, but I've not found anything else so far.  I
> >> managed to get things to work again by simply not linking with libxml2,
> >> but in the long run, that obviously doesn't solve the problem.
> >>
> >> I've already portupgraded -Rf textproc/libxml2 without any sort of
> >> success.
> >>
> >> Thanks for any help.
> >>
> >>  - Philip [who's supposed to fix things others have broken *sigh*]
> > --
> > PGP Key : http://www.marcuscom.com/pgp.asc
-- 
PGP Key : http://www.marcuscom.com/pgp.asc
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: This is a digitally signed message part
Url : http://lists.freebsd.org/pipermail/freebsd-ports/attachments/20030428/6133d830/attachment.bin


More information about the freebsd-ports mailing list