From owner-freebsd-ports Thu Aug 3 14:30: 7 2000 Delivered-To: freebsd-ports@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (Postfix) with ESMTP id B87C337B905 for ; Thu, 3 Aug 2000 14:30:01 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.9.3/8.9.2) id OAA44355; Thu, 3 Aug 2000 14:30:01 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: from alcanet.com.au (mail.alcanet.com.au [203.62.196.10]) by hub.freebsd.org (Postfix) with SMTP id 0F2F737B943 for ; Thu, 3 Aug 2000 14:26:41 -0700 (PDT) (envelope-from jeremyp@gsmx07.alcatel.com.au) Received: by border.alcanet.com.au id <115461>; Fri, 4 Aug 2000 07:25:47 +1000 Message-Id: <00Aug4.072547est.115461@border.alcanet.com.au> Date: Fri, 04 Aug 2000 06:15:46 +1000 (EST) From: peter.jeremy@ALCATEL.COM.AU Reply-To: peter.jeremy@ALCATEL.COM.AU To: FreeBSD-gnats-submit@freebsd.org, XFree86@XFree86.org X-Send-Pr-Version: 3.2 Subject: ports/20386: XFree86 3.3.6 fails to build on FreeBSD 5-CURRENT Sender: owner-freebsd-ports@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >Number: 20386 >Category: ports >Synopsis: XFree86 3.3.6 fails to build on FreeBSD 5-CURRENT >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-ports >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Thu Aug 03 14:30:00 PDT 2000 >Closed-Date: >Last-Modified: >Originator: Peter Jeremy >Release: FreeBSD 5.0-CURRENT i386 >Organization: Alcatel Australia >Environment: FreeBSD 5.0-CURRENT as of 3rd August (cvs-cur 6576) this includes a toolchain comprising gcc-2.95.2 19991024 (release) and gnu binutils 2.10.0. XFree86 3.3.6 with fix-01-r128 (built via the FreeBSD port) >Description: XFree86 3.3.6 for FreeBSD/ELF defaults to using XThreads and builds a stub library libXThrStub.so.6 which is referenced from libX11 and libXt, though it is not explicitly specified as a library dependency. When programs are linked against libX11 and/or libXt, the linker needs to locate libXThrStub.so.6. The GNU ELF linker uses -rpath-link, rather than -L to specify this search path, however this is not specified in the FreeBSD configuration file, resulting in linker failures. >How-To-Repeat: Build the XFree86 port without XFree86 installed (or with an old version prior to XThread support). This will result in all the X clients failing to build as follows: making all in programs/bitmap... ... cc -o bitmap -ansi -pedantic -Dasm=__asm -L../../exports/lib BitEdit.o CutPaste.o Graphics.o ReqMach.o Bitmap.o Dialog.o Handlers.o -lXaw -lXmu -lXt -lSM -lICE -lXext -lX11 -L/usr/X11R6/lib -lxpg4 -lm -Wl,-rpath,/usr/X11R6/lib ../../exports/lib/libXaw.so: warning: tmpnam() possibly used unsafely; consider using mkstemp() /usr/libexec/elf/ld: warning: libXThrStub.so.6, needed by ../../exports/lib/libXt.so, not found (try using --rpath) ../../exports/lib/libXt.so: undefined reference to `pthread_cond_signal' ../../exports/lib/libX11.so: undefined reference to `pthread_cond_broadcast' ../../exports/lib/libXt.so: undefined reference to `pthread_cond_init' ../../exports/lib/libXt.so: undefined reference to `pthread_mutex_unlock' ../../exports/lib/libXt.so: undefined reference to `pthread_self' ../../exports/lib/libXt.so: undefined reference to `pthread_mutex_destroy' ../../exports/lib/libXt.so: undefined reference to `pthread_mutex_lock' ../../exports/lib/libXt.so: undefined reference to `pthread_cond_wait' ../../exports/lib/libXt.so: undefined reference to `pthread_cond_destroy' ../../exports/lib/libXt.so: undefined reference to `pthread_mutex_init' *** Error code 1 (continuing) >Fix: Ensure that the link step includes a `-rpath-link $(BUILDLIBDIR)' when XFree86 is being built (!UseInstalled). The simplest way to achieve this is to remove the FreeBSD special case and use the default from bsdLib.rules, as shown below. I don't know if a similar fix is needed for the aout variant. --- xc/config/cf/FreeBSD.cf.orig Thu Aug 3 14:03:19 2000 +++ xc/config/cf/FreeBSD.cf Thu Aug 3 15:44:29 2000 @@ -132,12 +132,12 @@ * reason for FreeBSD to assume that it knows where X libraries are installed * and they can remove it from the list of directories they add to ld.so.cache * in their /etc/rc file. + * + * For the ELF case, we default to the ExtraLoadFlags in bsdLib.rules */ #if OSMajorVersion > 2 || (OSMajorVersion == 2 && OSMinorVersion >= 2) #ifndef ExtraLoadFlags -#if UseElfFormat -#define ExtraLoadFlags -Wl,-rpath,$(USRLIBDIRPATH) -#else +#if !UseElfFormat #define ExtraLoadFlags -Wl,-R,$(USRLIBDIRPATH) #endif #endif >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message