ALT_FREETYPE_LIB and relocation

Henri Gomez henri.gomez at gmail.com
Sat Oct 13 06:09:49 PDT 2012


Hi to all,

I'm trying to remove OSX dependencies on X11.
fontmanager require freetype which in turn require X11 on SnowLeopard and Lion.
Problem, there is no more X11 on Mountain Lion and XQuartz is proposed
by Apple alert during runtime.

I used a trick available for Linux, defining ALT_FREETYPE_LIB_PATH and
ALT_FREETYPE_HEADERS_PATH.

    export ALT_FREETYPE_LIB_PATH=$DROP_DIR/freetype/lib
    export ALT_FREETYPE_HEADERS_PATH=$DROP_DIR/freetype/include

I built freetype 2.4.10 on OSX (no X11 required) and provided
ALT_FREETYPE_LIB_PATH and ALT_FREETYPE_HEADERS_PATH at make time.
But fontmanager reference freetype dylib in path whereas freetype is
included in delivery for Linux.

libfontmanager.dylib:
        @rpath/libfontmanager.dylib (compatibility version 1.0.0,
current version 1.0.0)
        /Users/henri/Documents/jenkins/data/DROP_DIR/freetype/lib/libfreetype.6.dylib
(compatibility version 15.0.0, current version 15.1.0)
        @rpath/libawt.dylib (compatibility version 1.0.0, current version 1.0.0)
        /usr/lib/libSystem.B.dylib (compatibility version 1.0.0,
current version 159.1.0)
        /usr/lib/libstdc++.6.dylib (compatibility version 7.0.0,
current version 52.0.0)
        @rpath/libjava.dylib (compatibility version 1.0.0, current
version 1.0.0)
        @rpath/libjvm.dylib (compatibility version 1.0.0, current version 1.0.0)

So we should have instead libfreetype.6.dylib copied under ire and
referenced with @rpath like this :

libfontmanager.dylib:
        @rpath/libfontmanager.dylib (compatibility version 1.0.0,
current version 1.0.0)
        @@rpath/libfreetype.6.dylib (compatibility version 15.0.0,
current version 15.1.0)
        @rpath/libawt.dylib (compatibility version 1.0.0, current version 1.0.0)
        /usr/lib/libSystem.B.dylib (compatibility version 1.0.0,
current version 159.1.0)
        /usr/lib/libstdc++.6.dylib (compatibility version 7.0.0,
current version 52.0.0)
        @rpath/libjava.dylib (compatibility version 1.0.0, current
version 1.0.0)
        @rpath/libjvm.dylib (compatibility version 1.0.0, current version 1.0.0)

Did someone works on this or should I provide a fix for OpenJDK 7, 8
and others ?



More information about the jdk7u-dev mailing list