This repository has been archived by the owner. It is now read-only.

RMagick won't compile with imagemagick formula version 6.8.0-10 #16625

Closed
follmann opened this Issue Dec 17, 2012 · 17 comments

Comments

Projects
None yet
10 participants
@follmann
Copy link

follmann commented Dec 17, 2012

Hi,

I found an issue with the latest imagemagick formula (6.8.0-10). RMagick fails to install wit it.

After replaying the described scenario underneath twice, I tried the formula version before the latest (6.7.7-6) and it worked.

Scenario:

  • OSX Mountain Lion 10.8.2
  • Latest Apple Command Line Tools (4.5.2)
  • Latest XQuartz
  • virgin /usr/local
  • clean install of Homebrew
  • brew doctor => only false warning about XCode: Your Xcode (4.5) is outdated
  • Some other formulas (MongoDB, MySQL, MPD, rbenv) worked just fine
  • brew install imagemagick also worked as expected (convert --version shows sth)
  • Output for gem install rmagick
 /Users/andreas/.rbenv/versions/1.9.3-p194/bin/ruby extconf.rb 
checking for Ruby version >= 1.8.5... yes
extconf.rb:128: Use RbConfig instead of obsolete and deprecated Config.
checking for gcc... yes
checking for Magick-config... yes
checking for ImageMagick version >= 6.4.9... yes
checking for HDRI disabled version of ImageMagick... yes
checking for stdint.h... yes
checking for sys/types.h... yes
checking for wand/MagickWand.h... yes
checking for InitializeMagick() in -lMagickCore... no
checking for InitializeMagick() in -lMagick... no
checking for InitializeMagick() in -lMagick++... no
Can't install RMagick 2.13.1. Can't find the ImageMagick library 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=/Users/andreas/.rbenv/versions/1.9.3-p194/bin/ruby
    --with-MagickCorelib
    --without-MagickCorelib
    --with-Magicklib
    --without-Magicklib
    --with-Magick++lib
    --without-Magick++lib

@MikeMcQuaid

This comment has been minimized.

Copy link
Member

MikeMcQuaid commented Dec 17, 2012

This is a RMagick bug rather than a Homebrew bug. See discussion on 883f549.

@follmann

This comment has been minimized.

Copy link

follmann commented Dec 17, 2012

Sorry wasn't sure if it applies to the imagemagick formula or not. Since technically RMagick is out of the scope of Homebrew, but bugs have been reported and resolved here. Thanks for pointing out the other issue.

@MikeMcQuaid

This comment has been minimized.

Copy link
Member

MikeMcQuaid commented Dec 17, 2012

No problem. The problem is RMagick does not support newer versions of ImageMagick. I recommend trying MiniMagick. Good luck!

@rwz

This comment has been minimized.

Copy link

rwz commented Dec 19, 2012

Here's a way to fix that: https://coderwall.com/p/wnomjg

@rwz

This comment has been minimized.

Copy link

rwz commented Dec 19, 2012

Btw, seems like a simple enough fix to include in formula distrbution, huh?

@mistydemeo

This comment has been minimized.

Copy link
Contributor

mistydemeo commented Dec 19, 2012

I'm not clear that it's a problem in our distribution, if these are the standard lib names imagemagick now installs. Has anyone reported this to them/asked them about it to see what their response is?

@mistydemeo

This comment has been minimized.

Copy link
Contributor

mistydemeo commented Dec 19, 2012

