[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

missing header stdio.h??? (when updating hpricot gem

Doug Glidden

8/29/2008 12:48:00 AM

I just ran 'gem update' this evening, and during the update for hpricot,
I got a rather surprising error. Here's the complete output from gem:

-----
Updating installed gems
Updating hpricot
Building native extensions. This could take a while...
ERROR: While executing gem ... (Gem::Installer::ExtensionBuildError)
ERROR: Failed to build gem native extension.

d:/ruby/bin/ruby.exe extconf.rb update hpricot
checking for stdio.h... no
*** 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
--srcdir=.
--curdir
--ruby=d:/ruby/bin/ruby


Gem files will remain installed in
d:/ruby/lib/ruby/gems/1.8/gems/hpricot-0.6.161 for inspection.
Results logged to
d:/ruby/lib/ruby/gems/1.8/gems/hpricot-0.6.161/ext/fast_xs/gem_make.out
-----

Neither mkmf.log nor gem_make.out contains any additional helpful
information. This only seems to happen with hpricot (I have manually
updated other gems successfully). It sounds like there might be a lib
missing from the distribution of hpricot.

I don't actually use that gem at present, so it's not critical, but it
piqued my interest, and it's slightly annoying because gem aborts
immediately instead of attempting to update the other gems.

- Doug
--
Posted via http://www.ruby-....

3 Answers

Roger Pack

8/29/2008 6:28:00 AM

0

Doug Glidden wrote:
> I just ran 'gem update' this evening, and during the update for hpricot,
> I got a rather surprising error. Here's the complete output from gem:
>
> -----
> Updating installed gems
> Updating hpricot
> Building native extensions. This could take a while...
> ERROR: While executing gem ... (Gem::Installer::ExtensionBuildError)
> ERROR: Failed to build gem native extension.

It's attempting to compile it. This error means either you don't have a
compiler or your compiler lives in a directory with spaces in it.
I know that hpricot does compile if these two aren't the case [i.e.
mingw + devkit works fine].
You could also install an older version that has a precompiled binary.
-=R
--
Posted via http://www.ruby-....

Frederick Cheung

8/29/2008 10:22:00 AM

0


On 29 Aug 2008, at 01:48, Doug Glidden wrote:

> I just ran 'gem update' this evening, and during the update for
> hpricot,
> I got a rather surprising error. Here's the complete output from gem:
>
Do you have a working C compiler installed? Sounds like you don't

Fred
> -----
> Updating installed gems
> Updating hpricot
> Building native extensions. This could take a while...
> ERROR: While executing gem ... (Gem::Installer::ExtensionBuildError)
> ERROR: Failed to build gem native extension.
>
> d:/ruby/bin/ruby.exe extconf.rb update hpricot
> checking for stdio.h... no
> *** 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
> --srcdir=.
> --curdir
> --ruby=d:/ruby/bin/ruby
>
>
> Gem files will remain installed in
> d:/ruby/lib/ruby/gems/1.8/gems/hpricot-0.6.161 for inspection.
> Results logged to
> d:/ruby/lib/ruby/gems/1.8/gems/hpricot-0.6.161/ext/fast_xs/
> gem_make.out
> -----
>
> Neither mkmf.log nor gem_make.out contains any additional helpful
> information. This only seems to happen with hpricot (I have manually
> updated other gems successfully). It sounds like there might be a lib
> missing from the distribution of hpricot.
>
> I don't actually use that gem at present, so it's not critical, but it
> piqued my interest, and it's slightly annoying because gem aborts
> immediately instead of attempting to update the other gems.
>
> - Doug
> --
> Posted via http://www.ruby-....
>


Doug Glidden

8/29/2008 12:39:00 PM

0

Roger Pack wrote:
[snip]
> It's attempting to compile it. This error means either you don't have a
> compiler or your compiler lives in a directory with spaces in it.
[snip]

Sounds likely. The same update worked fine on my work machine this
morning. I'll take a look when I get home this evening. I wasn't
expecting to need a C compiler to install a ruby gem. I'm pretty sure I
have some version of gcc installed, but I'm not sure where it's located
or if I have an environment variable pointing to it.

Thanks,
Doug
--
Posted via http://www.ruby-....