From owner-freebsd-current Sat May 30 22:30:34 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id WAA05774 for freebsd-current-outgoing; Sat, 30 May 1998 22:30:34 -0700 (PDT) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from cimlogic.com.au (cimlog.lnk.telstra.net [139.130.51.31]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id WAA05759 for ; Sat, 30 May 1998 22:30:31 -0700 (PDT) (envelope-from jb@cimlogic.com.au) Received: (from jb@localhost) by cimlogic.com.au (8.8.8/8.8.7) id PAA13512; Sun, 31 May 1998 15:38:56 +1000 (EST) (envelope-from jb) From: John Birrell Message-Id: <199805310538.PAA13512@cimlogic.com.au> Subject: Re: pthreads and thread-specific? In-Reply-To: <199805310521.WAA19570@rah.star-gate.com> from Amancio Hasty at "May 30, 98 10:21:00 pm" To: hasty@rah.star-gate.com (Amancio Hasty) Date: Sun, 31 May 1998 15:38:56 +1000 (EST) Cc: jb@cimlogic.com.au, current@FreeBSD.ORG X-Mailer: ELM [version 2.4ME+ PL40 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Amancio Hasty wrote: > > {hasty} ldd Barrier_Test > Barrier_Test: > libACE.so => /usr/lib/libACE.so (0x28052000) > libc_r.so.3 => /usr/lib/libc_r.so.3 (0x2815b000) > libstdc++.so.2 => /usr/lib/libstdc++.so.2 (0x281e3000) > libg++.so.4 => /usr/lib/libg++.so.4 (0x2821a000) > libm.so.2 => /usr/lib/libm.so.2 (0x28257000) > libc.so.3 => /usr/lib/libc.so.3 (0x28271000) > libc_r.so.3 => /usr/lib/libc_r.so.3 (0x2815b000) If you used gcc -pthread to link the program, libc shouldn't be there _at all_ and libc_r should be last. If this list is the order that the linker resolved symbols, then any libc/libc_r functions that libstdc++ and libg++ reference (that haven't already been referenced by libACE and directly by your application) will use those from libc, not libc_r. > libstdc++.so.2 => /usr/lib/libstdc++.so.2 (0x281e3000) > libg++.so.4 => /usr/lib/libg++.so.4 (0x2821a000) > libm.so.2 => /usr/lib/libm.so.2 (0x28257000) > > Looks like I am pulling the right libraries. I will browse at the > code a little bit more. I beg to differ. Please link your application properly using gcc -pthread and don't declare libc_r on the command line. -- John Birrell - jb@cimlogic.com.au; jb@freebsd.org http://www.cimlogic.com.au/ CIMlogic Pty Ltd, GPO Box 117A, Melbourne Vic 3001, Australia +61 418 353 137 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message