From owner-freebsd-stable@FreeBSD.ORG Wed Jun 1 18:56:48 2005 Return-Path: X-Original-To: freebsd-stable@freebsd.org Delivered-To: freebsd-stable@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B9E3F16A41C; Wed, 1 Jun 2005 18:56:48 +0000 (GMT) (envelope-from benlutz@datacomm.ch) Received: from maxlor.mine.nu (c-213-160-32-54.customer.ggaweb.ch [213.160.32.54]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4DD3243D1F; Wed, 1 Jun 2005 18:56:48 +0000 (GMT) (envelope-from benlutz@datacomm.ch) Received: from localhost (localhost [127.0.0.1]) by maxlor.mine.nu (Postfix) with ESMTP id C1E60245; Wed, 1 Jun 2005 20:56:37 +0200 (CEST) Received: from maxlor.mine.nu ([127.0.0.1]) by localhost (midgard [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 04938-02; Wed, 1 Jun 2005 20:56:37 +0200 (CEST) Received: from [10.0.0.23] (mini.intranet [10.0.0.23]) by maxlor.mine.nu (Postfix) with ESMTP id E73FF14; Wed, 1 Jun 2005 20:56:36 +0200 (CEST) Message-ID: <429E04E9.5020008@datacomm.ch> Date: Wed, 01 Jun 2005 20:56:41 +0200 From: Benjamin Lutz User-Agent: Mozilla Thunderbird 1.0.2 (Macintosh/20050317) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Daniel Eischen References: In-Reply-To: X-Enigmail-Version: 0.90.1.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig79BF18CE206347F128D2CC30" X-Virus-Scanned: by amavisd-new at maxlor.mine.nu Cc: freebsd-stable@freebsd.org, Brent Casavant Subject: Re: libpthread problem (segfaults) X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Jun 2005 18:56:48 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig79BF18CE206347F128D2CC30 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit > No, gcc (the linker really) is doing exactly what you are > telling it. The linker already brings in libc, you have > to use -nostdlib to prevent it. You must link to objects > in the correct order. libpthread, libthr, and libc_r all > provide some functions that are overloaded from libc. > When you link to libc first, you get the libc versions of > those functions instead of the thread versions of them. Ah, thanks! That makes sense now! I had assumed it somehow links libc twice, but if it's really an order issue, all becomes clear! >>And, something in the 5.3->5.4 upgrade process went wrong which left me >>with a broken libpthread. Can't say what exactly, maybe my system was >>slightly broken to begin with. > > libpthread ain't broke; your applications are probably linked > incorrectly. I'm not saying the code is broken, just my binaries. I've now replaced them with files from a clean installation, and all is well. Cheers Benjamin --------------enig79BF18CE206347F128D2CC30 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (Darwin) iD8DBQFCngTtgShs4qbRdeQRAo5XAKCGS7x7yJFGn+/wuNHCHQqYjkqyPACeI33X krANLzjGFrhLffHspql9pLM= =Khrj -----END PGP SIGNATURE----- --------------enig79BF18CE206347F128D2CC30--