Bug 45567

Summary: XFree86-4-clients port fails to compile properly because of FreeType
Product: Ports & Packages Reporter: Seva Gluschenko <gvs>
Component: Individual Port(s)Assignee: Eric Anholt <anholt>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
file.diff none

Description Seva Gluschenko 2002-11-21 15:30:05 UTC
	The XFree86 Server version 4.2.1 and its apps needs FreeType2 library
	to compile certain elements. For this purpose it has its own copy of
	FreeType2 library which is being installed into /usr/X11R6.4/lib and
	refers as libfreetype.so.8. On the other hand, FreeBSD packages and
	ports use another (and maybe more recent) copy of FreeType2 library
	which is installed onto /usr/local/lib and refers as libfreetype.so.9.

	FreeBSD ports of XFree86 components don't build or install internal
	XFree86's FreeType2 library, introducing dependance from local one.
	The port's configure script doesn't specify includes and libraries,
	however, so make fails in x11perf first and in many apps later (when
	tryin' to correct makefiles).

Fix: Apply the patch below:

	cd /usr/ports/x11/XFree86-4-clients
	patch < /path/to/patch

	Now you can build the package typing

	make

	The patch follows:
How-To-Repeat: 	Try to build x11/XFree86-4-clients port from scratch. After few tons
	of screens with compiling progress you'll finish with smth like

cc -o x11perf -O -pipe -march=pentiumpro -ansi -pedantic -Dasm=__asm -Wall -Wpointer-arith     -L/usr/local/ports/x11/XFree86-4-clients/work/xc/exports/lib x11perf.o bitmaps.o do_tests.o            do_simple.o do_rects.o do_valgc.o               do_lines.o do_segs.o                do_dots.o do_windows.o do_movewin.o do_text.o                   do_blt.o do_arcs.o              do_tris.o do_complex.o do_traps.o -lXft -lfreetype -lXrender -lXrender -lXmuu -lXext -lX11 -L/usr/X11R6/lib  -lm   -Wl,-rpath,/usr/X11R6/lib
/usr/libexec/elf/ld: cannot find -lfreetype
*** Error code 1

	As you can see, no -L/usr/local/lib presented. If you try to link
	it manually by reexecuting the last line adding -L/usr/local/lib,
	the same problem will occur few apps later and finally you'll lack
	of needed header files somewhere in xterm. That all happens because
	no includes/library path had been specified for FreeType2 library.
Comment 1 Tom Hukins freebsd_committer freebsd_triage 2002-11-21 15:48:04 UTC
Responsible Changed
From-To: freebsd-ports->anholt

Over to maintainer
Comment 2 Eric Anholt 2002-11-24 08:46:42 UTC
It looks like your imake-4 is not installed right (had you installed
XFree86 4.1.0 or later from a source other than ports at some point?). 
Reinstalling that or doing a portupgrade -RfN XFree86-4-clients should
get things working properly.

-- 
Eric Anholt <eta@lclark.edu>
http://people.freebsd.org/~anholt/dri/
Comment 3 Eric Anholt freebsd_committer freebsd_triage 2002-11-25 00:19:05 UTC
State Changed
From-To: open->closed

I don't think this one is a problem with the current XFree86 ports.