RMagick

R

Rong

the Mkmf.log.

<main>: checking for Ruby version >=3D 1.8.2... -------------------- yes

--------------------

find_executable: checking for gcc... -------------------- yes

--------------------

find_executable: checking for Magick-config... --------------------
yes

--------------------

<main>: checking for ImageMagick version >=3D 6.3.0...
-------------------- yes

--------------------

<main>: checking for HDRI disabled version of ImageMagick...
-------------------- yes

--------------------
 
R

Rong

Terminal output

ronald-greens-imac:~ ron$ sudo gem install rmagick
Password:
Building native extensions. This could take a while...
ERROR: Error installing rmagick:
ERROR: Failed to build gem native extension.

/usr/local/bin/ruby extconf.rb install rmagick
checking for Ruby version >=3D 1.8.2... yes
checking for gcc... yes
checking for Magick-config... yes
checking for ImageMagick version >=3D 6.3.0... 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=3D${opt-dir}/include
--with-opt-lib
--without-opt-lib=3D${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=3D.
--curdir
--ruby=3D/usr/local/bin/ruby
/usr/local/lib/ruby/1.9.1/mkmf.rb:362:in `try_do': The complier failed
to generate an executable file. (RuntimeError)
You have to install development tools first.
from /usr/local/lib/ruby/1.9.1/mkmf.rb:431:in `try_cpp'
from /usr/local/lib/ruby/1.9.1/mkmf.rb:809:in `block in have_header'
from /usr/local/lib/ruby/1.9.1/mkmf.rb:668:in `block in checking_for'
from /usr/local/lib/ruby/1.9.1/mkmf.rb:274:in `block (2 levels) in
postpone'
from /usr/local/lib/ruby/1.9.1/mkmf.rb:248:in `open'
from /usr/local/lib/ruby/1.9.1/mkmf.rb:274:in `block in postpone'
from /usr/local/lib/ruby/1.9.1/mkmf.rb:248:in `open'
from /usr/local/lib/ruby/1.9.1/mkmf.rb:270:in `postpone'
from /usr/local/lib/ruby/1.9.1/mkmf.rb:667:in `checking_for'
from /usr/local/lib/ruby/1.9.1/mkmf.rb:808:in `have_header'
from extconf.rb:161:in `<main>'


Gem files will remain installed in /usr/local/lib/ruby/gems/1.9.1/gems/
rmagick-2.9.1 for inspection.
Results logged to /usr/local/lib/ruby/gems/1.9.1/gems/rmagick-2.9.1/
ext/RMagick/gem_make.out


GCC version 4.0.1

MkMF.log

<main>: checking for Ruby version >=3D 1.8.2... -------------------- yes

--------------------

find_executable: checking for gcc... -------------------- yes

--------------------

find_executable: checking for Magick-config... --------------------
yes

--------------------

<main>: checking for ImageMagick version >=3D 6.3.0...
-------------------- yes

--------------------

<main>: checking for HDRI disabled version of ImageMagick...
-------------------- yes

--------------------

Yes, this all that's in this file. I checked the last modified time
and date and it is correct.

As stated above the ImageMagick install is the os x binary.
the Mkmf.log.

<main>: checking for Ruby version >=3D 1.8.2... -------------------- yes

--------------------

find_executable: checking for gcc... -------------------- yes

--------------------

find_executable: checking for Magick-config... --------------------
yes

--------------------

<main>: checking for ImageMagick version >=3D 6.3.0...
-------------------- yes

--------------------

<main>: checking for HDRI disabled version of ImageMagick...
-------------------- yes

--------------------

RMagick works just fine with 1.9.1. I'm waiting for the O.P. to show hi= s
mkmf.log.
 
T

Tim Hunter

Rong said:
Terminal output

ronald-greens-imac:~ ron$ sudo gem install rmagick
Password:
Building native extensions. This could take a while...
ERROR: Error installing rmagick:
ERROR: Failed to build gem native extension.

/usr/local/bin/ruby extconf.rb install rmagick
checking for Ruby version >= 1.8.2... yes
checking for gcc... yes
checking for Magick-config... yes
checking for ImageMagick version >= 6.3.0... 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=/usr/local/bin/ruby
/usr/local/lib/ruby/1.9.1/mkmf.rb:362:in `try_do': The complier failed
to generate an executable file. (RuntimeError)
You have to install development tools first.
from /usr/local/lib/ruby/1.9.1/mkmf.rb:431:in `try_cpp'
from /usr/local/lib/ruby/1.9.1/mkmf.rb:809:in `block in have_header'
from /usr/local/lib/ruby/1.9.1/mkmf.rb:668:in `block in checking_for'
from /usr/local/lib/ruby/1.9.1/mkmf.rb:274:in `block (2 levels) in
postpone'
from /usr/local/lib/ruby/1.9.1/mkmf.rb:248:in `open'
from /usr/local/lib/ruby/1.9.1/mkmf.rb:274:in `block in postpone'
from /usr/local/lib/ruby/1.9.1/mkmf.rb:248:in `open'
from /usr/local/lib/ruby/1.9.1/mkmf.rb:270:in `postpone'
from /usr/local/lib/ruby/1.9.1/mkmf.rb:667:in `checking_for'
from /usr/local/lib/ruby/1.9.1/mkmf.rb:808:in `have_header'
from extconf.rb:161:in `<main>'


Gem files will remain installed in /usr/local/lib/ruby/gems/1.9.1/gems/
rmagick-2.9.1 for inspection.
Results logged to /usr/local/lib/ruby/gems/1.9.1/gems/rmagick-2.9.1/
ext/RMagick/gem_make.out


GCC version 4.0.1

MkMF.log

<main>: checking for Ruby version >= 1.8.2... -------------------- yes

--------------------

find_executable: checking for gcc... -------------------- yes

--------------------

find_executable: checking for Magick-config... --------------------
yes

--------------------

<main>: checking for ImageMagick version >= 6.3.0...
-------------------- yes

--------------------

<main>: checking for HDRI disabled version of ImageMagick...
-------------------- yes

--------------------

Yes, this all that's in this file. I checked the last modified time
and date and it is correct.

As stated above the ImageMagick install is the os x binary.

I think your XCode Tools installation is corrupt and you need to reinstall.

Here's why. The failure occurs the first time extconf.rb tries to
execute gcc. Here's the same part of mkmf.log when I run it on OS X 10.5.6:

checking for Ruby version >= 1.8.2... -------------------- yes

--------------------

find_executable: checking for gcc... -------------------- yes

--------------------

find_executable: checking for Magick-config... -------------------- yes

--------------------

checking for ImageMagick version >= 6.3.0... -------------------- yes

--------------------

checking for HDRI disabled version of ImageMagick...-------------------- yes

--------------------

have_header: checking for stdint.h... -------------------- yes

"gcc -E -I. -I/usr/local/lib/ruby/1.8/powerpc-darwin9.4.0
-I/Users/timothyhunter/RMagick/ext/RMagick -I/opt/local/include
-I/opt/local/include/ImageMagick -Wall -g
-I/opt/local/include/ImageMagick conftest.c -o conftest.i"
checked program was:
/* begin */
1: #include <stdint.h>
/* end */

--------------------

The first few tests don't use gcc. The Ruby version test checks the
value of RUBY_VERSION. The test for gcc searches your $PATH for the gcc
executable. Similarly the test for Magick-config searches your $PATH for
the Magick-config script. The test for the ImageMagick version executes
Magick-config and checks the output. The test for the "HDRI disabled
version of ImageMagick" also executes Magick-config.

It's not until the test for stdint.h that extconf.rb (via mkmf.rb) needs
to actually execute gcc. To perform this test, mkmf.rb a minimal C
program and then tries to compile it with gcc. If gcc successfully
compiles the program then mkmf.rb concludes that stdint.h is present,
otherwise it concludes that stdint.h is missing. (A missing stdint.h is
not a terminal error, btw.)

Now, if stdint.h was missing, this what you'd see in mkmf.log.

have_header: checking for stdint.h... -------------------- no

"gcc -E -I. -I/usr/local/lib/ruby/1.8/powerpc-darwin9.4.0 -I.
-I/opt/local/include -I/opt/local/include/ImageMagick -Wall -g
-I/opt/local/include/ImageMagick conftest.c -o conftest.i"
conftest.c:1:21: error: stdint.h: No such file or directory
checked program was:
/* begin */
1: #include <stdint.h>
/* end */

However, your mkmf.log file simply stops without even logging the
"checking for stdint.h..." that you see on the terminal. Also, there's
no Ruby traceback on the terminal, just an abrupt statement that "***
extconf.rb failed ***".

My conclusion is that gcc abended, forcing extconf.rb to stop running
immediately. Therefore the fix I recommend is to reinstall the XCode
Tools, either from your OS X install DVD or by downloading a new copy
from the Apple Developer Connection web site
(http://developer.apple.com). You may want to uninstall the current copy
of XCode Tools first, just to be sure. Here's instructions for doing
that: http://www.meandmark.com/xcodetips.html.

Good luck!
 
R

Rong

I downloaded the newest version of XCode Tools from ADC.
I cannot uninstall previous version because the file referenced in the
link you provided does not exist.
Anyway, reinstalled Xcode tools 3.1.2.

Reran sudo gem instakk RMagick.

Same result.
 
T

Tim Hunter

Rong said:
I downloaded the newest version of XCode Tools from ADC.
I cannot uninstall previous version because the file referenced in the
link you provided does not exist.
Anyway, reinstalled Xcode tools 3.1.2.

Reran sudo gem instakk RMagick.

Same result.

Well, that was my best shot. Sorry, I don't have any other suggestions.
Perhaps somebody else will be able to help. Good luck!
 
T

Torey Heinz

Ron said:
I installed the ImageMagick binary but when I try to install RMagick
(gem) I get the foloowing error-
/usr/local/bin/ruby extconf.rb install rmagick
checking for Ruby version >= 1.8.2... yes
checking for gcc... yes
checking for Magick-config... no
Can't install RMagick 2.9.1. Can't find Magick-config in /usr/local/
bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/
X11/bin:/usr/local/git/bin

*** 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.

What do I need to do?

I Ran into some problems with Rmagick after upgrading to Ubuntu 9.04. I
tried to fix by reinstalling the Rmagick Gem, got the same error as
above. I ended up installing librmagick-ruby and friends, this fixed my
Rmagick problem,,but I still can install as gem, which would be my
prefferance.

I post here if I find solution.
 
S

Serabe

2009/4/27 Torey Heinz said:
I Ran into some problems with Rmagick after upgrading to Ubuntu 9.04. I
tried to fix by reinstalling the Rmagick Gem, got the same error as
above. =A0I ended up installing librmagick-ruby and friends, this fixed m= y
Rmagick problem,,but I still can install as gem, which would be my
prefferance.

I post here if I find solution.

Did you install libmagick*-dev?

Cheers,

Serabe

--=20
http://www.serabe.com
 
T

Torey Heinz

Serabe said:
Did you install libmagick*-dev?

Cheers,

Serabe

I just checked and I do not have them installed, even though I thought I
did. After installing libmagick*-dev, I was able to install the rmagick
gem.

Thanks,
Torey
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,968
Messages
2,570,150
Members
46,696
Latest member
BarbraOLog

Latest Threads

Top