I''m attempting to build a wx terminal with wxwidgets for gnuplot-4.2 on my G5 Mac with OS X 10.4.8 and Xcode-2.4 developer tools. One of the dependencies for the build is fontconfig, so I''m attempting to build fontconfig-2.4.1. After I got libxml sorted out, the make went well until it encountered the fonts that are installed in /usr/X11R6 by the Apple X11.app package. At that point I saw <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 Apparently _FSPathMakeRef is located in a framework called CoreServices.framework that is part of the Xcode-2.4 Tools (The Apple unix-porting list solved that one). For linking, the framework is included via -framework CoreServices. To solve the problem, I did an export LDFLAGS="-framework CoreServices" and the make completed successfully without errors. 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. Thanks for any suggestions. Joe
mpsuzuki@hiroshima-u.ac.jp
2006-Oct-08 00:00 UTC
[Fontconfig] X11 font interference on OS X 10.4.8
Hi, On Sat, 07 Oct 2006 14:29:33 -0600 Joe Koski <jkoski11@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