imagemagick - Installing rmagick gem on Windows 8 x64 for Ruby 2.0 x64 -


i'm trying install rmagick gem on windows 8, ruby 2.0 - 64-bit flavour. installed ruby 2.0 rubyinstaller - version 2.0.0p247, installed devkit-mingw64-64-4.7.2-20130224 on top. installed imagemagic - imagemagick-6.8.6-4-q16-x64-dll version, exact, developer headers of course. directly on c: drive in respective subfolders without spaces in names. try build gem.

gem install rmagick --platform=ruby -- --with-opt-lib=c:/imagemagi 

ck-6.8.6-q16/lib --with-opt-include=c:/imagemagick-6.8.6-q16/include

the output is

    temporarily enhancing path include devkit...     building native extensions.  take while... error:  error installing rmagick:         error: failed build gem native extension.      c:/ruby200-x64/bin/ruby.exe extconf.rb checking ruby version >= 1.8.5... yes checking stdint.h... *** extconf.rb failed *** not create makefile due reason, lack of necessary libraries and/or headers.  check mkmf.log file more details.  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=c:/ruby200-x64/bin/ruby c:/ruby200-x64/lib/ruby/2.0.0/mkmf.rb:430:in `try_do': compiler failed ge nerate executable file. (runtimeerror) have install development tools first.         c:/ruby200-x64/lib/ruby/2.0.0/mkmf.rb:561:in `try_cpp'         c:/ruby200-x64/lib/ruby/2.0.0/mkmf.rb:1040:in `block in have_header '         c:/ruby200-x64/lib/ruby/2.0.0/mkmf.rb:891:in `block in checking_for '         c:/ruby200-x64/lib/ruby/2.0.0/mkmf.rb:336:in `block (2 levels) in p ostpone'         c:/ruby200-x64/lib/ruby/2.0.0/mkmf.rb:306:in `open'         c:/ruby200-x64/lib/ruby/2.0.0/mkmf.rb:336:in `block in postpone'         c:/ruby200-x64/lib/ruby/2.0.0/mkmf.rb:306:in `open'         c:/ruby200-x64/lib/ruby/2.0.0/mkmf.rb:332:in `postpone'         c:/ruby200-x64/lib/ruby/2.0.0/mkmf.rb:890:in `checking_for'         c:/ruby200-x64/lib/ruby/2.0.0/mkmf.rb:1039:in `have_header'         extconf.rb:194:in `<main>'   gem files remain installed in c:/ruby200-x64/lib/ruby/gems/2.0.0/gems/rmagi ck-2.13.2 inspection. results logged c:/ruby200-x64/lib/ruby/gems/2.0.0/gems/rmagick-2.13.2/ext/rma gick/gem_make.out 

however think problem not in stdint.h file. check content of file

c:\ruby200-x64\lib\ruby\gems\2.0.0\gems\rmagick-2.13.2\ext\rmagick\

which is

    checking ruby version >= 1.8.5... -------------------- yes  --------------------  "x86_64-w64-mingw32-gcc -o conftest.exe -ic:/ruby200-x64/include/ruby-2.0.0/x64-mingw32 -ic:/ruby200-x64/include/ruby-2.0.0/ruby/backward -ic:/ruby200-x64/include/ruby-2.0.0 -i. -ic:/imagemagick-6.8.6-q16/include -dfd_setsize=2048 -d_win32_winnt=0x0501 -d_file_offset_bits=64   -o3 -fno-omit-frame-pointer -fno-fast-math -g -wall -wextra -wno-unused-parameter -wno-parentheses -wno-long-long -wno-missing-field-initializers -wunused-variable -wpointer-arith -wwrite-strings -wdeclaration-after-statement -wimplicit-function-declaration conftest.c  -l. -lc:/ruby200-x64/lib -lc:/imagemagick-6.8.6-q16/lib -l.    -lcore_rl_magick_ -lx11  -lx64-msvcrt-ruby200  -lshell32 -lws2_32 -limagehlp -lshlwapi  " c:/devkit-x64/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.7.2/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible c:/imagemagick-6.8.6-q16/lib/x11.lib when searching -lx11 c:/devkit-x64/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.7.2/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible c:/imagemagick-6.8.6-q16/lib/x11.lib when searching -lx11 c:/devkit-x64/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.7.2/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible c:/imagemagick-6.8.6-q16/lib\x11.lib when searching -lx11 c:/devkit-x64/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.7.2/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lx11 collect2.exe: error: ld returned 1 exit status checked program was: /* begin */ 1: #include "ruby.h" 2:  3: #include <winsock2.h> 4: #include <windows.h> 5: int main(int argc, char **argv) 6: { 7:   return 0; 8: } /* end */ 

which looks problem x11.lib file. is, of course, located in imagemagick lib folder, has date of 2009, , have no idea next or think this. i'm working large files - 6000x6000 pixels love use 64bit versions wherether possible.

i experiencing same problem. using ruby 2.0.0p247 , gem 2.0.7 imagemagick 6.8.6

i have tried 32 bit , 64 bit version of imagemagick. in both cases, terminal output same:

$ gem install rmagick --platform=ruby -- --with-opt-dir=/c/imagemagick64 temporarily enhancing path include devkit... building native extensions with: '--with-opt-dir=c:/imagemagick64' take while... error:  error installing rmagick:         error: failed build gem native extension.      c:/ruby200-x64/bin/ruby.exe extconf.rb --with-opt-dir=c:/imagemagick64 checking ruby version >= 1.8.5... yes checking stdint.h... *** extconf.rb failed *** not create makefile due reason, lack of necessary libraries and/or headers.  check mkmf.log file more details.  may need configuration options.  provided configuration options:         --with-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=c:/ruby200-x64/bin/ruby c:/ruby200-x64/lib/ruby/2.0.0/mkmf.rb:430:in `try_do': compiler failed ge nerate executable file. (runtimeerror) have install development tools first.         c:/ruby200-x64/lib/ruby/2.0.0/mkmf.rb:561:in `try_cpp'         c:/ruby200-x64/lib/ruby/2.0.0/mkmf.rb:1040:in `block in have_header '         c:/ruby200-x64/lib/ruby/2.0.0/mkmf.rb:891:in `block in checking_for '         c:/ruby200-x64/lib/ruby/2.0.0/mkmf.rb:336:in `block (2 levels) in p ostpone'         c:/ruby200-x64/lib/ruby/2.0.0/mkmf.rb:306:in `open'         c:/ruby200-x64/lib/ruby/2.0.0/mkmf.rb:336:in `block in postpone'         c:/ruby200-x64/lib/ruby/2.0.0/mkmf.rb:306:in `open'         c:/ruby200-x64/lib/ruby/2.0.0/mkmf.rb:332:in `postpone'         c:/ruby200-x64/lib/ruby/2.0.0/mkmf.rb:890:in `checking_for'         c:/ruby200-x64/lib/ruby/2.0.0/mkmf.rb:1039:in `have_header'         extconf.rb:194:in `<main>'   gem files remain installed in c:/ruby200-x64/lib/ruby/gems/2.0.0/gems/rmagi ck-2.13.2 inspection. results logged c:/ruby200-x64/lib/ruby/gems/2.0.0/gems/rmagick-2.13.2/ext/rma gick/gem_make.out 

however, when use 32 bit version, mkmf.log file gives me error both core_rl_magick_.lib , x11.lib (incompatible version). when use 64 bit version, error on x11.lib.

this leads me believe x11.lib bad, maybe 32 bit version included distribution.

my mkmf.log file follows:

checking ruby version >= 1.8.5... -------------------- yes  --------------------  "x86_64-w64-mingw32-gcc -o conftest.exe -ic:/ruby200-x64/include/ruby-2.0.0/x64-mingw32 -ic:/ruby200-x64/include/ruby-2.0.0/ruby/backward -ic:/ruby200-x64/include/ruby-2.0.0 -i. -ic:/imagemagick64/include -dfd_setsize=2048 -d_win32_winnt=0x0501 -d_file_offset_bits=64   -o3 -fno-omit-frame-pointer -fno-fast-math -g -wall -wextra -wno-unused-parameter -wno-parentheses -wno-long-long -wno-missing-field-initializers -wunused-variable -wpointer-arith -wwrite-strings -wdeclaration-after-statement -wimplicit-function-declaration conftest.c  -l. -lc:/ruby200-x64/lib -lc:/imagemagick64/lib -l.    -lcore_rl_magick_ -lx11  -lx64-msvcrt-ruby200  -lshell32 -lws2_32 -limagehlp -lshlwapi  " c:/ruby200-x64/rubydevkit/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.7.2/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible c:/imagemagick64/lib/x11.lib when searching -lx11 c:/ruby200-x64/rubydevkit/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.7.2/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible c:/imagemagick64/lib/x11.lib when searching -lx11 c:/ruby200-x64/rubydevkit/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.7.2/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible c:/imagemagick64/lib\x11.lib when searching -lx11 c:/ruby200-x64/rubydevkit/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.7.2/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lx11 collect2.exe: error: ld returned 1 exit status checked program was: /* begin */ 1: #include "ruby.h" 2:  3: #include <winsock2.h> 4: #include <windows.h> 5: int main(int argc, char **argv) 6: { 7:   return 0; 8: } /* end */ 

i know doesn't answer question, able gem built using 32 bit version of ruby 32 bit imagemagick library - "just works"


Comments