Can't build ImageMagick 6.9.1-6.

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
lleche
Posts: 10
Joined: 2012-11-25T14:50:18-07:00
Authentication code: 6789

Can't build ImageMagick 6.9.1-6.

Post by lleche » 2015-06-20T08:07:55-07:00

Can't build ImageMagick 6.9.1-6, nor 6.9.1-5. Could install 6.9.1-4 without problems on same configuration..

System: MacOSX 10.10.3 (14D136), with Xcode 6.1.1 (6A2008a).
Issue: error reported by 'make':
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I. -I/usr/local/include -DMAGICKCORE_HDRI_ENABLE=1 -DMAGICKCORE_QUANTUM_DEPTH=16 -I/Users/Landry/Desktop/ImageMagick-6.9.1-6/magick -I/Users/Landry/Desktop/ImageMagick-6.9.1-6/wand -I/usr/include/libxml2 -I/usr/local/Cellar/libpng/1.6.17/include/libpng16 -D_THREAD_SAFE -I/usr/local/Cellar/openexr/2.2.0/include/OpenEXR -I/usr/local/Cellar/ilmbase/2.2.0/include/OpenEXR -I/usr/local/Cellar/little-cms2/2.7/include -I/usr/local/Cellar/graphviz/2.38.0/include/graphviz -I/usr/local/Cellar/freetype/2.5.5/include/freetype2 -g -O2 -Wall -mtune=core-avx2 -fexceptions -D_FORTIFY_SOURCE=0 -pthread -DMAGICKCORE_HDRI_ENABLE=1 -DMAGICKCORE_QUANTUM_DEPTH=16 -c coders/msl.c -fno-common -DPIC -o coders/.libs/coders_msl_la-msl.o
coders/msl.c:101:12: fatal error: 'libxml/parser.h' file not found
# include <libxml/parser.h>
^
1 error generated.
make[1]: *** [coders/coders_msl_la-msl.lo] Error 1
make: *** [all] Error 2

Configure options:
./configure CPPFLAGS='-I/usr/local/include' LDFLAGS='-L/usr/local/lib' --enable-delegate-build --enable-shared --enable-hdri --disable-static --disable-opencl --with-modules --with-perl=/Users/Landry/perl5/perlbrew/perls/stable/bin/perl --with-quantum-depth=16 --with-gslib --without-wmf --disable-silent-rules --disable-dependency-tracking --disable-openmp --with-gs-font-dir=/usr/local/share/ghostscript/fonts/ --with-lqr

User avatar
magick
Site Admin
Posts: 11095
Joined: 2003-05-31T11:32:55-07:00

Re: Can't build ImageMagick 6.9.1-6.

Post by magick » 2015-06-20T09:33:44-07:00

Post the contents of libxml-2.0.pc. Also, provide the output of this command: ls /usr/include/libxml2. This info should be enough to determine why your build is failing.

User avatar
glennrp
Posts: 1147
Joined: 2006-04-01T08:16:32-07:00
Location: Maryland 39.26.30N 76.16.01W

Re: Can't build ImageMagick 6.9.1-6.

Post by glennrp » 2015-06-20T12:18:44-07:00

Something has gone wrong with freetype as well (I could build 6.9.1-5 but not -6):
  • In file included from magick/annotate.c:82:0:
    /home/glennrp/include/ft2build.h:56:38: fatal error: freetype/config/ftheader.h: No such file or directory
    #include <freetype/config/ftheader.h>

User avatar
glennrp
Posts: 1147
Joined: 2006-04-01T08:16:32-07:00
Location: Maryland 39.26.30N 76.16.01W

Re: Can't build ImageMagick 6.9.1-6.

Post by glennrp » 2015-06-20T12:36:52-07:00

The freetype problem seems to be due to configure now looking for "freetype/config/ftheader.h" instead of "freetype2/config/ftheader.h". That was easy to fix but now it's not finding libpng (i.e., why it's finding libpng12 not libpng16).... OK, it's because configure no longer looks for it; the PNG support in configure.ac has been simplified to the point that it doesn't work for me.
Last edited by glennrp on 2015-06-20T19:37:58-07:00, edited 1 time in total.

User avatar
magick
Site Admin
Posts: 11095
Joined: 2003-05-31T11:32:55-07:00

Re: Can't build ImageMagick 6.9.1-6.

Post by magick » 2015-06-20T13:37:23-07:00

> PNG support in configure.ac has been simplified

Not so much simplified as a move to the standard way of supporting packages now-a-days with pkg-config. The package.pc configuration file should provide all the information needed to link to a particular package. If that's not the case, we can always revert.

User avatar
glennrp
Posts: 1147
Joined: 2006-04-01T08:16:32-07:00
Location: Maryland 39.26.30N 76.16.01W

Re: Can't build ImageMagick 6.9.1-6.

Post by glennrp » 2015-06-20T19:36:27-07:00

Ubuntu seems to not supply libpng.pc (or in fact any package.pc files). I can build OK with the system libpng (1.2.50) but not with a private libpng16 (which *does* have a libpng.pc). Using --with-pkgconfigdir=$HOME/lib/pkgconfig did not help; in that case IM is compiled with libpng16 but then attempts to link with libpng12 and fails.

lleche
Posts: 10
Joined: 2012-11-25T14:50:18-07:00
Authentication code: 6789

Re: Can't build ImageMagick 6.9.1-6.

Post by lleche » 2015-06-20T23:48:59-07:00

Thanks for the feedback.

As requested:
Content of libxml-2.0.pc (installed via Homebrew)
prefix=/usr/local/Cellar/libxml2/2.9.2
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include
modules=1

Name: libXML
Version: 2.9.2
Description: libXML library version2.
Requires:
Libs: -L${libdir} -lxml2
Libs.private: -lpthread -lz -liconv -lm
Cflags: -I${includedir}/libxml2
Result of ls /usr/include/libxml2 is:
pc3% ls /usr/local/include/libxml2
ls: /usr/local/include/libxml2: No such file or directory
Actually, the library is located in another directory:
pc3% ls /usr/local/Cellar/libxml2/2.9.2/include
libxml2/

User avatar
magick
Site Admin
Posts: 11095
Joined: 2003-05-31T11:32:55-07:00

Re: Can't build ImageMagick 6.9.1-6.

Post by magick » 2015-06-21T05:35:40-07:00

The libxml-2.0.pc configuration file tells ImageMagick to look for parser.h in /usr/local/Cellar/libxml2/2.9.2/include/libxml2/parser.h. If the file is not there, the XML validation step will fail. If it find its, it then looks in /usr/local/Cellar/libxml2/2.9.2/lib for the XML library, libxml2.so. If it can't link to it, again the validation step fails and XML support is not available to ImageMagick. If these files exist elsewhere, you will need to edit libxml-2.0.pc to reflect their locations.

Post Reply