PThread Issue: -pthread vs. -lpthread for a new port
michaelnottebrock at gmx.net
Mon Jan 3 18:14:24 GMT 2005
On Monday, 3. January 2005 18:56, Ulrich Spoerlein wrote:
> 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"
> > This is expected: When shared libraries are linked with -pthread, the
> > linker only resolves the necessary symbols but does not emit a DT_NEEDED
> > symbol for the resulting shared library, it only does for programs.
> > Bottom line: Pthread symbols must always be resolved through the actual
> > program. Make sure the program that uses wxruby is linked with -pthread
> > as 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.
There is no other choice. It's the same issue with perl and python (the latter
already has thread-support on by default for that reason).
,_, | Michael Nottebrock | lofi at freebsd.org
(/^ ^\) | FreeBSD - The Power to Serve | http://www.freebsd.org
\u/ | K Desktop Environment on FreeBSD | http://freebsd.kde.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-ports/attachments/20050103/2b9542f8/attachment.bin
More information about the freebsd-ports