Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 4 Jun 2001 22:53:02 +0200
From:      Thomas Moestl <tmoestl@gmx.net>
To:        Jean-Marc Zucconi <jmz@FreeBSD.org>
Cc:        Will Andrews <will@physics.purdue.edu>, ports@FreeBSD.org, matusita@jp.FreeBSD.org
Subject:   Re: ports/x11/XFree86-4 (XFree86-4.1.0), bulid error
Message-ID:  <20010604225301.C84850@crow.dom2ip.de>
In-Reply-To: <200106041826.f54IQ6x61775@freefall.freebsd.org>; from jmz@FreeBSD.org on Mon, Jun 04, 2001 at 11:26:06AM -0700
References:  <20010605012812Z.matusita@jp.FreeBSD.org> <20010604120006.D66642@bohr.physics.purdue.edu> <200106041826.f54IQ6x61775@freefall.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 2001/06/04 at 11:26:06 -0700, Jean-Marc Zucconi wrote:
> >>>>> Will Andrews writes:
> 
>  > On Tue, Jun 05, 2001 at 01:28:12AM +0900, Makoto MATSUSHITA (matusita@jp.FreeBSD.org) wrote:
>  >> I've got build error while making XFree86 4.1.0 via ports. Here is
>  >> errorlog:
> 
>  > I reported this very same error to jmz@FreeBSD.org, the XFree86-4
>  > port maintainer, yesterday.
> 
> I got a lot of such reports. It seems that in all cases it was on a
> 4.3-STABLE system. I tested the build on 4.3-RELEASE and it worked
> fine.

I bet this will only occur if XFree86 4.0.3 or earlier was already
installed on the system, in particular, if libXft.so.1 is
installed. The 4.0.3 version of this was lacking XftDirSave. The real
point is that xftcache is used for the build process before the
library is installed. To do so, LD_LIBRARY_PATH is set to
xc/exports/lib, which is filled with the necessary symbolic links,
like this:

 LD_LIBRARY_PATH=../../../exports/lib \
 ../../../exports/bin/xftcache

This would work normally, but xftcache is build with

 USRLIBDIR = /usr/X11R6/lib
 [...]
 EXTRA_LOAD_FLAGS = -Wl,-rpath,$(USRLIBDIRPATH)
 [...]
 USRLIBDIRPATH = $(USRLIBDIR)
 [...]
 xftcache: $(OBJS) $(DEPLIBS)
	$(RM) $@
	$(CCLINK) -o $@ $(LDOPTIONS) $(OBJS) $(LOCAL_LIBRARIES) \
        $(LDLIBS)  $(EXTRA_LOAD_FLAGS)

(from xc/programs/xftcache/Makefile). The -Wl,-rpath,$(USRLIBDIRPATH)
argument means that the rpath in the built xftcache binary is set to
/usr/X11R6/lib/.
The library search order is (rpath, LD_LIBRARY_PATH, ldconfig hints,
default path). Therefore, the LD_LIBRARY_PATH argument has no effect
if the library previously existed in /usr/X11R6/lib, and the old one
is used. 
A temporary workaround is to copy the new libXft to /usr/X11/lib and
restart the build.
A possible fix (untested) may be to comment out the following in
FreeBSD.cf:

 #if OSMajorVersion > 2 || (OSMajorVersion == 2 && OSMinorVersion >= 2)
 #ifndef ExtraLoadFlags
 #if UseElfFormat
 #define ExtraLoadFlags		-Wl,-rpath,$(USRLIBDIRPATH)
 #else
 #define ExtraLoadFlags		-Wl,-R,$(USRLIBDIRPATH)
 #endif
 #endif
 #endif

I think this is there to allow multiple versions of XFree86 in
parallel, so that will probably break if this is removed.

	- thomas


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010604225301.C84850>