rmagick uses the Magick-config tool to determine the appropriate flags, but then hardcodes MagickCore/Magick/Magick++ as the library names instead of using the Magick-config/Magick++-config output to determine what the library name to use is. This is an rmagick bug, as imagemagick does not appear to intend for packagers to create those symlinks. Reading their changelog, the library name decoration was intentional. (The change was recent, so rmagick's assumption that the symbol names would be invariant used to be valid.)

Note however that the InitializeMagick function they're using (and looking for) is deprecated to begin with, and will be removed in imagemagick 7. rmagick needs a maintainer to be able to work longterm.

@Sharpie

This comment has been minimized.

Copy link
Contributor

Sharpie commented Dec 19, 2012

Agreed that this isn't a Homebrew problem. The root issue here is that no one has pushed a new commit to the rmagick master branch in 2 years. Bit rot is a natural consequence of this.

@MikeMcQuaid

This comment has been minimized.

Copy link
Member

MikeMcQuaid commented Dec 20, 2012

Use MiniMagick instead.

@rwz

This comment has been minimized.

Copy link

rwz commented Dec 20, 2012

@MikeMcQuaid that does not help, seriously. There're LOTS of legacy projects out there, that depend on rmagick and still need to have bugs fixed and maintenance done. And suddenly you can't even launch them anymore because of that imagemagick update.

I understand that this is not Homebrew problem and probably not ImageMagick's either. But please, stop giving insulting advices.

@MikeMcQuaid

This comment has been minimized.

Copy link
Member

MikeMcQuaid commented Dec 20, 2012

It's probably worth remembering that we have other issues with people complaining about ImageMagick being outdated, my comments are directed at anyone reading this issue rather than you personally, that RMagick hasn't been touched in years and Homebrew don't support old versions. My intention was not to insult you but I will post things that you might find insulting if I think others will find them useful. If this is a problem I suggest unwatching this thread.

Now, to try and actually be useful I recommend you extract one of the older bottles into your Cellar and then do brew link imagemagick if you uninstalled the old version.

They are available here:
http://sourceforge.net/projects/machomebrew/files/Bottles/imagemagick-6.7.7-6.snowleopard.bottle.3.tar.gz/download
http://sourceforge.net/projects/machomebrew/files/Bottles/imagemagick-6.7.7-6.lion.bottle.3.tar.gz/download
http://sourceforge.net/projects/machomebrew/files/Bottles/imagemagick-6.7.7-6.mountainlion.bottle.3.tar.gz/download

@fred

This comment has been minimized.

Copy link

fred commented Dec 20, 2012

as @mistydemeo said, it definitely looks like rmagick issue, no software should rely on symlinks, they are there just for the sake of back-compatibility.

The temporary fix from @rwz helped solve the issue. Only that I have imagemagick compiled with 8-bit quantum settings.
so i had to do instead

$ cd /usr/local/Cellar/imagemagick/6.8.0-10/lib
$ ln -s libMagick++-Q8.7.dylib   libMagick++.dylib
$ ln -s libMagickCore-Q8.7.dylib libMagickCore.dylib
$ ln -s libMagickWand-Q8.7.dylib libMagickWand.dylib

same if you use 32-bit.

btw, image_sorcery is quite cool, it uses freeimage instead.
( https://github.com/WaYdotNET/carrierwave-imagesorcery )

@mistydemeo

This comment has been minimized.

Copy link
Contributor

mistydemeo commented Dec 20, 2012

The change required in rmagick itself to get it to work with the new imagemagick is really, really minimal. Forking that would be much more productive than playing around with symlinks! (In fact, someone on IRC was planning to do just that.) It's only bandaid solution of course, it will still break again when imagemagick 7 comes out.

@sutros

This comment has been minimized.

Copy link

sutros commented Jan 4, 2013

Thanks Fred,
I was getting really angry.
The symlinks worked well for me.

@jtanium

This comment has been minimized.

Copy link

jtanium commented Jan 21, 2013

First, my apologies for bringing up this issue again -- I recognize this horse has been dead for sometime.

What if the ImageMagick-6.7.7-6 formula was brought back in as imagemagick67 or imagemagick-legacy or imagemagick-rmagick_is_outdated_use_something_else?

I realize that keeping it around is less than ideal, but, obviously, a lot of people are still relying on it for existing code, and need time to switch to something else (MiniMagick isn't a drop in replacement, after all).

@jdeff

This comment has been minimized.

Copy link
Contributor

jdeff commented Feb 5, 2013

Looks like rmagic just released 2.13.2 that fixed this issue for me.

@diegoviola

This comment has been minimized.

Copy link

diegoviola commented Feb 20, 2013

rmagick 2.13.2 solved the issue I've had with ImageMagick 6.8.x.

Thanks.

@Homebrew Homebrew locked and limited conversation to collaborators Feb 16, 2016

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.