fixes issue when compiling with whatever flags ruby 1.9.3 provides that ... #208

wants to merge 1 commit into


None yet
3 participants

...ruby < 1.9.3 doesn't


Installing ffi (0.6.3) with native extensions Unfortunately, a fatal error has occurred. Please report this error to the Bundler issue tracker at so that we can fix it. Thanks!
/home/vagrant/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/site_ruby/1.9.1/rubygems/installer.rb:552:in `rescue in block in build_extensions': ERROR: Failed to build gem native extension. (Gem::Installer::ExtensionBuildError)

        /home/vagrant/.rvm/rubies/ruby-1.9.3-p125/bin/ruby extconf.rb 
extconf.rb:6: Use RbConfig instead of obsolete and deprecated Config.
checking for ffi_call() in -lffi... yes
checking for ffi_prep_closure()... yes
checking for ffi_raw_call()... yes
checking for ffi_prep_raw_closure()... yes
checking for rb_thread_blocking_region()... yes
creating extconf.h
creating Makefile

compiling ClosurePool.c
compiling StructLayout.c
StructLayout.c: In function ‘struct_layout_initialize’:
StructLayout.c:363: error: lvalue required as left operand of assignment
make: *** [StructLayout.o] Error 1

virtualbox or vagrant depends on this particular version?


ghost commented Jun 26, 2012

Chris, thanks for the patch, but 0.6.3 is pretty ancient, and I'm not going to release any patches for it.

@ghost ghost closed this Jun 26, 2012

@splaspood splaspood referenced this pull request in mitchellh/vagrant-rake Oct 2, 2012


Failed to install on vagrant 1.0.4 /Ubuntu 12.04 #3

For reference there is some combination of gemfile parameters for Vagrant, Chef and json where bundler will resolve the ffi dependency to version 0.6.3. I am not a Ruby expert but I had some luck manually specifying the current version of ffi in my gemfile.

@kevinburke , yep. That was why I made this pull request.

hh commented Feb 11, 2013

I'm running into this as well... noodling a work around.


ghost commented Feb 11, 2013

I merged the patch from @ChrisLundquist into the ffi-0.6 branch, so you should be able to use that from bundler.

gem 'ffi', :git => '', :branch => 'ffi-0.6'

I haven't tested it, but if you have dependencies that require 0.6.3 and you want to run against the latest ffi gem, you could try:

gem 'ffi', '0.6.3', :git => '', :tag => '1.3.1'

Wayne, thanks for the help, and I'm not a Ruby guy, but it seems like a smell that the vagrant/chef bundler combo is relying on a super-old version of ffi. Is there something that can be done with those two projects' dependencies to use a more recent version of ffi?

If a 0.6.4 release is made, bundler will have it "just work", as the dependent gems say something like

gem 'ffi', '~> 0.6.0'

ghost commented Feb 11, 2013

Ok, I pushed 0.6.4. If it breaks any thing, I'll just yank it -ffi-0.6.x is 3 years old, and I'm not going to maintain this branch forever.

This issue was closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment