Bug 20386 - XFree86 3.3.6 fails to build on FreeBSD 5-CURRENT
Summary: XFree86 3.3.6 fails to build on FreeBSD 5-CURRENT
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: jmz
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2000-08-03 22:30 UTC by peter.jeremy
Modified: 2000-08-04 03:39 UTC (History)
0 users

See Also:


Attachments
file.diff (658 bytes, patch)
2000-08-03 22:30 UTC, peter.jeremy
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description peter.jeremy 2000-08-03 22:30:00 UTC
	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.

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.
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)
Comment 1 jmz freebsd_committer freebsd_triage 2000-08-04 01:09:30 UTC
Responsible Changed
From-To: freebsd-ports->jmz

I am the maintainer.
Comment 2 jmz freebsd_committer freebsd_triage 2000-08-04 03:38:31 UTC
State Changed
From-To: open->closed

Patch committed. Thanks!