From root@shandritokkel.homeunix.org  Tue Apr  8 13:09:03 2003
Return-Path: <root@shandritokkel.homeunix.org>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 03A8737B401
	for <FreeBSD-gnats-submit@freebsd.org>; Tue,  8 Apr 2003 13:09:03 -0700 (PDT)
Received: from shandritokkel.homeunix.org (qn-213-73-250-14.quicknet.nl [213.73.250.14])
	by mx1.FreeBSD.org (Postfix) with ESMTP id E195F43FA3
	for <FreeBSD-gnats-submit@freebsd.org>; Tue,  8 Apr 2003 13:09:01 -0700 (PDT)
	(envelope-from root@shandritokkel.homeunix.org)
Received: from shandritokkel.homeunix.org (ikzqtt@localhost.tokkel [127.0.0.1])
	by shandritokkel.homeunix.org (8.12.6p2/8.12.6) with ESMTP id h38L8JQ2090181
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 8 Apr 2003 21:08:20 GMT
	(envelope-from root@shandritokkel.homeunix.org)
Received: (from root@localhost)
	by shandritokkel.homeunix.org (8.12.6p2/8.12.6/Submit) id h38L8IkF090180;
	Tue, 8 Apr 2003 21:08:18 GMT
Message-Id: <200304082108.h38L8IkF090180@shandritokkel.homeunix.org>
Date: Tue, 8 Apr 2003 21:08:18 GMT
From: Charlie & <root@shandritokkel.homeunix.org>
Reply-To: Charlie & <root@shandritokkel.homeunix.org>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: buildworld won't build, because of linking problem
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         50733
>Category:       bin
>Synopsis:       buildworld won't build, because of linking problem
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-threads
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Apr 08 13:10:17 PDT 2003
>Closed-Date:    Fri Jun 11 14:28:31 GMT 2004
>Last-Modified:  Fri Jun 11 14:28:31 GMT 2004
>Originator:     E. Klerks
>Release:        FreeBSD 5.0-RELEASE-p7 i386
>Organization:
none
>Environment:
System: FreeBSD shandritokkel.homeunix.org 5.0-RELEASE-p7 FreeBSD 5.0-RELEASE-p7 #3: Tue Apr 8 18:24:23 GMT 2003 root@shandritokkel.homeunix.org:/root/usr/obj/root/usr/src/sys/LITTLEONE i386


	
>Description:
Athlon thunderbird 1800xp 
FreeBSD 5.0-RELEASE-p7
 cat
 libc.a
	
>How-To-Repeat:
Just run make buildworld with the sources from 8 april 2003
		It fails, when it try to link cat. It gives this error:
	cc -O2 -pipe -march=athlon-tbird   -Werror -Wall -Wno-format-y2k -Wno-uninitiali
