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: 3
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: 26261
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: 3
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.

tlk
Posts: 3
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 »

fmw42 wrote:
2020-01-13T10:24:51-07:00
Your do not need --with X11. On Mac, just install XQuartz.
Hello and thanks for the well-intended advice! In the interest of knowledge sharing, I'd like to point your attention to https://github.com/Homebrew/homebrew-core/issues/49082

Turns out that Homebrew has dropped X11 support for ImageMagick and the general advice is to maintain a local homebrew "tap". This works for me: https://github.com/tlk/homebrew-imagemagick-x11

Post Reply