Can't install ffi on windows 7

154 views
Skip to first unread message

bmccab...@gmail.com

unread,
May 19, 2015, 10:18:55 AM5/19/15
to ruby...@googlegroups.com
Hi,

I can't install ffi. I get this error:

H:\Automated tests\gems>gem install ffi-1.9.0.gem
Temporarily enhancing PATH to include DevKit...
Building native extensions.  This could take a while...
ERROR:  Error installing ffi-1.9.0.gem:
        ERROR: Failed to build gem native extension.

        C:/Ruby193/bin/ruby.exe extconf.rb
checking for ffi.h... no
checking for ffi.h in /usr/local/include,/usr/include/ffi... no
checking for rb_thread_blocking_region()... yes
checking for rb_thread_call_with_gvl()... yes
checking for rb_thread_call_without_gvl()... yes
checking for ffi_prep_cif_var()... no
creating extconf.h
creating Makefile

make
generating ffi_c-i386-mingw32.def
Configuring libffi
configure: error: in `/c/Ruby193/lib/ruby/gems/1.9.1/gems/ffi-1.9.0/ext/ffi_c/libffi-i386-mingw32':
configure: error: cannot run C compiled programs.
If you meant to cross compile, use `--host'.
See `config.log' for more details
make: *** ["/c/Ruby193/lib/ruby/gems/1.9.1/gems/ffi-1.9.0/ext/ffi_c/libffi-i386-mingw32"/.libs/libffi_convenience.a] Error 1


Gem files will remain installed in C:/Ruby193/lib/ruby/gems/1.9.1/gems/ffi-1.9.0 for inspection.
Results logged to C:/Ruby193/lib/ruby/gems/1.9.1/gems/ffi-1.9.0/ext/ffi_c/gem_make.out


I'm surprised to be in this state because I had everything working yesterday.

I am running Windows 7 64-bit
Ruby 1.9.3p5.4.5
I have DevKit installed under
C:/Ruby193/DevKit

As far as I was aware, DevKit is the only prerequisite.

I would like to use ffi 1.9.0, but can use a higher version if required.

I have attached the file config.log which appears to contain the errors from the install.

Note that I am behind a firewall; however I have the gems sitting in the install directory, and other gems have installed fine from there before.



I have ffi 1.9.8 installed already, but it is not recognised by Cucumber when I run it:

H:\PaCT stuff\pact>cucumber -p check
Could not find ffi (>= 1.0.11, ~> 1.0) amongst [activesupport-3.2.13, addressable-2.3.6, bigdecimal-1.1.0, builder-3.2.2, bundler-1.9.4, cap
ybara-2.2.1, childprocess-0.5.6, coderay-1.1.0, csv-mapper-0.5.1, cucumber-2.0.0, cucumber-core-1.1.3, data_magic-0.20, diff-lcs-1.2.5, fake
r-1.4.3, fastercsv-1.5.5, ffi-1.9.8-x64-mingw32, fig_newton-0.11, gherkin-2.12.2-x86-mingw32, gli-2.13.0, gmail-0.5.0, gmail_xoauth-0.4.1, i
18n-0.7.0, i18n-0.6.1, io-console-0.3, json-1.8.2, json-1.8.1, json2csv-0.0.4, json_pure-1.8.2, magic_encoding-0.0.2, mail-2.6.3, method_sou
rce-0.8.2, mime-types-2.2, mini_portile-0.6.0, minitest-5.4.2, multi_json-1.10.1, multi_test-0.1.2, nokogiri-1.6.3.rc1-x86-mingw32, oauth-0.
4.7, page-object-1.0.3, page_navigation-0.9, pry-0.10.1, pry-doc-0.6.0, rack-1.5.2, rack-test-0.6.2, rake-10.4.2, rake-0.9.2.2, rautomation-
0.17.0, rdoc-3.9.5, require_all-1.3.2, rspec-3.0.0, rspec-core-3.0.0, rspec-expectations-3.0.0, rspec-mocks-3.0.0, rspec-support-3.0.0, ruby
gems-update-2.4.7, rubygems-update-2.2.2, rubyzip-1.1.4, selenium-webdriver-2.44.0, site_prism-2.6, slop-3.6.0, smarter_csv-1.0.19, syntax-1
.2.0, terminal-table-1.4.5, test-unit-2.5.5, thread_safe-0.3.4, time_diff-0.3.0, tzinfo-1.2.2, watir-webdriver-0.6.11, websocket-1.2.1, win3
2ole-pp-1.2.0, xpath-2.0.0, yard-0.8.7.6, yml_reader-0.4] (Gem::LoadError)
C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:247:in `to_specs'
C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb:778:in `block in activate_dependencies'
C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb:767:in `each'
C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb:767:in `activate_dependencies'
C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb:751:in `activate'
C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb:781:in `block in activate_dependencies'
C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb:767:in `each'
C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb:767:in `activate_dependencies'
C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb:751:in `activate'
C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb:781:in `block in activate_dependencies'
C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb:767:in `each'
C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb:767:in `activate_dependencies'
C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb:751:in `activate'
C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems.rb:212:in `rescue in try_activate'
C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems.rb:209:in `try_activate'
C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:59:in `rescue in require'
C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:35:in `require'
H:/PaCT stuff/pact/features/support/env.rb:2:in `<top (required)>'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/cucumber-2.0.0/lib/cucumber/rb_support/rb_language.rb:94:in `load'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/cucumber-2.0.0/lib/cucumber/rb_support/rb_language.rb:94:in `load_code_file'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/cucumber-2.0.0/lib/cucumber/runtime/support_code.rb:237:in `load_file'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/cucumber-2.0.0/lib/cucumber/runtime/support_code.rb:97:in `block in load_files!'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/cucumber-2.0.0/lib/cucumber/runtime/support_code.rb:96:in `each'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/cucumber-2.0.0/lib/cucumber/runtime/support_code.rb:96:in `load_files!'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/cucumber-2.0.0/lib/cucumber/runtime.rb:242:in `load_step_definitions'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/cucumber-2.0.0/lib/cucumber/runtime.rb:65:in `run!'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/cucumber-2.0.0/lib/cucumber/cli/main.rb:38:in `execute!'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/cucumber-2.0.0/bin/cucumber:9:in `<top (required)>'
C:/Ruby193/bin/cucumber:23:in `load'
C:/Ruby193/bin/cucumber:23:in `<main>'

My current installed gem list:

*** LOCAL GEMS ***

activesupport (3.2.13)
addressable (2.3.6)
bigdecimal (1.1.0)
builder (3.2.2)
bundler (1.9.4)
capybara (2.2.1)
childprocess (0.5.6)
coderay (1.1.0)
csv-mapper (0.5.1)
cucumber (2.0.0)
cucumber-core (1.1.3)
data_magic (0.20)
diff-lcs (1.2.5)
faker (1.4.3)
fastercsv (1.5.5)
ffi (1.9.8 x64-mingw32)
fig_newton (0.11)
gherkin (2.12.2 x86-mingw32)
gli (2.13.0)
gmail (0.5.0)
gmail_xoauth (0.4.1)
i18n (0.7.0, 0.6.1)
io-console (0.3)
json (1.8.2, 1.8.1)
json2csv (0.0.4)
json_pure (1.8.2)
magic_encoding (0.0.2)
mail (2.6.3)
method_source (0.8.2)
mime-types (2.2)
mini_portile (0.6.0)
minitest (5.4.2)
multi_json (1.10.1)
multi_test (0.1.2)
nokogiri (1.6.3.rc1 x86-mingw32)
oauth (0.4.7)
page-object (1.0.3)
page_navigation (0.9)
pry (0.10.1)
pry-doc (0.6.0)
rack (1.5.2)
rack-test (0.6.2)
rake (10.4.2, 0.9.2.2)
rautomation (0.17.0)
rdoc (3.9.5)
require_all (1.3.2)
rspec (3.0.0)
rspec-core (3.0.0)
rspec-expectations (3.0.0)
rspec-mocks (3.0.0)
rspec-support (3.0.0)
rubygems-update (2.4.7, 2.2.2)
rubyzip (1.1.4)
selenium-webdriver (2.44.0)
site_prism (2.6)
slop (3.6.0)
smarter_csv (1.0.19)
syntax (1.2.0)
terminal-table (1.4.5)
test-unit (2.5.5)
thread_safe (0.3.4)
time_diff (0.3.0)
tzinfo (1.2.2)
watir-webdriver (0.6.11)
websocket (1.2.1)
win32ole-pp (1.2.0)
xpath (2.0.0)
yard (0.8.7.6)
yml_reader (0.4)



Thanks for any help.
config.log

Daniel Berger

unread,
Aug 11, 2015, 9:36:47 AM8/11/15
to ruby-ffi
I suspect you have a 32 vs 64 mismatch. There are separate devkits, one for 32-bit Ruby and one for 64-bit Ruby. Make sure you're using the right devkit when trying to install extensions.

Regards,

Dan
Reply all
Reply to author
Forward
0 new messages