zed -Wformat=2 -Wno-format-extra-args -Werror   -static -o cat cat.o
/usr/obj/root/usr/src/i386/usr/lib/libc.a(atexit.o): In function `atexit':
atexit.o(.text+0xc0): undefined reference to `_pthread_mutex_unlock'
atexit.o(.text+0xce): undefined reference to `_pthread_mutex_lock'
atexit.o(.text+0xdc): undefined reference to `_pthread_mutex_unlock'
atexit.o(.text+0xfb): undefined reference to `_pthread_mutex_lock'
atexit.o(.text+0x10c): undefined reference to `_pthread_mutex_unlock'
atexit.o(.text+0x133): undefined reference to `_pthread_mutex_lock'
/usr/obj/root/usr/src/i386/usr/lib/libc.a(_flock_stub.o): In function `flockfile
':
_flock_stub.o(.text+0x10): undefined reference to `_pthread_self'
_flock_stub.o(.text+0x25): undefined reference to `_pthread_mutex_lock'
/usr/obj/root/usr/src/i386/usr/lib/libc.a(_flock_stub.o): In function `_flockfil
e_debug':
_flock_stub.o(.text+0x60): undefined reference to `_pthread_self'
_flock_stub.o(.text+0x75): undefined reference to `_pthread_mutex_lock'
/usr/obj/root/usr/src/i386/usr/lib/libc.a(_flock_stub.o): In function `ftrylockf
ile':
_flock_stub.o(.text+0xb5): undefined reference to `_pthread_self'
_flock_stub.o(.text+0xca): undefined reference to `_pthread_mutex_trylock'
/usr/obj/root/usr/src/i386/usr/lib/libc.a(_flock_stub.o): In function `funlockfi
le':
_flock_stub.o(.text+0x10d): undefined reference to `_pthread_self'
_flock_stub.o(.text+0x145): undefined reference to `_pthread_mutex_unlock'
*** Error code 1

Stop in /usr/src/bin/cat.
*** Error code 1

Stop in /usr/src/bin.
*** Error code 1

Stop in /usr/src.
*** Error code 1

Stop in /usr/src.
*** Error code 1

Stop in /usr/src.

	
	
>Fix:
	
	

>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->feedback 
State-Changed-By: keramida 
State-Changed-When: Wed Apr 9 02:57:23 PDT 2003 
State-Changed-Why:  
Is this with RELENG_5_0 or with 5.0-CURRENT? 

http://www.freebsd.org/cgi/query-pr.cgi?pr=50733 

From: deinos_@hotmail.com
To: freebsd-gnats-submit@FreeBSD.org, root@shandritokkel.homeunix.org
Cc:  
Subject: Re: bin/50733: feedback
Date: Wed, 9 Apr 2003 19:12:40 GMT

 Hi,
 It did happen in RELENG_5_0 after I cvsupped.
 bye edgar
 

From: deinos_@hotmail.com
To: freebsd-gnats-submit@FreeBSD.org, root@shandritokkel.homeunix.org
Cc: root@shandritokkel.homeunix.org
Subject: Re: bin/50733: buildworld won't build, because of li
Date: Thu, 10 Apr 2003 17:30:19 GMT

 Hello agian,
 I synced my sources with current and got three errors about the same undefined references,
 however buildworld didn't stop this time.
 ===> gnu/lib/libdialog
 /usr/obj/root/usr/src/i386/usr/lib/libc.a(atexit.o): In function `atexit':
 atexit.o(.text+0xc0): undefined reference to `_pthread_mutex_unlock'
 This a part of one of them I can send the whole thing if you would like.
 Greetings,
 Edgar
 

From: deinos_@hotmail.com
To: freebsd-gnats-submit@FreeBSD.org, root@shandritokkel.homeunix.org
Cc: root@shandritokkel.homeunix.org
Subject: Re: bin/50733: buildworld won't build, because of li
Date: Thu, 10 Apr 2003 17:30:19 GMT

 Hello agian,
 I synced my sources with current and got three errors about the same undefined references,
 however buildworld didn't stop this time.
 ===> gnu/lib/libdialog
 /usr/obj/root/usr/src/i386/usr/lib/libc.a(atexit.o): In function `atexit':
 atexit.o(.text+0xc0): undefined reference to `_pthread_mutex_unlock'
 This a part of one of them I can send the whole thing if you would like.
 Greetings,
 Edgar
 

From: neologism@hysteria.sk
To: freebsd-gnats-submit@FreeBSD.org, root@shandritokkel.homeunix.org
Cc:  
Subject: Re: bin/50733: buildworld won't build, because of linking problems
Date: Sun,  6 Jul 2003 12:12:32 +0200 (CEST)

 This is caused by too high optimalization (ie. above -O).. the symbols within STUB_FUNCx macros are optimalized out.. so this
 set your optimalization flag to -O and it will work..
 

From: neologism <neologism@hysteria.sk>
To: freebsd-gnats-submit@FreeBSD.org, root@shandritokkel.homeunix.org
Cc:  
Subject: Re: bin/50733: buildworld won't build, because of linking problem
Date: Sun, 06 Jul 2003 12:14:06 +0200

 This is caused by too high optimalization in /etc/make.conf (ie. above 
 -O)... Try to set this to lower level...
 
 it simply optimizes out the symbol from STUB_FUNCx macro... so this
 
 enjoy ;)
 
 neologism
 
State-Changed-From-To: feedback->analyzed 
State-Changed-By: kris 
State-Changed-When: Sat Jul 12 15:25:46 PDT 2003 
State-Changed-Why:  
Building world with optimization greater than -O1 is 
unsupported, but the information in the audit trail seems to 
identify a specific problem that might be possible to fix. 


Responsible-Changed-From-To: freebsd-bugs->threads 
Responsible-Changed-By: kris 
Responsible-Changed-When: Sat Jul 12 15:25:46 PDT 2003 
Responsible-Changed-Why:  
Building world with optimization greater than -O1 is 
unsupported, but the information in the audit trail seems to 
identify a specific problem that might be possible to fix. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=50733 
Responsible-Changed-From-To: threads->freebsd-threads 
Responsible-Changed-By: arved 
Responsible-Changed-When: Mon Aug 4 11:24:29 PDT 2003 
Responsible-Changed-Why:  
fix responsible 

http://www.freebsd.org/cgi/query-pr.cgi?pr=50733 
State-Changed-From-To: analyzed->closed 
State-Changed-By: ru 
State-Changed-When: Fri Jun 11 14:27:59 GMT 2004 
State-Changed-Why:  
No indication of interest looking into this issue. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=50733 
>Unformatted:
