I am trying to install RMagick to use it in a Rails application, but i'm experiencing some problems.
I'm using Rails 5 with Ruby 2.3.1 installed using rvm. The OS it's OSX 10.6 and i've already installed ImageMagick using macports .
When Bundler try to install the RMagick gem i can see that the installation fails and looking in the log i can see the following result:
find_executable: checking for clang... -------------------- yes
find_executable: checking for Magick-config... -------------------- yes
configure_compile_options: checking for outdated ImageMagick version (<= 6.4.9)... no
Detected ImageMagick version: 6.9.5
configure_compile_options: checking for presence of MagickWand API (ImageMagick version >= 6.9.0)... no
Detected 6.9+ version, using MagickWand API
assert_minimum_ruby_version!: checking for Ruby version >= 1.8.5... yes
"clang -o conftest -I/Users/jonny/.rvm/rubies/ruby-2.3.1/include/ruby-2.3.0/x86_64-darwin10.0
-I/Users/jonny/.rvm/rubies/ruby-2.3.1/include/ruby-2.3.0/ruby/backward
-I/Users/jonny/.rvm/rubies/ruby-2.3.1/include/ruby-2.3.0 -I.
-fopenmp -DMAGICKCORE_HDRI_ENABLE=0 -DMAGICKCORE_QUANTUM_DEPTH=16
-fopenmp -DMAGICKCORE_HDRI_ENABLE=0 -DMAGICKCORE_QUANTUM_DEPTH=16
-I/opt/local/include/ImageMagick-6 -fopenmp -DMAGICKCORE_HDRI_ENABLE=0
-DMAGICKCORE_QUANTUM_DEPTH=16 -fopenmp -DMAGICKCORE_HDRI_ENABLE=0
-DMAGICKCORE_QUANTUM_DEPTH=16
-I/opt/local/include/ImageMagick-6 conftest.c -L.
-L/Users/jonny/.rvm/rubies/ruby-2.3.1/lib -L/opt/local/lib
-L/opt/local/lib -lMagickWand-6.Q16 -lMagickCore-6.Q16
-L/opt/local/lib -lMagickWand-6.Q16 -lMagickCore-6.Q16
-lruby.2.3.0 -lpthread -lgmp -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(int argc, char **argv)
4: {
5: return 0;
6: }
/* end */
Someone have a solution to solve the problem ?
I've solved by myself the problem. The problem arise because older version of clang doesn't support openmp so we have to install a newer version.
Using macports i've installed another version of clang enabling the openmp version.
sudo port install clang-3.7 +openmp
After the installation i've checked the name of the clang installed using the command
sudo port select --list clang
The new clang installed name was mp-clang-3.7 so typing in the console
sudo port select --set clang mp-clang-3.7
select the correct version.
After doing that i could install correctly RMagick using bundle.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.