Custom coders don't compile on Linux.

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
epi
Posts: 5
Joined: 2011-04-04T13:36:26-07:00
Authentication code: 8675308

Custom coders don't compile on Linux.

Post by epi »

MagickCoderKit and any other custom coder based on it don't compile on Linux because of missing header files (at least).
./configure passes without problems, but make does not:

Code: Select all

MagickCoderKit-1.0.0$ make
depbase=`echo mgk.lo | sed 's|[^/]*$|.deps/&|;s|\.lo$||'`;\
	/bin/bash ./libtool --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I./config -I. -I..  -I/usr/local/include/ImageMagick  -g -O2 -MT mgk.lo -MD -MP -MF $depbase.Tpo -c -o mgk.lo mgk.c &&\
	mv -f $depbase.Tpo $depbase.Plo
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I./config -I. -I.. -I/usr/local/include/ImageMagick -g -O2 -MT mgk.lo -MD -MP -MF .deps/mgk.Tpo -c mgk.c  -fPIC -DPIC -o .libs/mgk.o
mgk.c:42:27: error: magick/studio.h: No such file or directory
In file included from /usr/local/include/ImageMagick/magick/pixel.h:25,
                 from /usr/local/include/ImageMagick/magick/color.h:25,
                 from /usr/local/include/ImageMagick/magick/image.h:25,
                 from /usr/local/include/ImageMagick/magick/blob.h:25,
                 from mgk.c:43:
/usr/local/include/ImageMagick/magick/colorspace.h:52: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'MagickBooleanType'
In file included from /usr/local/include/ImageMagick/magick/pixel.h:26,
(...)
(ImageMagick 6.6.9-5 Q16)

Copying all headers from IM sources into /usr/local/include/ImageMagick/magick/ solve the problem, but still I think all headers needed to build custom coders should be copied there during installation (as it used to be or as it is still in Windows).
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Custom coders don't compile on Linux.

Post by magick »

The MagickCoderKit is a low-level kit that requires a number of non-installed private header files only found in the ImageMagick source distribution. The simplest solution is to add a -I/path/to/IM-source to the compile command line.
Post Reply