FS#10574 - rmagick fails to install with imagemagick-6.4.1.3-1

Attached to Project: Arch Linux
Opened by Matt Czech (checkers) - Tuesday, 03 June 2008, 01:28 GMT
Last edited by Eric Belanger (Snowman) - Tuesday, 24 June 2008, 18:15 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Eric Belanger (Snowman)
Architecture i686
Severity Medium
Priority Normal
Reported Version 2007.08-2
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description: Trying to install the ruby gem 'rmagick' results in failures. It looks like there is a bug in imagemagick. Something caused it to break between imagemagick-6.4.0.9-1 and imagemagick-6.4.1.3-1 as I'm able to install rmagick with 6.4.0.9-1. I haven't had this working in the past but didn't have any problems installing rmagick once I had imagemagick-6.4.0.9-1 installed.

Additional info:
* package version(s)
rmagick-2.3.0
imagemagick-6.4.1.3-1
* config and/or log files etc.

Command Line Output:
$ sudo gem install rmagick
Bulk updating Gem source index for: http://gems.rubyforge.org/
Building native extensions. This could take a while...
ERROR: Error installing rmagick:
ERROR: Failed to build gem native extension.

/usr/bin/ruby extconf.rb install rmagick
checking for Ruby version >= 1.8.2... yes
checking for Magick-config... yes
checking for ImageMagick version >= 6.3.0... yes
checking for HDRI disabled version of ImageMagick... yes
checking for stdint.h... yes
checking for sys/types.h... yes
checking for magick/MagickCore.h... yes
checking for InitializeMagick() in -lMagick... no
checking for InitializeMagick() in -lMagickCore... no
Can't install RMagick 2.3.0. Can't find libMagick or libMagickCore, or one of the dependent libraries. Check the mkmf.log file for more detailed information.

*** 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/ruby
--with-Magicklib
--without-Magicklib
--with-MagickCorelib
--without-MagickCorelib

Build errors attached (mkmf.log)

Steps to reproduce:
Install imagemagick-6.4.1.3-1 and try to install the rmagick-2.3.0 ruby gem.
This task depends upon

Closed by  Eric Belanger (Snowman)
Tuesday, 24 June 2008, 18:15 GMT
Reason for closing:  Fixed
Comment by Matt Czech (checkers) - Tuesday, 03 June 2008, 01:30 GMT
Attaching log file
   mkmf.log (7.7 KiB)
Comment by Jan de Groot (JGC) - Tuesday, 03 June 2008, 07:05 GMT
ImageMagick has changed API a bit. The initializeMagick function called in the config script is deprecated nowadays. There's nothing wrong with imagemagick, your application should track imagemagick API.
Comment by Eric Belanger (Snowman) - Tuesday, 03 June 2008, 16:01 GMT
The changed API might be the cause of the problem here but there still seems to a linking problem with libMagickCore.so, see the undefined reference errors in mkmf.log. I also get them when running ld on the lib.
Comment by Jan de Groot (JGC) - Wednesday, 04 June 2008, 06:49 GMT
Hmm, you're right. check "ldd -r /usr/lib/libMagicCore.so" and you'll see the same as the mkmf.log. It seems the other errors are detections for older versions of imagemagick. The missing symbols are in the libMagickWand.so library, but libMagicCore.so is not linked to it.
Comment by Eric Belanger (Snowman) - Sunday, 15 June 2008, 06:29 GMT
update:
I reported the problem upstream: http://studio.imagemagick.org/pipermail/magick-bugs/2008-June/002954.html
No replies yet. I'll wait a few more days and will try my luck in their forum.

I've also noticed that libMagickWand.so links to libMagicCore.so so there would be a circular dependency in the linking if we also want libMagicCore.so to link to libMagickWand.so. Probably some kind of bootstrapping would be needed.
Comment by Eric Belanger (Snowman) - Tuesday, 24 June 2008, 06:25 GMT
Try with imagemagick 6.4.2.1-1 and let me know how it goes. I downloaded the sources for rmagick and 'ruby setup.rb' ran without any problems so it should be fixed.
Comment by Matt Czech (checkers) - Tuesday, 24 June 2008, 14:06 GMT
I tried installing rmagick-2.3.0 with imagemagick-6.4.2.1-1 and it fails with errors different than I had originally reported. I upgraded to rmagick-2.5.1 (current version) and it installs just fine with imagemagick-6.4.2.1-1 so maybe there was a problem with rmagick? I'm not sure but the important thing is that it works. Thanks much for following through and checking this out.
Comment by Eric Belanger (Snowman) - Tuesday, 24 June 2008, 18:14 GMT
The version of rmagigk that I tried was the current one. I assume one problem was caused by the change in API and they fixed it upstream in rmagick-2.5.1. The other possible problem (bad linking) is fixed in imagemagick-6.4.2.1-1. I'll close this bug.

Loading...