I just got a new macbook pro and trying to setup my dev environment. I downloaded xcode 4.2 from the app store and installed it, after this i installed homebrew and RVM. ImageMagick, readline, ruby 1.9.3-head all installed perfectly until i ran bundle update which tried to install rmagick.
After a long long time investigating i come down to the conclusion that it can't find libgomp.
The output is from gem install rmagick
is:
$ gem install rmagick
Building native extensions. This could take a while...
ERROR: Error installing rmagick:
ERROR: Failed to build gem native extension.
/Users/dhiemstra/.rvm/rubies/ruby-1.9.3-head/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 clang... 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... *** 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/dhiemstra/.rvm/rubies/ruby-1.9.3-head/bin/ruby
/Users/dhiemstra/.rvm/rubies/ruby-1.9.3-head/lib/ruby/1.9.1/mkmf.rb:381:in `try_do': The compiler failed to generate an executable file. (RuntimeError)
You have to install development tools first.
Here is my mkmf.log file:
"clang -o conftest -I/Users/dhiemstra/.rvm/rubies/ruby-1.9.3-head/include/ruby-1.9.1/x86_64-darwin11.2.0 -I/Users/dhiemstra/.rvm/rubies/ruby-1.9.3-head/include/ruby-1.9.1/ruby/backward -I/Users/dhiemstra/.rvm/rubies/ruby-1.9.3-head/include/ruby-1.9.1 -I. -I/usr/local/Cellar/imagemagick/6.7.1-1/include/ImageMagick -I/usr/local/Cellar/imagemagick/6.7.1-1/include/ImageMagick -fopenmp conftest.c -L. -L/Users/dhiemstra/.rvm/rubies/ruby-1.9.3-head/lib -L/usr/local/Cellar/imagemagick/6.7.1-1/lib -L/usr/X11/lib -L/usr/local/Cellar/imagemagick/6.7.1-1/lib -lMagickCore -llcms -ltiff -lfreetype -ljpeg -L/usr/X11/lib -lfontconfig -lXext -lSM -lICE -lX11 -lXt -lbz2 -lz -lm -lgomp -lpthread -lltdl -lruby.1.9.1 -lpthread -ldl -lobjc "
ld: library not found for -lgomp
clang: error: linker command failed with exit code 1 (use -v to see invocation)
checked program was:
/* begin */
1: #include "ruby.h"
2:
3: int main() {return 0;}
/* end */
Now i assumed here that something was wrong with xcode i tried several things:
I have no clue what's left for me to try, could anyone help to push me in the good direction?
I tried to download and install 4.1 for lion and this didn't even install (without a proper error message). Now a colleague gave me this great link to GCC for Mac which worked like a charm: https://github.com/kennethreitz/osx-gcc-installer
Don't forget to download the v2 if you run on > 10.7.0
I tried your solution (full of hope) but It did not work for me unfortunately. Finally I managed to make it work by reinstalling imagemagick without openmp support (this is the library responsible for lgomp)
using Homebrew:
brew install imagemagick --disable-openmp
then rmagick installed without any problems.
For people who want source installation, you can download the source code repository and issue this command in the imagemagick source code directory.
./configure --disable-openmp
It will work similar to the brew version above but with source code compilation instead.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With