compilation fails with imagemagick-7
Hi,
compilation of dvdauthor fails against imagemagick-7. The relevant part of the failing build is this:
x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -DSYSCONFDIR="\"/etc\"" -I/usr/include/libxml2 -fopenmp -DMAGICKCORE_HDRI_ENABLE=0 -DMAGICKCORE_QUANTUM_DEPTH=16 -I/usr/include/ImageMagick-7 -I/usr/include/freetype2 -I/usr/include/fribidi -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/freetype2 -I/usr/include/harfbuzz -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/fribidi -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -Wall -march=native -mtune=native -O2 -pipe -c -o subgen-image.o subgen-image.c
subgen-image.c:33:24: fatal error: magick/api.h: No such file or directory
compilation terminated.
make[2]: *** [Makefile:601: subgen-image.o] Error 1
make[2]: Leaving directory '/var/tmp/portage/media-video/dvdauthor-0.7.2-r1/work/dvdauthor/src'
make[1]: *** [Makefile:412: all] Error 2
make[1]: Leaving directory '/var/tmp/portage/media-video/dvdauthor-0.7.2-r1/work/dvdauthor/src'
make: *** [Makefile:414: all-recursive] Error 1
* ERROR: media-video/dvdauthor-0.7.2-r1::gentoo failed (compile phase):
* emake failed
This was als reported downstream at Gentoo.
I maintain dvdauthor for openSUSE and I've just come across the same issue. magick/api.h is depreciated even in ImageMagick 6 and simply provides a link to MagickCore.h but this doesn't solve the problem. You can build against GraphicsMagick by removing MagickCore-config and adding -I/usr/include/GraphicsMagick to your CFLAGS as a workaround. Unfortunately configure doesn't provide an easy option to switch between ImageMagick and GraphicsMagick. GraphicsMagick does contain magick/api.h
I’m wondering ... do we even need the capability to import images via ImageMagick or GraphicsMagick?
This is only used to import subpicture images. But these are restricted to two bits per pixel. Which is a poor fit for image formats intended for photorealism, like JPEG.
I’m inclined to restrict imports to just PNG images, which means I only need libpng.
Thoughts?
I must admit I only use dvdauthor with DVDStyler which appears to handle images itself but I would first consider possible breakage to front ends before removing features. That said from a package maintainers point of view, a single dependance on libpng makes life easier. It seems to work fine with DVDStyler when built without magick
I have done a patch 1f74267 to try to simplify building against ImageMagick 6--does that help at all? Looking at Lars’s Gentoo patch, seems like ImageMagick 7 does things in a new, backward-incompatible way.
Would it be useful to have an option to prefer GraphicsMagick over ImageMagick, when both are available?
GraphicsMagick would be preferable but nobody has complained about the lack of magick.
OK, what I have done is take out the automatic inclusion of ImageMagick or GraphicsMagick, and require you to now specify --with-imagemagick or --with-graphicsmagick to the configure script if you want one of them. See if you prefer that.
Sounds good.
OK, what I have done is take out the automatic inclusion of ImageMagick or GraphicsMagick, and require you to now specify
--with-imagemagickor--with-graphicsmagickto theconfigurescript if you want one of them. See if you prefer that.
Can you, please, create release 0.7.3 with those improvements?