Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 22 Dec 2006 00:53:51 -0300
From:      Alejandro Pulver <alepulver@FreeBSD.org>
To:        Michael Nottebrock <lofi@freebsd.org>
Cc:        freebsd-ports@freebsd.org
Subject:   Re: Problem with -pthread linking
Message-ID:  <20061222005351.6847fc90@phobos.mars.bsd>
In-Reply-To: <200612212103.12737.lofi@freebsd.org>
References:  <20061221155622.618f55b0@phobos.mars.bsd> <200612212103.12737.lofi@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
--Sig_ziXlz/etQjwEZEMcgVNs7aN
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: quoted-printable

On Thu, 21 Dec 2006 21:03:09 +0100
Michael Nottebrock <lofi@freebsd.org> wrote:

> On Thursday, 21. December 2006 19:56, Alejandro Pulver wrote:
> > Hello.
> >
> > I was updating the games/r1q2 port which consists of a client
> > executable (r1q2) that loads the render (ref_gl.so) at run-time with
> > dlopen(), when I noticed it wasn't able to load it.
> >
> > The reason is that the render needs SDL, which needs pthread but
> > neither the render or SDL have a reference to pthread (even though the
> > render is linked with `sdl-config --libs` which includes '-pthread').
> >
> > If I link the render with '-lpthread' it adds the reference (is
> > reported by 'ldd') and works.
> >
> > Is there a cleaner way to do this?
>=20
> Using -pthread effectively means that references to threading functions a=
lways=20
> need to be resolved through executables instead of shared libraries, i.e.=
=20
> you'll probably need to link rlq2 itself with -pthread.
>=20

Thank you, it works now so I could update the port.

Best Regards,
Ale

--Sig_ziXlz/etQjwEZEMcgVNs7aN
Content-Type: application/pgp-signature; name=signature.asc
Content-Disposition: attachment; filename=signature.asc

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

iD8DBQFFi1bXiV05EpRcP2ERAkTSAJ9WhLgSnloTh53UBF7QAevxWZNCcQCfU34P
YA7PF+Q/hJ1bSzHzi3IZXe0=
=L91l
-----END PGP SIGNATURE-----

--Sig_ziXlz/etQjwEZEMcgVNs7aN--



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