Problem with -pthread linking
alepulver at FreeBSD.org
Thu Dec 21 19:54:02 PST 2006
On Thu, 21 Dec 2006 21:03:09 +0100
Michael Nottebrock <lofi at 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?
> Using -pthread effectively means that references to threading functions always
> need to be resolved through executables instead of shared libraries, i.e.
> you'll probably need to link rlq2 itself with -pthread.
Thank you, it works now so I could update the port.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-ports/attachments/20061222/74f8be0f/signature.pgp
More information about the freebsd-ports