gem install bcrypt-ruby fails with --default-version=1.9 #1445

Closed
andreaseger opened this Issue Dec 9, 2011 · 0 comments

Projects

None yet

2 participants

@andreaseger

gem install bcrypt-ruby always fails with "wrapper.c:27:18: error: util.h: No such file or directory"

Here is what I did

ruby -v
$ ruby 1.8.7 (2011-06-30 patchlevel 352) [x86_64-linux]

git clone git://github.com/rubinius/rubinius.git
cd rubinius
./configure --default-version=1.9 --prefix=/home/sch1zo/.rbenv/versions/rbx-master
rake install

#changing PATH to use rbx
# rbenv shell rbx-master

ruby -v
$ rubinius 2.0.0dev (1.9.3 581eee8e yyyy-mm-dd JI) [x86_64-unknown-linux-gnu]

gem install bcrypt-ruby -V

GET http://rubygems.org/latest_specs.4.8.gz
302 Found
GET http://production.s3.rubygems.org/latest_specs.4.8.gz
200 OK
Installing gem bcrypt-ruby-3.0.1
/home/sch1zo/.rbenv/versions/rbx-master/gems/1.9/gems/bcrypt-ruby-3.0.1/.gitignore
/home/sch1zo/.rbenv/versions/rbx-master/gems/1.9/gems/bcrypt-ruby-3.0.1/.rspec
/home/sch1zo/.rbenv/versions/rbx-master/gems/1.9/gems/bcrypt-ruby-3.0.1/CHANGELOG
/home/sch1zo/.rbenv/versions/rbx-master/gems/1.9/gems/bcrypt-ruby-3.0.1/COPYING
/home/sch1zo/.rbenv/versions/rbx-master/gems/1.9/gems/bcrypt-ruby-3.0.1/Gemfile
/home/sch1zo/.rbenv/versions/rbx-master/gems/1.9/gems/bcrypt-ruby-3.0.1/Gemfile.lock
/home/sch1zo/.rbenv/versions/rbx-master/gems/1.9/gems/bcrypt-ruby-3.0.1/README.md
/home/sch1zo/.rbenv/versions/rbx-master/gems/1.9/gems/bcrypt-ruby-3.0.1/Rakefile
/home/sch1zo/.rbenv/versions/rbx-master/gems/1.9/gems/bcrypt-ruby-3.0.1/bcrypt-ruby.gemspec
/home/sch1zo/.rbenv/versions/rbx-master/gems/1.9/gems/bcrypt-ruby-3.0.1/ext/jruby/bcrypt_jruby/BCrypt.java
/home/sch1zo/.rbenv/versions/rbx-master/gems/1.9/gems/bcrypt-ruby-3.0.1/ext/mri/bcrypt_ext.c
/home/sch1zo/.rbenv/versions/rbx-master/gems/1.9/gems/bcrypt-ruby-3.0.1/ext/mri/crypt.c
/home/sch1zo/.rbenv/versions/rbx-master/gems/1.9/gems/bcrypt-ruby-3.0.1/ext/mri/crypt.h
/home/sch1zo/.rbenv/versions/rbx-master/gems/1.9/gems/bcrypt-ruby-3.0.1/ext/mri/crypt_blowfish.c
/home/sch1zo/.rbenv/versions/rbx-master/gems/1.9/gems/bcrypt-ruby-3.0.1/ext/mri/crypt_gensalt.c
/home/sch1zo/.rbenv/versions/rbx-master/gems/1.9/gems/bcrypt-ruby-3.0.1/ext/mri/extconf.rb
/home/sch1zo/.rbenv/versions/rbx-master/gems/1.9/gems/bcrypt-ruby-3.0.1/ext/mri/ow-crypt.h
/home/sch1zo/.rbenv/versions/rbx-master/gems/1.9/gems/bcrypt-ruby-3.0.1/ext/mri/wrapper.c
/home/sch1zo/.rbenv/versions/rbx-master/gems/1.9/gems/bcrypt-ruby-3.0.1/lib/bcrypt.rb
/home/sch1zo/.rbenv/versions/rbx-master/gems/1.9/gems/bcrypt-ruby-3.0.1/lib/bcrypt_engine.rb
/home/sch1zo/.rbenv/versions/rbx-master/gems/1.9/gems/bcrypt-ruby-3.0.1/spec/TestBCrypt.java
/home/sch1zo/.rbenv/versions/rbx-master/gems/1.9/gems/bcrypt-ruby-3.0.1/spec/bcrypt/engine_spec.rb
/home/sch1zo/.rbenv/versions/rbx-master/gems/1.9/gems/bcrypt-ruby-3.0.1/spec/bcrypt/password_spec.rb
/home/sch1zo/.rbenv/versions/rbx-master/gems/1.9/gems/bcrypt-ruby-3.0.1/spec/spec_helper.rb
Building native extensions.  This could take a while...
ERROR:  Error installing bcrypt-ruby:
        ERROR: Failed to build gem native extension.

        /home/sch1zo/.rbenv/versions/rbx-master/bin/rbx extconf.rb
creating Makefile

make
compiling crypt_gensalt.c
compiling bcrypt_ext.c
compiling crypt_blowfish.c
compiling wrapper.c
wrapper.c:27:18: error: util.h: No such file or directory
wrapper.c: In function ‘crypt_gensalt_ra’:
wrapper.c:240: warning: assignment makes pointer from integer without a cast
make: *** [wrapper.o] Error 1

Gem files will remain installed in /home/sch1zo/.rbenv/versions/rbx-master/gems/1.9/gems/bcrypt-ruby-3.0.1 for inspection.
Results logged to /home/sch1zo/.rbenv/versions/rbx-master/gems/1.9/gems/bcrypt-ruby-3.0.1/ext/mri/gem_make.out
@dbussink dbussink added a commit that referenced this issue Dec 9, 2011
@dbussink dbussink Add deprecated headers like MRI does
This shows a warning when using these headers, but there are
packages such as bcrypt-ruby that still use these deprecated
headers. The reason that bcrypt-ruby usually doesn't fail is
that it includes util.h which is a system header on most systems.

If a system didn't have a util.h present it would fail to install
like in issue #1445.

Fixes #1445
d46cc15
@dbussink dbussink added a commit that closed this issue Dec 9, 2011
@dbussink dbussink Add deprecated headers like MRI does
This shows a warning when using these headers, but there are
packages such as bcrypt-ruby that still use these deprecated
headers. The reason that bcrypt-ruby usually doesn't fail is
that it includes util.h which is a system header on most systems.

If a system didn't have a util.h present it would fail to install
like in issue #1445.

Fixes #1445
d46cc15
@dbussink dbussink closed this in d46cc15 Dec 9, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment