Installing RMagick on Solaris

Posted by Sam

It seems that installing RMagick is a pain on any OS but recently installing on Solaris seemed a bit impossible. Previously we were using ImageMagick 5.2.9 and an older version of RMagick. We've recently switched from Blastwave to OpenCSW to get our Solaris package fix. With that came a new version of ImageMagick and new problems. Turns out ImageMagick from OpenCSW was using compiled using OpenMP but support for that isn't in the current version of GCC that OpenCSW has. Here are the steps I took to install RMagick. There might be a simpler way but this worked for me.

wget http://rubyforge.org/frs/download.php/51093/rmagick-2.9.1.gem
gem unpack rmagick-2.9.1.gem
Change line #139 rmagick-2.9.1/ext/RMagick/extconf.rb to: $CFLAGS = ENV["CFLAGS"].to_s + " -I/opt/csw/include/ImageMagick"
cd rmagick-2.9.1
gem build rmagick.gemspec
gem install rmagick-2.9.1.gem

Tags: ruby rmagick solaris