Windows installation rmagick error-Collection of common programming errors
Specification: – Windows 7 x64 – Ruby 2.0.0 x64 – DevKit-mingw64-64-4.7.2
I try install redmine bundles, but when I use bundle install
then got error
d:\www\xampp\htdocs\projekty\redmine\redmine-2.3.3>bundle install
Fetching gem metadata from https://rubygems.org/.........
Fetching gem metadata from https://rubygems.org/..
Resolving dependencies...
Using rake (10.1.0)
Using i18n (0.6.1)
Using multi_json (1.8.2)
Using activesupport (3.2.13)
Using builder (3.0.0)
Using activemodel (3.2.13)
Using erubis (2.7.0)
Using journey (1.0.4)
Using rack (1.4.5)
Using rack-cache (1.2)
Using rack-test (0.6.2)
Using hike (1.2.3)
Using tilt (1.4.1)
Using sprockets (2.2.2)
Using actionpack (3.2.13)
Using mime-types (1.25)
Using polyglot (0.3.3)
Using treetop (1.4.15)
Using mail (2.5.4)
Using actionmailer (3.2.13)
Using arel (3.0.2)
Using tzinfo (0.3.38)
Using activerecord (3.2.13)
Using activeresource (3.2.13)
Using bundler (1.3.5)
Using ffi (1.9.1)
Using childprocess (0.3.9)
Using rubyzip (1.0.0)
Using websocket (1.0.7)
Using selenium-webdriver (2.37.0)
Using xpath (1.0.0)
Using capybara (2.0.3)
Using coderay (1.0.9)
Using rack-ssl (1.3.3)
Using json (1.8.1)
Using rdoc (3.12.2)
Using thor (0.18.1)
Using railties (3.2.13)
Using jquery-rails (2.0.3)
Using metaclass (0.0.1)
Using mocha (0.13.3)
Using mysql2 (0.3.13)
Using net-ldap (0.3.1)
Using ruby-openid (2.2.3)
Using rack-openid (1.4.0)
Using rails (3.2.13)
Installing rmagick (2.13.2)
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
C:/Ruby200-x64/bin/ruby.exe extconf.rb
checking for Ruby version >= 1.8.5... 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=C:/Ruby200-x64/bin/ruby
C:/Ruby200-x64/lib/ruby/2.0.0/mkmf.rb:430:in `try_do': The compiler failed to generate an executable file. (Ru
ntimeError)
You have to install development tools first.
from C:/Ruby200-x64/lib/ruby/2.0.0/mkmf.rb:561:in `try_cpp'
from C:/Ruby200-x64/lib/ruby/2.0.0/mkmf.rb:1040:in `block in have_header'
from C:/Ruby200-x64/lib/ruby/2.0.0/mkmf.rb:891:in `block in checking_for'
from C:/Ruby200-x64/lib/ruby/2.0.0/mkmf.rb:336:in `block (2 levels) in postpone'
from C:/Ruby200-x64/lib/ruby/2.0.0/mkmf.rb:306:in `open'
from C:/Ruby200-x64/lib/ruby/2.0.0/mkmf.rb:336:in `block in postpone'
from C:/Ruby200-x64/lib/ruby/2.0.0/mkmf.rb:306:in `open'
from C:/Ruby200-x64/lib/ruby/2.0.0/mkmf.rb:332:in `postpone'
from C:/Ruby200-x64/lib/ruby/2.0.0/mkmf.rb:890:in `checking_for'
from C:/Ruby200-x64/lib/ruby/2.0.0/mkmf.rb:1039:in `have_header'
from extconf.rb:194:in `'
Gem files will remain installed in C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/rmagick-2.13.2 for inspection.
Results logged to C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/rmagick-2.13.2/ext/RMagick/gem_make.out
An error occurred while installing rmagick (2.13.2), and Bundler cannot
continue.
Make sure that `gem install rmagick -v '2.13.2'` succeeds before bundling.
I have ImageMagick
d:\www\xampp\htdocs\projekty\redmine\redmine-2.3.3>convert --version
Version: ImageMagick 6.8.7-2 2013-10-18 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2013 ImageMagick Studio LLC
Features: DPC OpenMP
Delegates: bzlib freetype jbig jng jp2 jpeg lcms lqr png ps png tiff webp xml zlib
I try use something like this:
gem install rmagick --platform=ruby -- --with-opt-lib=C:/Ruby200-x64/ImageMagick/lib --with-opt-include=C:/Ruby200-x64/ImageMagick/include
But i got the same errors. My mkmf.log look like this:
checking for 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. -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 -L. -lCORE_RL_magick_ -lX11 -lx64-msvcrt-ruby200 -lshell32 -lws2_32 -limagehlp -lshlwapi "
c:/ruby200-x64/devkit/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.7.2/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:/Ruby200-x64/ImageMagick/lib/../lib/X11.lib when searching for -lX11
c:/ruby200-x64/devkit/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.7.2/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:/Ruby200-x64/ImageMagick/lib/X11.lib when searching for -lX11
c:/ruby200-x64/devkit/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.7.2/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:/Ruby200-x64/ImageMagick/lib/../lib/X11.lib when searching for -lX11
c:/ruby200-x64/devkit/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.7.2/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:/Ruby200-x64/ImageMagick/lib/../lib\X11.lib when searching for -lX11
c:/ruby200-x64/devkit/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.7.2/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:/Ruby200-x64/ImageMagick/lib/X11.lib when searching for -lX11
c:/ruby200-x64/devkit/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.7.2/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:/Ruby200-x64/ImageMagick/lib\X11.lib when searching for -lX11
c:/ruby200-x64/devkit/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
4: #include
5: int main(int argc, char **argv)
6: {
7: return 0;
8: }
/* end */
I haven’t any idea what i do wrong.