Building ImageMagick-7.0.9-16 fails on Mac OS X 10.15.2 (Catalina)

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
tlk
Posts: 2
Joined: 2020-01-13T09:05:11-07:00
Authentication code: 1152

Building ImageMagick-7.0.9-16 fails on Mac OS X 10.15.2 (Catalina)

Post by tlk »

Building ImageMagick-7.0.9-16 fails with the following error:

Code: Select all

MagickCore/magick.c:100:12: fatal error: 'libxml/parser.h' file not found

A workaround is described at https://medium.com/@maohua.ethan.wang/i ... 5a2174df62 and duplicated on stackoverflow:

Code: Select all

env CFLAGS="$(xml2-config --cflags)" XML_CFLAGS="$(xml2-config --cflags)" XML_LIBS="$(xml2-config --libs)" ./configure
make

I am installing from source because homebrew appears to have dropped support for the --with-x11 option.

User avatar
fmw42
Posts: 25924
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Building ImageMagick-7.0.9-16 fails on Mac OS X 10.15.2 (Catalina)

Post by fmw42 »

Your do not need --with X11. On Mac, just install XQuartz.

tlk
Posts: 2
Joined: 2020-01-13T09:05:11-07:00
Authentication code: 1152

Re: Building ImageMagick-7.0.9-16 fails on Mac OS X 10.15.2 (Catalina)

Post by tlk »

XQuartz is installed and works. Confirmed by running xclock and verifying that the clock shows up.

I should have mentioned that I already tested brew install imagemagick without --with-x11 and that did not work.

ImageMagick compiles and works with X11 after adding the CFLAGS, XML_CFLAGS and XML_LIBS environment variables to the configure command (as shown in my first post) before running make and make install.

Post Reply