Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fail to install on ruby-head 2.0 #84

Closed
zhangpy opened this issue Oct 26, 2011 · 7 comments
Closed

fail to install on ruby-head 2.0 #84

zhangpy opened this issue Oct 26, 2011 · 7 comments

Comments

@zhangpy
Copy link

zhangpy commented Oct 26, 2011

$ruby -v
ruby 2.0.0dev (2011-10-26 trunk 33526) [i686-linux](OS: Ubuntu 11.10)

$ gem install rcov
Fetching: rcov-0.9.11.gem (100%)
Building native extensions. This could take a while...
ERROR: Error installing rcov:
ERROR: Failed to build gem native extension.

    .rvm/rubies/ruby-head/bin/ruby extconf.rb

creating Makefile

make
compiling 1.8/rcovrt.c
1.8/rcovrt.c:2:17: fatal error: env.h: No such file or directory
compilation terminated.
make: *** [rcovrt.o] Error 1

@drbrain
Copy link

drbrain commented Jan 11, 2012

I'm also experiencing this issue. Due to the "1.8" looks like there's an inadequate version check:

Building native extensions.  This could take a while...
rake aborted!
ERROR: Failed to build gem native extension.

        /usr/local/bin/ruby20 extconf.rb
creating Makefile

make
compiling 1.8/callsite.c
1.8/callsite.c:2:10: fatal error: 'env.h' file not found
#include <env.h>
         ^
1 error generated.
make: *** [callsite.o] Error 1


Gem files will remain installed in /Users/drbrain/Work/git/rubygems/tmp/isolate/ruby-1.9.1/gems/rcov-0.9.11 for inspection.
Results logged to /Users/drbrain/Work/git/rubygems/tmp/isolate/ruby-1.9.1/gems/rcov-0.9.11/ext/rcovrt/gem_make.out

@drbrain
Copy link

drbrain commented Jan 11, 2012

The check in the extconf.rb is wrong:

https://github.com/relevance/rcov/blob/master/ext/rcovrt/extconf.rb#L8

Should be if RUBY_VERSION > "1.9"

Same for https://github.com/relevance/rcov/blob/master/ext/rcovrt/extconf.rb#L15

@abedra
Copy link
Contributor

abedra commented Jan 17, 2012

1.9+ support has been completely removed. If you are on 1.9 or higher, you should be using simplecov

@abedra abedra closed this as completed Jan 17, 2012
@fahimbabarpatel
Copy link

facing same issue
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.

    /home/.rvm/rubies/ruby-2.0.0-p0/bin/ruby extconf.rb 

creating Makefile

make
compiling 1.8/rcovrt.c
1.8/rcovrt.c:2:17: fatal error: env.h: No such file or directory
compilation terminated.
make: *** [rcovrt.o] Error

@rennhak
Copy link

rennhak commented May 28, 2013

If you run into this problem make sure to install the simplecov-rcov gem which provides the needed env.h for the latter ruby versions.

@benallfree
Copy link

@rennhak Installing simplecov-rcov didn't fix the env.h problem for me on OS X 10.9

@abedra
Copy link
Contributor

abedra commented Nov 25, 2013

You need to switch to simplecov completely. RCov won't work properly in 2.0 or 1.9

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants