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

Already on GitHub? Sign in to your account

ffi-1.0.10 fails to install on Windows 7 64-bit #167

dominicsayers opened this Issue Oct 24, 2011 · 12 comments


None yet
7 participants

Just did a gem update and ffi failed to update. Errors reproduced below.

I also tried separately to gem update ffi and gem install ffi just for a laugh, but neither worked.

Temporarily enhancing PATH to include DevKit...
Building native extensions.  This could take a while...
ERROR:  Error installing ffi:
        ERROR: Failed to build gem native extension.

        E:/Apps/RailsInstaller/Ruby1.9.2/bin/ruby.exe extconf.rb
checking for ffi.h... no
checking for ffi.h in /usr/local/include... no
checking for rb_thread_blocking_region()... yes
checking for ruby_thread_has_gvl_p()... yes
checking for ruby_native_thread_p()... yes
checking for rb_thread_call_with_gvl()... yes
creating extconf.h
creating Makefile

E:/Apps/RailsInstaller/Ruby1.9.2/bin/ruby -e "puts 'EXPORTS', 'Init_ffi_c'"  > ffi_c-i386-mingw32.def
gcc -I. -IE:/Apps/RailsInstaller/Ruby1.9.2/include/ruby-1.9.1/i386-mingw32 -I/E/Apps/RailsInstaller/Ruby1.9.2/include/ruby-1.9.1/ruby/backward -I/E/Apps/RailsInstaller/Ruby1.9.2/include/ruby-1.9.1 -I. -DRUBY_EXTCONF_H=\"extconf.h\"    -O3 -g -Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-missing-field-initializers -Wno-long-long -Wno-declaration
-after-statement   -o AbstractMemory.o -c AbstractMemory.c
In file included from AbstractMemory.c:28:0:
compat.h:65:20: warning: extra tokens at end of #ifndef directive
compat.h:69:24: warning: extra tokens at end of #ifndef directive
In file included from AbstractMemory.h:29:0,
                 from AbstractMemory.c:29:
Types.h:68:17: fatal error: ffi.h: No such file or directory
compilation terminated.
make: *** [AbstractMemory.o] Error 1

Gem files will remain installed in E:/Apps/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/ffi-1.0.10 for inspection.
Results logged to E:/Apps/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/ffi-1.0.10/ext/ffi_c/gem_make.out

Can I help with any more information?

Next I tried to install from GitHub using the instructions in README.rdoc. I had a problem with rake gem:install like this:

rake aborted!
Could not find rake-compiler (>= 0.6.0) amongst [POpen4-0.1.4, ... [very long list of gems]

So I did gem install rake-compiler and tried again, but with the same ultimate result. I did get a rake-compiler message like this though:

The system cannot find the path specified.
rake-compiler must be configured first to enable cross-compilation

Now I'm out of my depth. No idea how to start configuring rake-compiler.

We're having the exact same problem here. A fix would be much appreciated.

same issue but on windows 7 32 bit

I'm also getting the same error. I've tried this on my Win XP 32 bit and Win7 64 bit and no luck.

jmurans commented Oct 25, 2011

1 - Dublicated - Installing from github on Windows - #165
2 - From my side can confirm this issue - Tried on Win 7 32bit, Win 7 64bit with both installation types from github and "gem install ffi"

ffred commented Oct 25, 2011

same for me on WinXP pro 32bits..

vian commented Oct 26, 2011

This is bad. I'm facing the same error on Win 7 x64.

Use a previous version "gem install ffi -v 1.0.9". This one worked!!

jmurans commented Oct 28, 2011

ffi v1.0.9 works fine. Thanks!

If the ffi team (Wayne?) don't have access to a Windows machine to test this then I'm more than willing to help. Let me know what I can do.

In fact, this appear to be a dupe of #165 so I'll close it.

Updating ffi
Fetching: ffi-1.0.10-x86-mingw32.gem (100%)
Successfully installed ffi-1.0.10-x86-mingw32

Installing OK on Windows 7 64-bit. Good work.

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