Subject: pkg/33858: graphics/freetype2 on darwin missing carbon dependency
To: None <,,>
From: Darrin B.Jewell <>
List: pkgsrc-bugs
Date: 06/28/2006 22:40:00
>Number:         33858
>Category:       pkg
>Synopsis:       graphics/freetype2 on darwin missing carbon dependency
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Jun 28 22:40:00 +0000 2006
>Originator:     Darrin B. Jewell
>Release:        pkgsrc trunk updated via cvs ~20060626T1843Z (during 2006Q2 freeze)

$ uname -a
Darwin Quiteria 8.7.0 Darwin Kernel Version 8.7.0: Fri May 26 15:20:53 PDT 2006; root:xnu-792.6.76.obj~1/RELEASE_PPC Power Macintosh powerpc

$ sw_vers
ProductName:	Mac OS X
ProductVersion:	10.4.7
BuildVersion:	8J135

$ gcc_select
Current default compiler:
gcc version 4.0.1 (Apple Computer, Inc. build 5341)

$ cat /Developer/Applications/
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "">
<plist version="1.0">

The freetype2 package on Darwin uses the FSPathMakeRef symbol
from the CarbinCore framework, but does not include a dependency
on that framework in its installed library.

This causes later run time problems, which can be seen in the
build process of the gnome-print package, for example.

During the gnome-print build process, the ./gnome-font-install
process will die with an error:

  dyld: lazy symbol binding failed: Symbol not found: _FSPathMakeRef
    Referenced from: /usr/pkg/lib/libfreetype.6.dylib
    Expected in: flat namespace

  dyld: Symbol not found: _FSPathMakeRef
    Referenced from: /usr/pkg/lib/libfreetype.6.dylib
    Expected in: flat namespace

However, examination of the configure file shows that
it will check for and include a reference to the carbon
library if you add --with-old-mac-fonts to its command line.
If it can't find the library, it will also add the correct
define to remove the references to it.

The fix can be verified by running
 otool -L /usr/pkg/lib/libfreetype.dylib
to see the new link command for the carbon library.


Attempt to build the print/gnome-print package on darwin


Adding --with-old-mac-fonts to the configure command line
fixes the problem.

Index: Makefile
RCS file: /cvsroot/pkgsrc/graphics/freetype2/Makefile,v
retrieving revision 1.52
diff -u -r1.52 Makefile
--- Makefile	29 May 2006 22:05:21 -0000	1.52
+++ Makefile	28 Jun 2006 22:34:20 -0000
@@ -56,6 +56,10 @@
 CONFIGURE_ENV+=		ac_cv_func_mmap_fixed_mapped=no
+.if ${OPSYS} == "Darwin"
+CONFIGURE_ARGS+=	--with-old-mac-fonts
 	cd ${WRKSRC} && ${LN} -s builds/unix/
 .if ${OPSYS} == "IRIX"