How to tell cpanm Image :: Magick about the location of the header?

On OS X cpanm Image :: Magick does not work with

Magick.xs: 60: 10: fatal error: file "magick / MagickCore.h" not found

#include <Magick / MagickCore.h>

The file is present. (This space is from me to be displayed here.)

How can I tell cpanm and / or Image :: Magick where to find these headers?

(IM is installed from the source.)

+4
source share
2 answers

Workaround: download the module, edit Makefile.PL (add the dir header in the include), do, do the installation, as it is written on the main imagemagick page.

+2
source

While the question is quite old, I still ran into this problem recently.

I managed to resolve it using the new ImageMagick installed with homebrew ( brew install imagemagick , which installed version 6.9.5-3), then it runs cpan and installs the JCRISTY/PerlMagick-6.89-1.tar.gz .

It does not work in the test section. So I analyzed which tests fail and decided to cheat a little (I don't need all the functions of ImageMagick). I manually edited the test files (use look Image::Magick to get into the unarchived package) - for me it was necessary to fully comment on the input.miff test (reference / filter / Segment.miff) in t/filter.t and the tests for reading in the format MPEG at t/mpeg/read.t Then cpan will be able to process Image :: Magick.

I conducted my own tests on a set of GIF and PNG images, and everything is fine. Hope this helps someone.

0
source

Source: https://habr.com/ru/post/1441076/


All Articles