Skip site navigation (1)Skip section navigation (2)
Date:      28 Apr 2003 23:12:33 -0400
From:      Joe Marcus Clarke <marcus@marcuscom.com>
To:        Philip Paeps <philip@paeps.cx>
Cc:        freebsd-ports@freebsd.org
Subject:   Re: Loads of undefined reference to `pthread_foo`
Message-ID:  <1051585952.41275.8.camel@shumai.marcuscom.com>
In-Reply-To: <20030429024257.GT643@juno.home.paeps.cx>
References:  <20030429002250.GM643@juno.home.paeps.cx> <1051577165.40488.5.camel@shumai.marcuscom.com> <20030429024257.GT643@juno.home.paeps.cx>

next in thread | previous in thread | raw e-mail | index | archive | help

--=-5o2hXFzyS1pfUdaKO0pl
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable

On Mon, 2003-04-28 at 22:42, Philip Paeps wrote:
> On 2003-04-28 20:46:05 (-0400), Joe Marcus Clarke <marcus@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 l=
ibxml2
> > > today.  I keep getting errors like:
> > >=20
> > >   /usr/local/lib/libxml2.so: undefined reference to `pthread_cond_sig=
nal'
> > >   [...]
> > >=20
> > > I don't know what all changed on the box either, perhaps someone coul=
d
> > > point me in the right direction towards debugging this, and preferabl=
y
> > > fixing it :-)
> >=20
> > 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 neede=
d for
> > libxml2.
> >=20
> > If this is a port in the system, let me know which one is failing.
>=20
> Mmm, it seems as though www/mod_php4 isn't compiling.  It's giving the sa=
me
> errors as above.  From work/php4.3.1/config.log:
>=20
> configure:28839: cc -o conftest -O2 -pipe  -I/usr/local/include -DHARD_SE=
RVER_LIMIT=3D512 -DDOCUMENT_LOCATION=3D"/usr/local/www/data/" -DDEFAULT_PAT=
H=3D"/usr/ local/bin:/bin:/usr/bin" -DACCEPT_FILTER_NAME=3D"httpready" -DMO=
D_SSL=3D208114 -DEAPI -DEAPI_MM -DUSE_EXPAT -DNO_IDEA=20
>         -L/usr/local/lib=20
>         -R/usr/local/lib -L/usr/local/lib conftest.c -ljpeg  -lz -lz -lcr=
ypt -lssl -lcrypto -lm  -lcrypt -lxml2 -lz -liconv -lm 1>&5=20
>         /usr/local/lib/libxml2.so: undefined reference to `pthread_cond_s=
ignal'=20
>         /usr/local/lib/libxml2.so: undefined reference to `pthread_getspe=
cific'=20
>         /usr/local/lib/libxml2.so: undefined reference to `pthread_equal'=
=20
>         /usr/local/lib/libxml2.so: undefined reference to `pthread_once'=20
>         /usr/local/lib/libxml2.so: undefined reference to `pthread_key_cr=
eate'=20
>         /usr/local/lib/libxml2.so: undefined reference to `pthread_mutex_=
unlock'=20
>         /usr/local/lib/libxml2.so: undefined reference to `pthread_self'=20
>         /usr/local/lib/libxml2.so: undefined reference to `pthread_mutex_=
destroy'=20
>         /usr/local/lib/libxml2.so: undefined reference to `pthread_mutex_=
lock'=20
>         /usr/local/lib/libxml2.so: undefined reference to `pthread_cond_w=
ait'=20
>         /usr/local/lib/libxml2.so: undefined reference to `pthread_mutex_=
init'=20
>         /usr/local/lib/libxml2.so: undefined reference to `pthread_setspe=
cific'
>=20
> [Sorry about the long line]
>=20
> I'm trying to figure out where in the configure script best to add the
> -pthread bit.

You shouldn't need to.  What does:

xml2-config --libs

report?  It should contain -pthread.

Joe

>=20
>  - Philip
--=20
PGP Key : http://www.marcuscom.com/pgp.asc

--=-5o2hXFzyS1pfUdaKO0pl
Content-Type: application/pgp-signature; name=signature.asc
Content-Description: This is a digitally signed message part

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (FreeBSD)

iD8DBQA+re2gb2iPiv4Uz4cRAm4LAJ4/cwN8g2FjK03GcP6EfN69Pcf40gCcDPdr
t6yhic21ZiUvtEhwbg4jOmA=
=vF3D
-----END PGP SIGNATURE-----

--=-5o2hXFzyS1pfUdaKO0pl--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1051585952.41275.8.camel>