Bug#603299: cimg: FTBFS with binutils-gold because of missing libX11 when linking the examples
Andreas Tille
andreas at an3as.eu
Sat Nov 13 15:29:28 UTC 2010
Hi,
I tried to apply your patch to fix the build issue and upload it with the new
upstream version (1.4.5) but got
** Compiling 'CImg_demo (1.4.5)' with 'gcc version 4.4.5 (Debian 4.4.5-6) '
g++ -o CImg_demo CImg_demo.cpp -I.. -Wall -W -lm -lpthread -lHalf -O3 -fno-tree-pre -Dcimg_use_vt100 -I/usr/X11R6/include -Dcimg_use_xshm -Dcimg_use_xrandr -Dcimg_use_tiff -Dcimg_use_openexr -I/usr/include/OpenEXR -Dcimg_use_png -Dcimg_use_jpeg -Dcimg_use_zlib -Dcimg_use_opencv -I/usr/include/opencv -Dcimg_use_magick -I/usr/include/ImageMagick -g -O2 -Wall -W -pthread -Dcimg_use_fftw3 -L/usr/X11R6/lib -lpthread -lX11 -lXext -lXrandr -ltiff -lIlmImf -lpng -lz -ljpeg -lz -lcv -lhighgui -L/usr/lib -L/usr/lib/X11 -L/usr/lib -lMagick++ -lMagickWand -lMagickCore -llcms -ltiff -lfreetype -ljpeg -llqr-1 -lglib-2.0 -lfontconfig -lXext -lSM -lICE -lX11 -lXt -lbz2 -lz -lm -lgomp -lpthread -lltdl -lfftw3
In file included from CImg_demo.cpp:48:
../CImg.h:312:28: error: magick/symbols.h: No such file or directory
In file included from CImg_demo.cpp:48:
../CImg.h: In destructor 'cimg_library::cimg::Magick_info::~Magick_info()':
../CImg.h:2412: error: 'MagickLib' has not been declared
make[3]: *** [CImg_demo] Error 1
IMHO this is not at all connected to the patch and thus I include
upstream in CC. I would like to fix the reported problem with
binutils-gold together with the new upstream version. Any patch is
welcome.
Kind regards
Andreas.
On Fri, Nov 12, 2010 at 06:20:52PM +0100, Fabrice Coutadeur wrote:
> Package: cimg
> Version: 1.4.4-1
> Severity: wishlist
> Tags: patch
> User: ubuntu-devel at lists.ubuntu.com
> Usertags: origin-ubuntu natty ubuntu-patch
>
> Hi,
>
> Sorry to bug you again with that, but a new FTBFS appeared in 1.4.4 with missing
> libX11 when linking the examples. Here is the relevant part of the build log:
> ...
> g++ -o gmic_gimp gmic_gimp.cpp gmic_gimp.o -Dcimg_build `gimptool-2.0 --cflags` `gimptool-2.0 --libs` -lpthread -lfftw3 -lpng -lz
> /usr/bin/ld: /tmp/ccfFCi4P.o: undefined reference to symbol 'XGetWindowAttributes'
> /usr/bin/ld: note: 'XGetWindowAttributes' is defined in DSO /usr/lib/libX11.so.6 so try adding it to the linker command line
> /usr/lib/libX11.so.6: could not read symbols: Invalid operation
> collect2: ld returned 1 exit status
> make[3]: *** [gmic_gimp] Error 1
>
> The fix is different than the previous one, as gmic_gimp is not using LDFLAG, so
> it's necessary to patch the Makefile file, as you can see in the next patch:
> *** /tmp/tmpuilFjM
>
> I haven't applied the patch yet in UbuntuDA, even if have the package ready.
> Just tell me if you think I should upload it, without waiting for you.
>
> Thanks,
> Fabrice
>
>
> -- System Information:
> Debian Release: squeeze/sid
> APT prefers maverick-updates
> APT policy: (500, 'maverick-updates'), (500, 'maverick-security'), (500, 'maverick-proposed'), (500, 'maverick')
> Architecture: amd64 (x86_64)
>
> Kernel: Linux 2.6.35-23-generic (SMP w/2 CPU cores)
> Locale: LANG=es_ES.UTF-8, LC_CTYPE=es_ES.UTF-8 (charmap=UTF-8)
> Shell: /bin/sh linked to /bin/dash
> diff -Nru cimg-1.4.4/debian/patches/20_fix-missing-libX11-binutils-gold.patch cimg-1.4.4/debian/patches/20_fix-missing-libX11-binutils-gold.patch
> --- cimg-1.4.4/debian/patches/20_fix-missing-libX11-binutils-gold.patch 1970-01-01 01:00:00.000000000 +0100
> +++ cimg-1.4.4/debian/patches/20_fix-missing-libX11-binutils-gold.patch 2010-11-12 07:00:11.000000000 +0100
> @@ -0,0 +1,15 @@
> +Description: Fix a FTBFS with binutils-gold when building gmic_gimp because of
> + missing XGetWindowAttributes symbol, found in libX11. Adding thus -lX11 to link
> + options of gmic_gimp.
> +Author: Fabrice Coutadeur <fabricesp at ubuntu.com>
> +--- cimg-1.4.4.orig/examples/Makefile
> ++++ cimg-1.4.4/examples/Makefile
> +@@ -288,7 +288,7 @@ gmic_gimp.o: gmic.cpp gmic_def.h
> + $(CC) -o gmic_gimp.o -c gmic.cpp -Dcimg_build -Dgmic_gimp -Dgmic_minimal $(CIMG_OPT_CFLAGS) $(CIMG_FFTW3_CFLAGS) $(CIMG_PNG_CFLAGS)
> +
> + gmic_gimp: gmic_gimp.o gmic_gimp.cpp
> +- $(CC) -o $(EXEPFX)gmic_gimp gmic_gimp.cpp gmic_gimp.o -Dcimg_build `gimptool-2.0 --cflags` `gimptool-2.0 --libs` -lpthread $(CIMG_OPT_FLAGS) $(CIMG_FFTW3_LDFLAGS) $(CIMG_PNG_LDFLAGS) $(CIMG_GIMP_CFLAGS)
> ++ $(CC) -o $(EXEPFX)gmic_gimp gmic_gimp.cpp gmic_gimp.o -Dcimg_build `gimptool-2.0 --cflags` `gimptool-2.0 --libs` -lpthread $(CIMG_OPT_FLAGS) $(CIMG_FFTW3_LDFLAGS) $(CIMG_PNG_LDFLAGS) $(CIMG_GIMP_CFLAGS) -lX11
> +
> + # Specific targets for 'gmic'.
> + gmic_def: gmic_def.gmic
> diff -Nru cimg-1.4.4/debian/patches/series cimg-1.4.4/debian/patches/series
> --- cimg-1.4.4/debian/patches/series 2010-11-05 11:58:19.000000000 +0100
> +++ cimg-1.4.4/debian/patches/series 2010-11-12 06:55:40.000000000 +0100
> @@ -1 +1,2 @@
> 10_examples.patch
> +20_fix-missing-libX11-binutils-gold.patch
> --
> debian-science-maintainers mailing list
> debian-science-maintainers at lists.alioth.debian.org
> http://lists.alioth.debian.org/mailman/listinfo/debian-science-maintainers
--
http://fam-tille.de
More information about the debian-science-maintainers
mailing list