|
From: Manfred S. <man...@gm...> - 2010-03-06 12:29:09
|
Am Freitag, den 05.03.2010, 16:25 -0800 schrieb Ethan Merritt: > On Friday 05 March 2010 15:50:48 Manfred Schwarb wrote: > > > > > On Friday 05 March 2010 14:05:14 Manfred Schwarb wrote: > > > > > > and had to apply > > > > > > > > > > > > --- configure.in.orig 2010-03-01 13:44:59.000000000 +0100 > > > > > > +++ configure.in 2010-03-02 11:55:43.000000000 +0100 > > > > > > @@ -482,6 +482,7 @@ > > > > > > libgd_CPPFLAGS=`gdlib-config --cflags` > > > > > > libgd_LDFLAGS=`gdlib-config --ldflags` > > > > > > libgd_LIBS=`gdlib-config --libs` > > > > > > + libgd_LIBS="$libgd_LIBS -lexpat -pthread" > > > > > > elif test -d "$with_gd"; then > > > > > > libgd_CPPFLAGS="-I$with_gd/include" > > > > > > libgd_LDFLAGS="-L$with_gd/lib" > > > > > > > > > > That seems like a problem with the libgd package configuration tool. > > > > > I'll forward a bug report in that direction if I can confirm it. > > > > > > > > > > Ethan > > > > > > I can't reproduce this problem. > > > > > > On my machines, neither libgd nor gnuplot as a whole requires libexpat, > > > which seems to be an XML parsing tool. > > > > > > > I think it comes from libfontconfig, newer libgd versions use it > > (I use some cvs version of libgd 2.0.36 at the moment): > > > > # ldd /usr/lib64/libfontconfig.so > > linux-vdso.so.1 => (0x00007fc1d544d000) > > libfreetype.so.6 => /usr/lib64/libfreetype.so.6 (0x00007fc1d4f90000) > > libexpat.so.1 => /lib64/libexpat.so.1 (0x00007fc1d4d66000) > > libc.so.6 => /lib64/libc.so.6 (0x00007fc1d4a0b000) > > libz.so.1 => /lib64/libz.so.1 (0x00007fc1d47f5000) > > /lib64/ld-linux-x86-64.so.2 (0x00007fc1d544e000) > > > > # ldd /usr/local/lib/libgd.so > > linux-vdso.so.1 => (0x00007fff9caea000) > > libjpeg.so.62 => /usr/lib64/libjpeg.so.62 (0x00007fa27ef78000) > > libfontconfig.so.1 => /usr/lib64/libfontconfig.so.1 (0x00007fa27ed42000) > > libfreetype.so.6 => /usr/lib64/libfreetype.so.6 (0x00007fa27eabc000) > > libpng12.so.0 => /usr/lib64/libpng12.so.0 (0x00007fa27e894000) > > libz.so.1 => /lib64/libz.so.1 (0x00007fa27e67d000) > > libm.so.6 => /lib64/libm.so.6 (0x00007fa27e428000) > > libc.so.6 => /lib64/libc.so.6 (0x00007fa27e0cd000) > > libexpat.so.1 => /lib64/libexpat.so.1 (0x00007fa27dea3000) > > /lib64/ld-linux-x86-64.so.2 (0x00007fa27f3e7000) > > Huh. I also am using libgd 2.0.36, built from source. > It does link to libfreetype and to libfontconfig, but nowhere in the chain > is there a dependence on libexpat: > > stonelion [3] ldd /home/local/src/gd-2.0.36/.libs/libgd.so.2 > linux-gate.so.1 => (0xffffe000) > libXpm.so.4 => /usr/lib/libXpm.so.4 (0xb7851000) > libX11.so.6 => /usr/lib/libX11.so.6 (0xb771f000) > libjpeg.so.62 => /usr/lib/libjpeg.so.62 (0xb76fc000) > libfontconfig.so.1 => /usr/lib/libfontconfig.so.1 (0xb76c8000) > libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0xb7644000) > libpng12.so.0 => /usr/lib/libpng12.so.0 (0xb7619000) > libz.so.1 => /lib/libz.so.1 (0xb7606000) > libm.so.6 => /lib/i686/libm.so.6 (0xb75de000) > libc.so.6 => /lib/i686/libc.so.6 (0xb747d000) > libxcb.so.1 => /usr/lib/libxcb.so.1 (0xb745f000) > libdl.so.2 => /lib/libdl.so.2 (0xb7459000) > libxml2.so.2 => /usr/lib/libxml2.so.2 (0xb7318000) > /lib/ld-linux.so.2 (0xb78c0000) > libXau.so.6 => /usr/lib/libXau.so.6 (0xb7314000) > libXdmcp.so.6 => /usr/lib/libXdmcp.so.6 (0xb730d000) > stonelion [4] ldd /usr/lib/libfontconfig.so.1 > linux-gate.so.1 => (0xffffe000) > libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0xb762e000) > libxml2.so.2 => /usr/lib/libxml2.so.2 (0xb74ed000) > libc.so.6 => /lib/i686/libc.so.6 (0xb738c000) > libz.so.1 => /lib/libz.so.1 (0xb7379000) > libdl.so.2 => /lib/libdl.so.2 (0xb7373000) > libm.so.6 => /lib/i686/libm.so.6 (0xb734b000) > /lib/ld-linux.so.2 (0xb7700000) > stonelion [5] ldd /usr/lib/libxml2.so.2 > linux-gate.so.1 => (0xffffe000) > libdl.so.2 => /lib/libdl.so.2 (0xb7637000) > libz.so.1 => /lib/libz.so.1 (0xb7624000) > libm.so.6 => /lib/i686/libm.so.6 (0xb75fc000) > libc.so.6 => /lib/i686/libc.so.6 (0xb749b000) > /lib/ld-linux.so.2 (0xb7798000) > stonelion [6] ldd /usr/lib/libfreetype.so.6 > linux-gate.so.1 => (0xffffe000) > libz.so.1 => /lib/libz.so.1 (0xb7762000) > libc.so.6 => /lib/i686/libc.so.6 (0xb7601000) > /lib/ld-linux.so.2 (0xb7813000) > > So I certainly believe you that your machine is trying to pull in > libexpat, but I don't know where/why this dependency creeps in. > One of life's little mysteries :-) > I did some digging, it seems you can build libfontconfig either with libexpat or with libxml2, at your will. My distribution (OpenSuse) decided to build libfontconfig with "configure --enable-libxml2=no", so that libexpat is used. No idea why they did like this. What is your "gdlib-config --libs" output? Does it mention "-lxml2"? So then only the libexpat case would be broken. For the pthreads thing, perhaps this is dependent on the glibc and/or gcc used, in my case it is glibc 2.10.1 and gcc 4.4.1. Manfred > cheers, > Ethan > > > > > > > But "gdlib-config --libs" gives: > > -ljpeg -lfontconfig -lfreetype -lpng12 -lz -lm > > > > So it seems libgd does not add all needed libraries to gdlib-config. > > > > > > > And libpthread is pulled in by practically everything, so adding it > > > specifically to libgd_LIBS is redundant. > > > > > > What was the error message you got before adding this line to > > > configure.in? > > > > > > > > > from config.log: > > configure:11686: checking for gdImageStringFT in -lgd > > configure:11721: gcc -o conftest -g -O2 -I/usr/local/include -static -s -L/usr/local/lib -L/usr/lib64 -L/lib conftest.c -lgd -lm -ljpeg -lfontconfig -lfreetype -lpng12 -lz -lm -ljpeg -lfreetype >&5 > > /usr/local/lib/libgd.a(gdft.o): In function `gdFontCacheSetup': > > /tmp/libgd/gd-libgd-20/gdft.c:826: undefined reference to `pthread_mutex_init' > > /tmp/libgd/gd-libgd-20/gdft.c:829: undefined reference to `pthread_mutex_destroy' > > ... > > /usr/lib64/libfontconfig.a(fcxml.o): In function `FcConfigMessage': > > /tmp/fontconfig-2.7.0/fontconfig-2.7.0/src/fcxml.c:476: undefined reference to `XML_GetCurrentLineNumber' > > /tmp/fontconfig-2.7.0/fontconfig-2.7.0/src/fcxml.c:479: undefined reference to `XML_GetCurrentLineNumber' > > ... > > > > > > Cheers, Manfred |