From higaki@hig_pj.shio.naps.kishou.go.jp  Wed Jul 28 14:47:10 2004
Return-Path: <higaki@hig_pj.shio.naps.kishou.go.jp>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 0CB0516A4CE
	for <FreeBSD-gnats-submit@freebsd.org>; Wed, 28 Jul 2004 14:47:10 +0000 (GMT)
Received: from hig_pj.shio.naps.kishou.go.jp (p11203-adsan02yokonib1-acca.kanagawa.ocn.ne.jp [218.230.176.203])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 036CB43D5D
	for <FreeBSD-gnats-submit@freebsd.org>; Wed, 28 Jul 2004 14:47:09 +0000 (GMT)
	(envelope-from higaki@hig_pj.shio.naps.kishou.go.jp)
Received: from hig_pj.shio.naps.kishou.go.jp (localhost [127.0.0.1])
	by hig_pj.shio.naps.kishou.go.jp (8.12.11/8.12.11) with ESMTP id i6SEkmfT068037
	for <FreeBSD-gnats-submit@freebsd.org>; Wed, 28 Jul 2004 23:46:59 +0900 (JST)
	(envelope-from higaki@hig_pj.shio.naps.kishou.go.jp)
Received: (from higaki@localhost)
	by hig_pj.shio.naps.kishou.go.jp (8.12.11/8.12.11/Submit) id i6SEZCAD067960;
	Wed, 28 Jul 2004 23:35:12 +0900 (JST)
	(envelope-from higaki)
Message-Id: <200407281435.i6SEZCAD067960@hig_pj.shio.naps.kishou.go.jp>
Date: Wed, 28 Jul 2004 23:35:12 +0900 (JST)
From: Masakazu HIGAKI <higamasa@dream.com>
Reply-To: Masakazu HIGAKI <higamasa@dream.com>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: x11/xorg-libraries: lack of symbols under 4-STABLE
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         69708
>Category:       ports
>Synopsis:       x11/xorg-libraries: lack of symbols under 4-STABLE
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-x11
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Wed Jul 28 14:50:27 GMT 2004
>Closed-Date:    Wed Dec 29 22:19:11 GMT 2004
>Last-Modified:  Wed Dec 29 22:19:11 GMT 2004
>Originator:     Masakazu HIGAKI
>Release:        FreeBSD 4.10-RELEASE i386
>Organization:
>Environment:
System: FreeBSD hig_pj 4.10-RELEASE FreeBSD 4.10-RELEASE #0: Fri May 28 02:18:28 JST 2004 root@hig_pj:/sys/compile/HIG_PJ i386

>Description:

Building xorg-libraries port on 4-STABLE makes
libXThrStubs.so without pthread-related symbols.
It causes failures in making ports that depend on X11 libraries.


>How-To-Repeat:

$ cd /usr/ports/x11/xorg-libraries
$ make install
$ cd ../rxvt   # or anything that uses libX11.so
$ make
  :
cc  -o rxvt command.o graphics.o grkelot.o logging.o main.o menubar.o misc.o  netdisp.o rmemset.o screen.o scrollbar.o xdefaults.o xpm.o -lxpg4 -L/usr/X11R6/lib -L/usr/X11R6/lib -lXpm -lX11 
/usr/X11R6/lib/libX11.so: undefined reference to `pthread_cond_signal'
/usr/X11R6/lib/libXThrStub.so.6: undefined reference to `_Xthr_zero_stub_'
/usr/X11R6/lib/libX11.so: undefined reference to `pthread_cond_broadcast'
/usr/X11R6/lib/libXThrStub.so.6: undefined reference to `_Xthr_self_stub_'
/usr/X11R6/lib/libX11.so: undefined reference to `pthread_cond_init'
/usr/X11R6/lib/libX11.so: undefined reference to `pthread_mutex_unlock'
/usr/X11R6/lib/libX11.so: undefined reference to `pthread_self'
/usr/X11R6/lib/libX11.so: undefined reference to `pthread_mutex_destroy'
/usr/X11R6/lib/libX11.so: undefined reference to `pthread_mutex_lock'
/usr/X11R6/lib/libX11.so: undefined reference to `pthread_cond_wait'
/usr/X11R6/lib/libX11.so: undefined reference to `pthread_cond_destroy'
/usr/X11R6/lib/libX11.so: undefined reference to `pthread_mutex_init'
*** Error code 1


>Fix:

The following might be a fix.


# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	files/patch-XThrStub-UIThrStubs.c
#
echo x - files/patch-XThrStub-UIThrStubs.c
sed 's/^X//' >files/patch-XThrStub-UIThrStubs.c << 'END-of-files/patch-XThrStub-UIThrStubs.c'
X--- lib/XThrStub/UIThrStubs.c.orig	Fri Mar  5 02:46:49 2004
X+++ lib/XThrStub/UIThrStubs.c	Wed Jul 28 20:23:18 2004
X@@ -99,7 +99,7 @@
X #else
X #include <pthread.h>
X typedef pthread_t xthread_t;
X-#if __GNUC__ >= 3
X+#if __GNUC__ >= 3 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95)
X xthread_t pthread_self()    __attribute__ ((weak, alias ("_Xthr_self_stub_")));
X int pthread_mutex_init()    __attribute__ ((weak, alias ("_Xthr_zero_stub_")));
X int pthread_mutex_destroy() __attribute__ ((weak, alias ("_Xthr_zero_stub_")));
END-of-files/patch-XThrStub-UIThrStubs.c
exit

>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->x11  
Responsible-Changed-By: krion 
Responsible-Changed-When: Wed Jul 28 18:58:06 GMT 2004 
Responsible-Changed-Why:  
Over to maintainers. 

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

From: Eric Anholt <eta@lclark.edu>
To: gnats <freebsd-gnats-submit@FreeBSD.ORG>
Cc:  
Subject: Re: ports/69708
Date: Wed, 15 Sep 2004 19:53:45 -0700

 Were you compiling with non-default CFLAGS?  That's what I would expect
 to cause this.  However, if that's the cause and this patch does fix it
 (though the pragma weak alternative to the newer __attribute__ weak
 alias should work just as well), I'd be willing to commit just to keep
 others from stumbling over it.
 
 -- 
 Eric Anholt                                eta@lclark.edu          
 http://people.freebsd.org/~anholt/         anholt@FreeBSD.org
 
 
State-Changed-From-To: open->feedback 
State-Changed-By: anholt 
State-Changed-When: Sun Sep 26 03:30:42 GMT 2004 
State-Changed-Why:  
Waiting for a response from submitter. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=69708 
State-Changed-From-To: feedback->open 
State-Changed-By: anholt 
State-Changed-When: Wed Oct 13 07:39:49 GMT 2004 
State-Changed-Why:  
Feedback received.  Patch committed upstream, will commit downstream soon. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=69708 
Responsible-Changed-From-To: x11->freebsd-x11 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Wed Nov 17 06:27:24 GMT 2004 
Responsible-Changed-Why:  
While PRs for ports maintained by x11@FreeBSD.org have for some time been 
assigned to 'x11', this creates duplicate reminder email postings to the 
mailing lists.  The canonical form should now be 'freebsd-x11'. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=69708 
State-Changed-From-To: open->closed 
State-Changed-By: anholt 
State-Changed-When: Wed Dec 29 22:18:52 GMT 2004 
State-Changed-Why:  
Should be fixed in 6.8.1. 

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