Summary: | Solaris 10 / fontconfig 2.3.1 - fc-cache libiconv problem | ||
---|---|---|---|
Product: | fontconfig | Reporter: | Alexander <aom> |
Component: | fc-cache | Assignee: | Keith Packard <keithp> |
Status: | RESOLVED FIXED | QA Contact: | |
Severity: | normal | ||
Priority: | high | CC: | mauric |
Version: | 2.2 | ||
Hardware: | SPARC | ||
OS: | Solaris | ||
Whiteboard: | |||
i915 platform: | i915 features: | ||
Attachments: |
this patch should correct the bug which also appears on Solaris 2.8
proposed patch to allow both correct build and later use by other products |
Description
Alexander
2005-03-19 14:01:32 UTC
Created attachment 2346 [details] [review] this patch should correct the bug which also appears on Solaris 2.8 The problem seem to appears when the conditional support for iconv is enabled as the iconv.h header file and the iconv function are found by autoconf. I have added an automake conditional triggered by the result of the autoconf test, to allow adding -liconv to the programs that are built with libfontconfig. This solved the problem for me Hi Luc, I can confim that your patch solves the problem. Thanks, Alexander Created attachment 2392 [details] [review] proposed patch to allow both correct build and later use by other products This patch should correct the bug. Applying it adds the -liconv if necessary on the Makefile for building the local applications (fc-cache, fc-list and fc-match) and also adds it in the configured and installed fontconfig.pc file. This allows other tools relying on pkgconfig to find the fontconfig link flags to use the proper -liconv flag if it is needed. The patch did not work for me. fontconfig 2.3.2 will not compile under Solaris 8 or Solaris 9 (SPARC). It still dies at the fc-cache section. Patch v2.5.4 reported no problems applying the patch; however, Solaris 9 using GCC 3.4.3 and Solaris 8 using GCC 3.3 continue to fail compiling even though libiconv is installed on both systems in /usr/local/lib. Using Sun's default ld: ------------------------------------ gcc -g -O2 -o .libs/fc-cache fc-cache.o ../src/.libs/libfontconfig.so -L/usr/local/lib /usr/local/lib/libfreetype.so -lz /usr/local/lib/libexpat.so -R/usr/local/lib Undefined first referenced symbol in file libiconv_close ../src/.libs/libfontconfig.so libiconv_open ../src/.libs/libfontconfig.so libiconv ../src/.libs/libfontconfig.so ld: fatal: Symbol referencing errors. No output written to .libs/fc-cache collect2: ld returned 1 exit status make[2]: *** [fc-cache] Error 1 make[2]: Leaving directory `/tmp/fontconfig-2.3.2/fc-cache' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/tmp/fontconfig-2.3.2' make: *** [all] Error 2 Using GNU ld v2.16 ------------------ if gcc -DHAVE_CONFIG_H -I. -I. -I.. -I.. -I/usr/local/include/freetype2 -I/usr/local/include -g -O2 -MT fc-cache.o -MD -MP -MF ".deps/fc-cache.Tpo" \ -c -o fc-cache.o `test -f 'fc-cache.c' || echo './'`fc-cache.c; \ then mv -f ".deps/fc-cache.Tpo" ".deps/fc-cache.Po"; \ else rm -f ".deps/fc-cache.Tpo"; exit 1; \ fi /bin/bash ../libtool --mode=link gcc -g -O2 -o fc-cache fc-cache.o ../src/libfontconfig.la mkdir .libs gcc -g -O2 -o .libs/fc-cache fc-cache.o ../src/.libs/libfontconfig.so -L/usr/local/lib /usr/local/lib/libfreetype.so -lz /usr/local/lib/libexpat.so -Wl,--rpath -Wl,/usr/local/lib ../src/.libs/libfontconfig.so: undefined reference to `libiconv_open' ../src/.libs/libfontconfig.so: undefined reference to `libiconv_close' ../src/.libs/libfontconfig.so: undefined reference to `libiconv' collect2: ld returned 1 exit status make[2]: *** [fc-cache] Error 1 make[2]: Leaving directory `/tmp/fontconfig-2.3.2/fc-cache' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/tmp/fontconfig-2.3.2' make: *** [all] Error 2 *** Bug 2775 has been marked as a duplicate of this bug. *** How does this compare to the patch attached to bug 4083? > How does this compare to the patch attached to bug 4083?
That patch does not fix the problem. It allows me to add --with-libiconv=gnu but
even after running "autogen.sh && configure --with-libiconv=gnu" Makefiles of
fc-cache, fc-list and fc-match does not contain something like "-liconv".
In the meantime my workaround is to use
LDFLAGS="-R<path_to_libiconv> <path_to_libiconv>/libiconv.so"
|
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.