Date: Mon, 3 Jan 2005 18:56:25 +0100 From: Ulrich Spoerlein <q@uni.de> To: Michael Nottebrock <michaelnottebrock@gmx.net> Cc: freebsd-ports@freebsd.org Subject: Re: PThread Issue: -pthread vs. -lpthread for a new port Message-ID: <20050103175625.GC897@galgenberg.net> In-Reply-To: <200501031636.40424.michaelnottebrock@gmx.net> References: <20050103114221.GA897@galgenberg.net> <200501031636.40424.michaelnottebrock@gmx.net>
next in thread | previous in thread | raw e-mail | index | archive | help
--s9fJI615cBHmzTOP Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, 03.01.2005 at 16:36:36 +0100, Michael Nottebrock wrote: > > And running a ruby program requiring wxruby I get this error: > > /libexec/ld-elf.so.1: /usr/local/lib/libgthread-2.0.so.400: Undefined > > symbol "pthread_getschedparam" >=20 > This is expected: When shared libraries are linked with -pthread, the lin= ker=20 > only resolves the necessary symbols but does not emit a DT_NEEDED symbol = for=20 > the resulting shared library, it only does for programs. >=20 > Bottom line: Pthread symbols must always be resolved through the actual= =20 > program. Make sure the program that uses wxruby is linked with -pthread a= s=20 > well. wxruby.so get's loaded by ruby on demand. That is when using 'require wxruby'. I'm pretty sure we don't want to link pthread into ruby itself. % irb irb(main):001:0> require "wxruby" /libexec/ld-elf.so.1: /usr/local/lib/libgthread-2.0.so.400: Undefined symbo= l "pthread_getschedparam" % LD_PRELOAD=3D/usr/lib/libpthread.so.1 irb irb(main):001:0> require "wxruby" =3D> true irb(main):002:0> Preloading libc_r.so works too, of course. (irb is the interactive ruby shell) Ulrich Spoerlein --=20 PGP Key ID: F0DB9F44 Encrypted mail welcome! Fingerprint: F1CE D062 0CA9 ADE3 349B 2FE8 980A C6B5 F0DB 9F44 Ok, which part of "Ph'nglui mglw'nafh Cthulhu R'lyeh wgah'nagl fhtagn." didn't you understand? --s9fJI615cBHmzTOP Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.6 (FreeBSD) iD8DBQFB2YdJmArGtfDbn0QRAsaOAJ9Py5NOdbRgizrj71srj9ocpJpnzACg3XTw K/bUSA7sFz9LS7Lcpx1N0qU= =xa7J -----END PGP SIGNATURE----- --s9fJI615cBHmzTOP--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050103175625.GC897>