From owner-freebsd-current Sun Nov 24 17: 8:15 2002 Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 02BF037B401 for ; Sun, 24 Nov 2002 17:08:14 -0800 (PST) Received: from majordomo.vol.cz (smtp4.vol.cz [195.250.128.43]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6093143E88 for ; Sun, 24 Nov 2002 17:08:12 -0800 (PST) (envelope-from dan@obluda.cz) Received: from obluda.cz (xkulesh.vol.cz [195.250.154.106]) by majordomo.vol.cz (8.12.6/8.12.6) with ESMTP id gAP1842P062857 for ; Mon, 25 Nov 2002 02:08:05 +0100 (CET) (envelope-from dan@obluda.cz) Message-ID: <3DE16DE9.3000700@obluda.cz> Date: Mon, 25 Nov 2002 01:25:13 +0100 From: Dan Lukes User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.2b) Gecko/20021106 X-Accept-Language: en, cs MIME-Version: 1.0 To: freebsd-current@freebsd.org Subject: Re: buildworld fails on x86 References: <200211221152.27184.david_realityrift.com@ns.sol.net> In-Reply-To: <200211221152.27184.david_realityrift.com@ns.sol.net> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG > On Friday 22 November 2002 09.03, David Holm wrote: > > Hi, > > I've tried to build world since yesterday, doing cvsup's inbetween hopi= > ng > > for a fix. But it always fails on bin/cat with a bunch of unresolvable > > pthread symbols at linking. I have cleared out my old /usr/obj. > > cat cat.o > > /usr/obj/usr/src/i386/usr/lib/libc.a(atexit.o): In function `atexit': > > atexit.o(.text+0xc7): undefined reference to `_pthread_mutex_unlock' > > atexit.o(.text+0xd8): undefined reference to `_pthread_mutex_lock' > > atexit.o(.text+0xe8): undefined reference to `_pthread_mutex_unlock' > > atexit.o(.text+0x109): undefined reference to `_pthread_mutex_lock' > > atexit.o(.text+0x11a): undefined reference to david@realityrift.com wrote, On 11/22/02 11:52: > Ok, > found it. I forgot to disable my CFLAGS for ports ;). Well, we shouldn't use optimisation (-O3) during buildworlds as it's not recommended. On the oposite side, we should try to produce the optimisable source code. The problem you hit is that the pthread stub functions as declared within src/lib/libc/gen/_pthread_stubs.c are optimized-out by "-O3" causing undefined symbol errors later during build. I don't know if it is gcc's optimiser bug or there is something wrong with _pthread_stubs.c code, but someone who knows should report and/or repair it. Dan -- Dan Lukes tel: +420 2 21914205, fax: +420 2 21914206 root of FIONet, KolejNET, webmaster of www.freebsd.cz AKA: dan@obluda.cz, dan@freebsd.cz,dan@kolej.mff.cuni.cz To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message