[Fontconfig] X11 font interference on OS X 10.4.8

mpsuzuki at hiroshima-u.ac.jp mpsuzuki at hiroshima-u.ac.jp
Sat Oct 7 23:53:30 PDT 2006


Hi,

On Sat, 07 Oct 2006 14:29:33 -0600
Joe Koski <jkoski11 at comcast.net> wrote:
>/usr/X11R6/lib/X11/fonts/100dpi: dyld: lazy symbol binding failed: Symbol
>not found: _FSPathMakeRef
>  Referenced from: /usr/local/lib/libfreetype.6.dylib
>  Expected in: flat namespace
>
>dyld: Symbol not found: _FSPathMakeRef
>  Referenced from: /usr/local/lib/libfreetype.6.dylib
>  Expected in: flat namespace
>
>make[2]: *** [install-data-local] Error 133
>make[1]: *** [install-am] Error 2
>make: *** [install-recursive] Error 1

>To solve the problem, I did an export LDFLAGS="-framework CoreServices"
>and the make completed successfully without errors.

As you already know, freetype-2.2.1 enables MacOS specific font
format (e.g. FOND, dfont, etc) support by default which requires
Carbon framework functions, but, freetype-config and freetype2.pc
cannot pass the appropriate linker options (for linking Carbon
frameworks) to other building systems. Therefore, you have 2
workarounds:

1. Modify freetype-config and freetype2.pc
------------------------------------------
These files are used to determine the appropriate CFLAGS/LDFLAGS,
aslike:

  freetype-config:
  - libs="-lfreetype -lz"
  + libs="-lfreetype -lz -Xlinker -framework -Xlinker CoreServices -Xlinker -framework -Xlinker ApplicationServices"

  freetype2.pc:
  - Libs: -L${libdir} -lfreetype -lz
  + Libs: -L${libdir} -lfreetype -lz -Xlinker -framework -Xlinker CoreServices -Xlinker -framework -Xlinker ApplicationServices

2. Disable MacOS specific font support
--------------------------------------

  2-a. Use freetype-2.1.10 or older which disables MacOS specific
       font support by default

  2-b. Update to latest CVS revision which disables MacOS specific
       font support by default

>During "sudo make install" I see the error reappear:
>
><snip>
> /usr/bin/install -c -m 644 ./fonts.conf /usr/local/etc/fonts/fonts.conf
> fc-cache/fc-cache -s -f -v
>/usr/share/fonts: skipping, no such directory
>/usr/X11R6/lib/X11/fonts: caching, 0 fonts, 11 dirs
>/usr/X11R6/lib/X11/fonts/100dpi: dyld: lazy symbol binding failed: Symbol
>not found: _FSPathMakeRef
>  Referenced from: /usr/local/lib/libfreetype.6.dylib
>  Expected in: flat namespace
>
>dyld: Symbol not found: _FSPathMakeRef
>  Referenced from: /usr/local/lib/libfreetype.6.dylib
>  Expected in: flat namespace
>
>make[2]: *** [install-data-local] Error 133
>make[1]: *** [install-am] Error 2
>make: *** [install-recursive] Error 1

>My questions:  How do I tell "make install" to use the Apple framework, or,
>alternatively, how do I tell fontconfig to ignore the X11 fonts? I have
>freetype-2.2.1 already built and installed.

Please check fc-cache's library dependency by otool,
aslike

$ otool -l /usr/X11R6/bin/fc-cache  | fgrep ' name '
         name /usr/lib/dyld (offset 12)
         name /usr/X11R6/lib/libfontconfig.1.dylib (offset 24)
         name /usr/X11R6/lib/libfreetype.6.dylib (offset 24)
         name /usr/X11R6/lib/libexpat.0.dylib (offset 24)
         name /usr/lib/libSystem.B.dylib (offset 24)

Does the result include Carbon frameworks and your new
freetype.6.dylib? And, please check which shared libraries
your fc-cache uses in runtime, by setting environment
DYLD_PRINT_LIBRARIES.

Regards,
mpsuzuki


More information about the Fontconfig mailing list