[#47529] ruby1.9.2 にて、 IO#reopen で第2引数を省略したときにモードが引き継がれない — jugyo kohno <kkohno@...>

jugyo と申します

11 messages 2010/10/08
[#47562] Re: ruby1.9.2 にて、 IO#reopen で第2引数を省略したときにモードが引き継がれない — "Y. NOBUOKA" <nobuoka@...> 2010/10/15

信岡です。

[#47537] Excel用のxmlssファイルを作成するライブラリ exlap_c — "YOSHIIZUMI" <t-yoshiizumi@...>

 吉泉といいます。

11 messages 2010/10/10

[ruby-list:47504] RMagickでインストールエラー

From: "KASIX 南雲 忍" <nagumo@...>
Date: 2010-10-01 04:45:55 UTC
List: ruby-list #47504
はじめまして。南雲と申します。

CentOS5.5, Ruby1.9.1の環境でRMagick2.13.1をgemにてインストールを試みましたが、
checking for stdint.h... *** extconf.rb failed ***
のメッセージと共に失敗してしまいました。

extconf.rbで呼び出しているmkmf.rbのhave_header("stdint.h")でエラーが起きている
ようです。
しかし、stdint.hは/usr/include下に存在しています。

extconf.rbを見ると、have_header("stdint.h")を呼び出す前に、
 $LOCAL_LIB = ENV["LIBS"].to_s + " " + `Magick-config --libs`.chomp
にて変数を設定しているのですが、

この値が正しくないのかも知れません。この行をコメントアウトして、ruby extconf.rb
にて実行すると正常終了してMakefileが作成されました。

なお、$LOCAL_LIBに設定されていた値は、
" -L/usr/lib -lMagickCore -llcms -ltiff -lfreetype -ljpeg -lfftw3 -
lfontconfig -lXext -lSM -lICE -lX11 -lXt -lbz2 -lz -lm -lgomp -lpthread -lltdl"
でした。

これは、rmagickのextconf.rbの問題でしょうか、mkmfの問題でしょうか?
または環境の問題(ImageMagickのインストールの問題)でしょうか?

rmagickをインストールする為にはどのようにしたら良いでしょうか?
ご教示いただけたら幸いです。よろしくお願いします。

以下、gem install 時のメッセージです。

$ gem install rmagick
Building native extensions.  This could take a while...
ERROR:  Error installing rmagick:
        ERROR: Failed to build gem native extension.

/home/nagumo/.rvm/rubies/ruby-1.9.1-p378/bin/ruby extconf.rb
checking for Ruby version >= 1.8.5... yes
checking for gcc... 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=/home/nagumo/.rvm/rubies/ruby-1.9.1-p378/bin/ruby
/home/nagumo/.rvm/rubies/ruby-1.9.1-p378/lib/ruby/1.9.1/mkmf.rb:364:in 
`try_do': The complier failed to generate an executable file. (RuntimeError)
You have to install development tools first.
        from /home/nagumo/.rvm/rubies/ruby-1.9.1-
p378/lib/ruby/1.9.1/mkmf.rb:433:in `try_cpp'
        from /home/nagumo/.rvm/rubies/ruby-1.9.1-
p378/lib/ruby/1.9.1/mkmf.rb:811:in `block in have_header'
        from /home/nagumo/.rvm/rubies/ruby-1.9.1-
p378/lib/ruby/1.9.1/mkmf.rb:670:in `block in checking_for'
        from /home/nagumo/.rvm/rubies/ruby-1.9.1-
p378/lib/ruby/1.9.1/mkmf.rb:276:in `block (2 levels) in postpone'
        from /home/nagumo/.rvm/rubies/ruby-1.9.1-
p378/lib/ruby/1.9.1/mkmf.rb:250:in `open'
        from /home/nagumo/.rvm/rubies/ruby-1.9.1-
p378/lib/ruby/1.9.1/mkmf.rb:276:in `block in postpone'
        from /home/nagumo/.rvm/rubies/ruby-1.9.1-
p378/lib/ruby/1.9.1/mkmf.rb:250:in `open'
        from /home/nagumo/.rvm/rubies/ruby-1.9.1-
p378/lib/ruby/1.9.1/mkmf.rb:272:in `postpone'
        from /home/nagumo/.rvm/rubies/ruby-1.9.1-
p378/lib/ruby/1.9.1/mkmf.rb:669:in `checking_for'
        from /home/nagumo/.rvm/rubies/ruby-1.9.1-
p378/lib/ruby/1.9.1/mkmf.rb:810:in `have_header'
        from extconf.rb:193:in `<main>'

Gem files will remain installed in /home/nagumo/.rvm/gems/ruby-1.9.1-
p378/gems/rmagick-2.13.1 for inspection.
Results logged to /home/nagumo/.rvm/gems/ruby-1.9.1-p378/gems/rmagick-
2.13.1/ext/RMagick/gem_make.out
--
南雲 忍(Shinobu Nagumo) <nagumo@kasix.co.jp>
株式会社 カシックス (KASIX)  システム部
〒945-0833 新潟県柏崎市若葉町2番22号
Tel:0257-22-7352   Fax:0257-22-7001
mobile:080-2037-6158
URL:http://www.kasix.co.jp

 株式会社柏崎情報開発センターは2010年10月1日より
 『株式会社カシックス』に社名が変わりました。


In This Thread

Prev Next