Date: Mon, 03 Jan 2005 12:51:27 -0600 From: "Jeremy Messenger" <mezz7@cox.net> To: "Michael Nottebrock" <michaelnottebrock@gmx.net> Cc: freebsd-ports@freebsd.org Subject: Re: PThread Issue: -pthread vs. -lpthread for a new port Message-ID: <opsj1in1vc9aq2h7@mezz.mezzweb.com> In-Reply-To: <200501031926.57723.michaelnottebrock@gmx.net> References: <20050103114221.GA897@galgenberg.net> <20050103175625.GC897@galgenberg.net> <200501031913.53106.michaelnottebrock@gmx.net> <200501031926.57723.michaelnottebrock@gmx.net>
next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 3 Jan 2005 19:26:54 +0100, Michael Nottebrock <michaelnottebrock@gmx.net> wrote: > On Monday, 3. January 2005 19:13, Michael Nottebrock wrote: >> 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). > > Looking at the ruby ports, this should actually be pretty easy to > accomplish - just depend on ruby18_r. No, it will not working on FreeBSD 5.x and 6.x, because _r is returning as null. The _r is only for FreeBSD 4.x. I had to add '-pthread' in ruby's LDFLAGS and reinstall it to solve this problem. I have the same problem with ruby-gtk2/ruby-gnome2. I have reported to knu few times and you should see my emails in cvs-ports. I also suggested to knu try to get rid of _r, because it is creating some weird problem. Enable _r options by default, but without have '_r'. http://lists.freebsd.org/pipermail/cvs-ports/2004-December/053217.html BTW: CC'ing to knu. Cheers, Mezz -- mezz7@cox.net - mezz@FreeBSD.org FreeBSD GNOME Team http://www.FreeBSD.org/gnome/ - gnome@FreeBSD.org
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?opsj1in1vc9aq2h7>