Closed btakita closed 9 years ago
I have wand/MagickWand.h
.
$ ls /usr/include/ImageMagick-6/wand/MagickWand.h
/usr/include/ImageMagick-6/wand/MagickWand.h
I then commented out the check for RMagick in ext/RMagick/extconf.rb
and got the following:
$ ruby extconf.rb
checking for Ruby version >= 1.8.5... yes
checking for gcc... yes
checking for Magick-config... yes
Warning: Found a partial ImageMagick installation. Your operating system likely has some built-in ImageMagick libraries but not all of ImageMagick. This will most likely cause problems at both compile and runtime.
Found partial installation at: /usr
checking for stdint.h... yes
checking for sys/types.h... yes
checking for wand/MagickWand.h... no
Can't install RMagick 2.13.4. Can't find MagickWand.h.
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers. Check the mkmf.log file for more details. You may
need configuration options.
Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/usr/bin/ruby2.1
I also have this issue when running gem install rmagick -v '2.13.2'
I traced the issue to setting $CPPFLAGS
using Magick-config --cppflags
.
$ Magick-config --cppflags
-I/usr/include/GraphicsMagick
$ ls /usr/include/GraphicsMagick/wand/
drawing_wand.h magick_wand.h pixel_wand.h wand_api.h wand_symbols.h
$ ls /usr/include/ImageMagick-6/wand/
animate.h composite.h convert.h display.h identify.h magick-image.h magick_wand.h MagickWand.h mogrify.h pixel-iterator.h stream.h
compare.h conjure.h deprecate.h drawing-wand.h import.h magick-property.h magick-wand.h method-attribute.h montage.h pixel-wand.h wand-view.h
I found another dependency issue. When both Magick-config
and pkg-config
exist, Magick-config
is used. Magick-config --cppflags
does not have wand/MagickWand.h
if find_executable("Magick-config")
$magick_config = true
elsif find_executable("pkg-config")
$pkg_config = true
else
exit_failure "Can't install RMagick #{RMAGICK_VERS}. Can't find Magick-config or pkg-config in #{ENV['PATH']}\n"
end
Changing it to the following works for me.
if find_executable("pkg-config")
$pkg_config = true
elsif find_executable("Magick-config")
$magick_config = true
else
exit_failure "Can't install RMagick #{RMAGICK_VERS}. Can't find Magick-config or pkg-config in #{ENV['PATH']}\n"
end
This git repo seems to be on version 2.13.2
, however the latest rmagick gem is on version 2.13.4
.
Moved the discussion to https://github.com/gemhome/rmagick/issues/161.
I have
graphicsmagick-libmagick-dev-compat
installed.It seems this is a new regression.
Here's the result of running convert.