Date: Thu, 21 Dec 2006 21:03:09 +0100 From: Michael Nottebrock <lofi@freebsd.org> To: freebsd-ports@freebsd.org Cc: Alejandro Pulver <alepulver@freebsd.org> Subject: Re: Problem with -pthread linking Message-ID: <200612212103.12737.lofi@freebsd.org> In-Reply-To: <20061221155622.618f55b0@phobos.mars.bsd> References: <20061221155622.618f55b0@phobos.mars.bsd>
next in thread | previous in thread | raw e-mail | index | archive | help
--nextPart2131207.d2ZIs9X6sQ Content-Type: text/plain; charset="iso-8859-6" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline 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 alw= ays=20 need to be resolved through executables instead of shared libraries, i.e.=20 you'll probably need to link rlq2 itself with -pthread. Cheers, =2D-=20 ,_, | Michael Nottebrock | lofi@freebsd.org (/^ ^\) | FreeBSD - The Power to Serve | http://www.freebsd.org \u/ | K Desktop Environment on FreeBSD | http://freebsd.kde.org --nextPart2131207.d2ZIs9X6sQ Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (FreeBSD) iD8DBQBFiuiAXhc68WspdLARAgM0AJwLZwIwHKr38jQCRmHdnl5LzFFXzgCgi1Xs U9uMsSDKw2JRWsf0L4b75T4= =DvuR -----END PGP SIGNATURE----- --nextPart2131207.d2ZIs9X6sQ--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200612212103.12737.lofi>