Missing header stdio.h? (when updating hpricot gem)

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

Doug G. 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

On 29 Aug 2008, at 01:48, Doug G. 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

Roger P. 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

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.

You’ll want to use the same compiler that you Ruby distro was compiled
in–MSVC 6 or mingw.
GL!
-=R

Axel E. wrote:
[snip]

See here: Gem (update ?) problem - Ruby - Ruby-Forum (last post).

Best regards,

Axel

Thanks very much! Doug

-------- Original-Nachricht --------

Datum: Fri, 29 Aug 2008 09:48:22 +0900
Von: Doug G. [email protected]
An: [email protected]
Betreff: missing header stdio.h??? (when updating hpricot gem)

d:/ruby/bin/ruby.exe extconf.rb update hpricot
–without-opt-include=${opt-dir}/include
Results logged to
immediately instead of attempting to update the other gems.

See here: Gem (update ?) problem - Ruby - Ruby-Forum (last post).

Best regards,

Axel