Building ImageMagick from debian sources 6.8.9.9-5+deb8u3

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Post Reply
maiksensi
Posts: 2
Joined: 2016-06-10T02:54:42-07:00
Authentication code: 1151

Building ImageMagick from debian sources 6.8.9.9-5+deb8u3

Post by maiksensi »

Hey,

I am trying to build ImageMagick from source for my Debian Jessie, as I need different options enabled. It is the first time I tried to compile a Packet from source. Configure and compile seems to be fine, till I get this:

Code: Select all

libtool: link: ( cd "coders/.libs" && rm -f "otb.la" && ln -s "../otb.la" "otb.la" )
/bin/bash ./libtool  --tag=CC   --mode=compile gcc -std=gnu99 -std=gnu99 -DHAVE_CONFIG_H   -I. -I../..  -D_FORTIFY_SOURCE=2 -DMAGICKCORE_HDRI_ENABLE=1 -DMAGICKCORE_QUANTUM_DEPTH=32 -I/usr/include/X11 -I/usr/include/libxml2  -I/usr/include/lqr-1 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/freetype2 -fopenmp -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wall -fexceptions -pthread -DMAGICKCORE_HDRI_ENABLE=1 -DMAGICKCORE_QUANTUM_DEPTH=32 -c -o coders/coders_palm_la-palm.lo `test -f 'coders/palm.c' || echo '../../'`coders/palm.c
libtool: compile:  gcc -std=gnu99 -std=gnu99 -DHAVE_CONFIG_H -I. -I../.. -D_FORTIFY_SOURCE=2 -DMAGICKCORE_HDRI_ENABLE=1 -DMAGICKCORE_QUANTUM_DEPTH=32 -I/usr/include/X11 -I/usr/include/libxml2 -I/usr/include/lqr-1 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/freetype2 -fopenmp -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wall -fexceptions -pthread -DMAGICKCORE_HDRI_ENABLE=1 -DMAGICKCORE_QUANTUM_DEPTH=32 -c ../../coders/palm.c  -fPIC -DPIC -o coders/.libs/coders_palm_la-palm.o
../../coders/palm.c: In function ‘ReadPALMImage’:
../../coders/palm.c:522:53: error: invalid operands to binary + (have ‘struct PixelPacket *’ and ‘IndexPacket’)
           SetMagickPixelPacket(image,image->colormap+index,
                                                     ^
Makefile:7880: recipe for target 'coders/coders_palm_la-palm.lo' failed
make[3]: *** [coders/coders_palm_la-palm.lo] Error 1
make[3]: Leaving directory '/root/imagemagick-6.8.9.9/debian/build-quantum-Q32'
Makefile:5141: recipe for target 'all' failed
make[2]: *** [all] Error 2
make[2]: Leaving directory '/root/imagemagick-6.8.9.9/debian/build-quantum-Q32'
dh_auto_build: make -j1 all perl-build returned exit code 2
debian/rules:140: recipe for target 'quantum_override_dh_auto_build-arch_Q32' failed
make[1]: *** [quantum_override_dh_auto_build-arch_Q32] Error 2
make[1]: Leaving directory '/root/imagemagick-6.8.9.9'
debian/rules:111: recipe for target 'build' failed
make: *** [build] Error 2
dpkg-buildpackage: error: debian/rules build gave error exit status 2
debuild: fatal error at line 1376:
dpkg-buildpackage -rfakeroot -D -us -uc -i -b failed
Maybe someone can point me to the right direction on what the problem could be? Or on how to fix it?

I tried

Code: Select all

debuild -i -uc -us -b
to build the new deb package.

Cheers,
Maik.
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Building ImageMagick from debian sources 6.8.9.9-5+deb8u3

Post by snibgo »

A more recent version (v6.9.3-7) has this code. I show it in context.

Code: Select all

    if (flags & PALM_HAS_TRANSPARENCY_FLAG)
      {
        IndexPacket index=ConstrainColormapIndex(image,(mask-transparentIndex));
        if (bits_per_pixel != 16)
          SetMagickPixelPacket(image,image->colormap+(ssize_t) index,
            (const IndexPacket *) NULL,&transpix);
        (void) TransparentPaintImage(image,&transpix,(Quantum)
          TransparentOpacity,MagickFalse);
      }
You might edit your code.
snibgo's IM pages: im.snibgo.com
maiksensi
Posts: 2
Joined: 2016-06-10T02:54:42-07:00
Authentication code: 1151

Re: Building ImageMagick from debian sources 6.8.9.9-5+deb8u3

Post by maiksensi »

Thanks for the fast reply. I was able to build the package with a few more changes regarding ssize_t but your hint was gold.

In the end I ended up rebuilding a custom packet for my needs from scratch, but it was forth it as a learning experience.
Post Reply