[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#879801: ftbfs with icu from experimental



On 04.12.2017 15:17, Norbert Preining wrote:

Hi Norbert,

> Trying to mimic this with pkg-config seems to be a bit tricky.
> 
> I am not sure whether replacement of
>   icu-config --cppflags
> with
>   pkg-config --cflags icu-uc icu-io
> and 
>   icu-config --ldflags-searchpath  --ldflags-libsonly --ldflags-system
> with
>   pkg-config --libs icu-uc icu-io
> is enough, but I will try out at some point...
> 
I experimented a little bit w/ your suggestions, but failed to compile
texlive with icu.
Attached is a patch from my side. The configure run is OK, but linking
XeTeX in the end fails due to missing symbols (last part of build log is
attached). The pkg-config command I used in the patch should be OK, as
the symbol is in libicuuc.so (AFAICT):

hille@amd64-sid:~/...$ pkg-config --libs icu-uc
-licuuc -licudata
hille@amd64-sid:~/...$ for i in /usr/lib/x86_64-linux-gnu/libicu*so; do
echo $i; nm -DC $i|grep u_versionToString_57; done
/usr/lib/x86_64-linux-gnu/libicudata.so
/usr/lib/x86_64-linux-gnu/libicui18n.so
/usr/lib/x86_64-linux-gnu/libicuio.so
/usr/lib/x86_64-linux-gnu/libicule.so
/usr/lib/x86_64-linux-gnu/libiculx.so
/usr/lib/x86_64-linux-gnu/libicutest.so
/usr/lib/x86_64-linux-gnu/libicutu.so
                 U u_versionToString_57
/usr/lib/x86_64-linux-gnu/libicuuc.so
000000000005ee40 T u_versionToString_57

I'd say that the value of ICU_LIBS is OK (don't wonder about that 57
above, I simply renamed icu-config from the unstable package and would
expect that it falls back to pkg-config).
When looking at the linker command line one notices that the two options
"-licuuc -licudata" are not handed over to the libtool command. So the
options are lost somewhere.

Do you have further ideas?

Hilmar
-- 
http://www.hilmar-preusse.de.vu/   #206401 http://counter.li.org
/bin/sh ./libtool  --tag=CXX   --mode=link g++  -g -O2 -fdebug-prefix-map=/home/hille/texlive-bin-2017.20170613.44572=. -fstack-protector-strong -Wformat -Werror=format-security  -Wl,-z,relro -o xetex xetexdir/xetex-xetexextra.o synctexdir/xetex-synctex.o xetex-xetexini.o xetex-xetex0.o xetex-xetex-pool.o libxetex.a -lharfbuzz-icu -lharfbuzz -lgraphite2   /home/hille/texlive-bin-2017.20170613.44572/Work/libs/teckit/libTECkit.a -lpoppler -lpng16 -lz -L/usr/lib/x86_64-linux-gnu -lfreetype -lz libmd5.a -lfontconfig -lfreetype lib/lib.a /home/hille/texlive-bin-2017.20170613.44572/Work/texk/kpathsea/libkpathsea.la  -lm 
libtool: link: g++ -g -O2 -fdebug-prefix-map=/home/hille/texlive-bin-2017.20170613.44572=. -fstack-protector-strong -Wformat -Werror=format-security -Wl,-z -Wl,relro -o .libs/xetex xetexdir/xetex-xetexextra.o synctexdir/xetex-synctex.o xetex-xetexini.o xetex-xetex0.o xetex-xetex-pool.o  libxetex.a -lharfbuzz-icu -lharfbuzz -lgraphite2 /home/hille/texlive-bin-2017.20170613.44572/Work/libs/teckit/libTECkit.a -lpoppler -lpng16 -L/usr/lib/x86_64-linux-gnu -lz libmd5.a -lfontconfig /usr/lib/x86_64-linux-gnu/libfreetype.so lib/lib.a /home/hille/texlive-bin-2017.20170613.44572/Work/texk/kpathsea/.libs/libkpathsea.so -lm
/usr/bin/ld: libxetex.a(libxetex_a-XeTeX_ext.o): undefined reference to symbol 'u_versionToString_57'
//usr/lib/x86_64-linux-gnu/libicuuc.so.57: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
Makefile:5223: recipe for target 'xetex' failed
make[6]: *** [xetex] Error 1
make[6]: Leaving directory '/home/hille/texlive-bin-2017.20170613.44572/Work/texk/web2c'
Makefile:13394: recipe for target 'all-recursive' failed
make[5]: *** [all-recursive] Error 1
make[5]: Leaving directory '/home/hille/texlive-bin-2017.20170613.44572/Work/texk/web2c'
Makefile:3820: recipe for target 'all' failed
make[4]: *** [all] Error 2
make[4]: Leaving directory '/home/hille/texlive-bin-2017.20170613.44572/Work/texk/web2c'
Makefile:869: recipe for target 'recurse' failed
make[3]: *** [recurse] Error 1
make[3]: Leaving directory '/home/hille/texlive-bin-2017.20170613.44572/Work/texk'
Makefile:449: recipe for target 'all-recursive' failed
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory '/home/hille/texlive-bin-2017.20170613.44572/Work/texk'
Makefile:540: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/home/hille/texlive-bin-2017.20170613.44572/Work'
dh_auto_build: cd Work && make -j1 returned exit code 2
debian/rules:67: recipe for target 'build' failed
make: *** [build] Error 2
hille@amd64-sid:~/texlive-bin-2017.20170613.44572$ 

Index: texlive-bin-2017.20170613.44572/m4/kpse-icu-flags.m4
===================================================================
--- texlive-bin-2017.20170613.44572.orig/m4/kpse-icu-flags.m4
+++ texlive-bin-2017.20170613.44572/m4/kpse-icu-flags.m4
@@ -49,11 +49,15 @@ m4_ifval([$1],
 AC_DEFUN([KPSE_ICU_SYSTEM_FLAGS], [dnl
 AC_REQUIRE([AC_CANONICAL_HOST])[]dnl
 AC_CHECK_TOOL([ICU_CONFIG], [icu-config], [false])[]dnl
+AC_CHECK_TOOL([PKG_CONFIG], [pkg-config], [false])[]dnl
 if $ICU_CONFIG --version >/dev/null 2>&1; then
   ICU_INCLUDES=`$ICU_CONFIG --cppflags`
   ICU_LIBS=`$ICU_CONFIG --ldflags-searchpath m4_ifset([kpse_icu_config_args],
                                                       [kpse_icu_config_args ])--ldflags-libsonly --ldflags-system`
+elif $PKG_CONFIG --libs icu-i18n >/dev/null 2>&1; then
+  ICU_INCLUDES=`$PKG_CONFIG --cflags icu-uc icu-io`
+  ICU_LIBS=`$PKG_CONFIG --libs icu-uc`
 elif test "x$need_icu:$with_system_icu" = xyes:yes; then
-  AC_MSG_ERROR([did not find icu-config required for system icu libraries])
+  AC_MSG_ERROR([did not find icu-config or pkg-config required for system icu libraries])
 fi
 ]) # KPSE_ICU_SYSTEM_FLAGS

Reply to: