Home Posts


I wish Fink could always "just work"

Fink works almost all of the time, and if something’s missing, it’s surprisingly easy to write a package description. But when Fink breaks, it makes for an unpleasant user experience. Granted, I work off the “unstable” tree, but it’s not my fault that’s the only place to get anything remotely recent.

The build error I ran across was reported over a month ago, and it’s a little riling that it wasn’t yet fixed and that the suggested solution I found was to install a third-party update (XQuartz) to an Apple package (X11). Details below the fold…

The problem was that newer Apple releases of X11 take away a .la file. The quick solution is to install the latest XQuartz. This gets you an X11 with the missing bits. Here’s the symptom/error:

dpkg-deb -b /sw/src/fink.build/root-fink-buildlock-fontconfig2-dev-2.4.1-105 /sw/src/fink.build
dpkg-deb: building package `fink-buildlock-fontconfig2-dev-2.4.1-105' in `/sw/src/fink.build/fink-buildlock-fontconfig2-dev-2.4.1-105_2009.01.11-11.25.51_darwin-i386.deb'.
Installing build-lock package...
/sw/bin/dpkg-lockwait -i /sw/src/fink.build/fink-buildlock-fontconfig2-dev-2.4.1-105_2009.01.11-11.25.51_darwin-i386.deb
Selecting previously deselected package fink-buildlock-fontconfig2-dev-2.4.1-105.
(Reading database ... 19148 files and directories currently installed.)
Unpacking fink-buildlock-fontconfig2-dev-2.4.1-105 (from .../fink-buildlock-fontconfig2-dev-2.4.1-105_2009.01.11-11.25.51_darwin-i386.deb) ...
Setting up fink-buildlock-fontconfig2-dev-2.4.1-105 (2009.01.11-11.25.51) ...
echo "no compilation necessary"
no compilation necessary
/bin/rm -rf /sw/src/fink.build/root-fontconfig2-dev-2.4.1-105
/bin/mkdir -p /sw/src/fink.build/root-fontconfig2-dev-2.4.1-105/sw
/bin/mkdir -p /sw/src/fink.build/root-fontconfig2-dev-2.4.1-105/DEBIAN
/usr/sbin/chown -R root:admin /sw/src/fink.build/root-fontconfig2-dev-2.4.1-105
/var/tmp/tmp.1.xVnrbM
#!/bin/sh -ev

	FC_ROOT="/sw/src/fink.build/root-fontconfig2-dev-2.4.1-105/sw/lib/fontconfig2"
	FC_LIB="/sw/lib/fontconfig2/lib"
	FT_LIB="/sw/lib/freetype219/lib"
	X11_ROOT="/usr/X11"

	declare -a bad_files

	bad_file() {
		bad_files[${#bad_files[*]}]="$1"
	}

	install -d -m 755 $FC_ROOT/{bin,include,lib,lib/pkgconfig}

	for file in \
		fcfreetype.h \
		fcprivate.h \
		fontconfig.h \
	; do
		[ -e "$X11_ROOT/include/fontconfig/$file" ] || bad_file "$X11_ROOT/include/fontconfig/$file"
	done

	for file in \
		include/fontconfig \
		lib/libfontconfig.1.dylib \
		lib/libfontconfig.dylib \
		bin/fc-cache \
		bin/fc-cat \
		bin/fc-list \
		bin/fc-match \
	; do
		[ -e "$X11_ROOT/$file" ] || bad_file "$X11_ROOT/$file"
		/bin/ln -sfh "$X11_ROOT/$file" "$FC_ROOT/$file"
	done

	# Use fink's freetype219 and expat1
	sed -e "s|-L$X11_ROOT/lib||g" \
	    -e "s|$X11_ROOT/lib/libfreetype.la|-L$FT_LIB $FT_LIB/libfreetype.la|" \
	    -e "s|/usr/lib/libexpat.la|-L/sw/lib /sw/lib/libexpat.la|" \
	    -e "s|libdir=$X11_ROOT/lib|libdir=$FC_LIB|" \
	    -e "s|libfontconfig\.[0-9]*\.[0-9]*\.[0-9]*\.dylib||" \
	"$X11_ROOT/lib/libfontconfig.la" > "$FC_ROOT/lib/libfontconfig.fink.la"
sed: /usr/X11/lib/libfontconfig.la: No such file or directory
### execution of /var/tmp/tmp.1.xVnrbM failed, exit code 1
Removing runtime build-lock...
Removing build-lock package...
/sw/bin/dpkg-lockwait -r fink-buildlock-fontconfig2-dev-2.4.1-105
(Reading database ... 19149 files and directories currently installed.)
Removing fink-buildlock-fontconfig2-dev-2.4.1-105 ...
Failed: phase installing: fontconfig2-dev-2.4.1-105 failed
Thomas Kho - 11 Jan 2009



The opinions expressed on this site are mine and do not necessarily represent those of my employer.