[Fontconfig] build fails on x86_64 because of bad libtool RUNPATH order (FcFini)
Poor Yorick
org.freedesktop.lists.fontconfig at pooryorick.com
Sat Dec 22 13:57:00 PST 2007
Compiling fontconfig on an NFS volume used by nodes on a compute grid, the build fails with the following error:
make[2]: Entering directory `/path/to/src/fontconfig-2.5.0_linux/fontconfig-2.5.0/test'
Fontconfig warning: line 3: unknown element "cachedir"
/path/to/src/fontconfig-2.5.0_linux/fontconfig-2.5.0/fc-list/.libs/lt-fc-list: symbol lookup error: /path/to/src/fontconfig-2.5.0_linux/fontconfig-2.5.0/fc-list/.
libs/lt-fc-list: undefined symbol: FcFini
Fontconfig warning: line 3: unknown element "cachedir"
It turns out that the libtool execution wrapper fc-list has explicitly added /usr/lib64 in front of /path/to/src/fontconfig-2.5.0_linux/fontconfig-2.5.0/src/.libs causing lt-fc-list to find an older libfontconfig.so. Here is the relevant snippet from fc-list (part of the relink_command variable):
gcc -m64 -g -O2 -Wl,-rpath -Wl,/path/to/lib -Wl,--enable-new-dtags -o \$progdir/\$file fc-list.o -Wl,--rpath -Wl,/path/to/freetype-2.3.5/lib -L/path/to/lib -L/path/to/freetype-2.3.5/lib /path/to/freetype-2.3.5/lib/libfreetype.so -lz /usr/lib64/libexpat.so ../src/.libs/libfontconfig.so -Wl,--rpath -Wl,/path/to/freetype-2.3.5/lib -Wl,--rpath -Wl,/usr/lib64 -Wl,--rpath -Wl,/path/to/src/fontconfig-2.5.0_linux/fontconfig-2.5.0/src/.libs -Wl,--rpath -Wl,/path/to/freetype-2.3.5/lib -Wl,--rpath -Wl,/usr/lib64 -Wl,--rpath -Wl,/path/to/fontconfig-2.5.0/lib
What is the best way fix/hack around this problem?
--
Poor Yorick
More information about the Fontconfig
mailing list