Issue with devkit "DevKit-3.4.5-20100819-1535-sfx" while installing Watir using Gem install

156 views
Skip to first unread message

John

unread,
Oct 25, 2011, 5:16:12 AM10/25/11
to RubyInstaller
Hello

I am using Ruby version - ruby 1.8.7 (2011-06-30 patchlevel 352) [i386-
mingw32]

Initially while trying to install Watir, I got the following error

***************************************************************************************
ERROR: Error installing watir:
The 'ffi' native gem requires installed build tools.

Please update your PATH to include build tools or download the DevKit
from 'http://rubyinstaller.org/downloads' and follow the instructions
at 'http://github.com/oneclick/rubyinstaller/wiki/Development-Kit'
***************************************************************************************

I followed the intructions and installed the devkit
3.4.5-20100819-1535-sfx and followed th steps as listed at
https://github.com/oneclick/rubyinstaller/wiki/Development-Kit and the
installation went on fine. I even could install rdiscount succesfully
and could see the devkit.rb and operating_system.rb files in my Ruby
installation.

After all this while trying to install Watir, I get the following
error

*********************************************************************************************
C:\DevKit>gem install watir --no-rdoc --no-ri -p http://ausproxy:74
Temporarily enhancing PATH to include DevKit...
Building native extensions. This could take a while...
ERROR: Error installing watir:
ERROR: Failed to build gem native extension.

C:/Ruby187/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()... no
checking for ruby_thread_has_gvl_p()... no
checking for ruby_native_thread_p()... no
checking for rb_thread_call_with_gvl()... no
creating extconf.h
creating Makefile

make
gcc -I. -I. -IC:/Ruby187/lib/ruby/1.8/i386-mingw32 -I. -
DRUBY_EXTCONF_H=\"extcon
f.h\" -g -O2 -DFD_SETSIZE=256 -Wno-declaration-after-statement -
c Abstrac
tMemory.c
In file included from AbstractMemory.c:28:
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,
from AbstractMemory.c:29:
Types.h:68:17: ffi.h: No such file or directory
In file included from Types.h:69,
from AbstractMemory.h:29,
from AbstractMemory.c:29:
Type.h:35: error: syntax error before "ffi_type"
Type.h:35: warning: no semicolon at end of struct or union
In file included from AbstractMemory.c:29:
AbstractMemory.h: In function `get_memory_op':
AbstractMemory.h:112: error: dereferencing pointer to incomplete type
In file included from AbstractMemory.c:31:
Function.h: At top level:
Function.h:38: error: field `type' has incomplete type
Function.h:45: error: syntax error before "ffi_type"
Function.h:45: warning: no semicolon at end of struct or union
Function.h:46: warning: data definition has no type or storage class
Function.h:47: error: syntax error before "ffi_cif"
Function.h:47: warning: data definition has no type or storage class
Function.h:52: error: syntax error before "abi"
Function.h:52: warning: data definition has no type or storage class
Function.h:59: error: syntax error before '}' token
make: *** [AbstractMemory.o] Error 1


Gem files will remain installed in C:/Ruby187/lib/ruby/gems/1.8/gems/
ffi-1.0.10
for inspection.
Results logged to C:/Ruby187/lib/ruby/gems/1.8/gems/ffi-1.0.10/ext/
ffi_c/gem_mak
e.out

C:\DevKit>
****************************************************************************************************

Please help.

Chuck Remes

unread,
Oct 25, 2011, 9:19:15 AM10/25/11
to rubyin...@googlegroups.com

On Oct 25, 2011, at 4:16 AM, John wrote:

> Hello
>
> I am using Ruby version - ruby 1.8.7 (2011-06-30 patchlevel 352) [i386-
> mingw32]
>
> Initially while trying to install Watir, I got the following error
>
> ***************************************************************************************
> ERROR: Error installing watir:
> The 'ffi' native gem requires installed build tools.

The 'ffi' gem dropped support for 1.8.x about 8 months ago when the 1.0 version was released. The author makes no effort to make sure subsequent releases are compatible with 1.8 or its tools.

You might try asking on the ffi mailing list. It's possible there is someone maintaining a fork that provides 1.8 support.

cr

Chuck Remes

unread,
Oct 25, 2011, 11:08:28 AM10/25/11
to rubyin...@googlegroups.com

Here is the thread on the ruby-ffi mailing list from November 2010 announcing the 1.0 release and the lack of 1.8.7 support.

http://groups.google.com/group/ruby-ffi/browse_thread/thread/c40766b574a15962#

cr


Luis Lavena

unread,
Oct 25, 2011, 11:12:15 AM10/25/11
to rubyin...@googlegroups.com
On Tue, Oct 25, 2011 at 12:08 PM, Chuck Remes <cremes....@mac.com> wrote:
>
>
> Here is the thread on the ruby-ffi mailing list from November 2010 announcing the 1.0 release and the lack of 1.8.7 support.
>
> http://groups.google.com/group/ruby-ffi/browse_thread/thread/c40766b574a15962#
>

I believe I've mentioned that the ffi gem itself should be doing
require_ruby_version >= 1.9.2 from now on.

All these gem installation problems could have been avoided if
Gem::Specification was really understood :-(

--
Luis Lavena
AREA 17
-
Perfection in design is achieved not when there is nothing more to add,
but rather when there is nothing more to take away.
Antoine de Saint-Exupéry

John

unread,
Oct 31, 2011, 9:48:20 AM10/31/11
to RubyInstaller
Hello

The issue is not just with ruby 1.8.7. I even tried installing watir
with Ruby version -1.9.1-p378 and get the same error.

John



On Oct 25, 6:19 pm, Chuck Remes <cremes.devl...@mac.com> wrote:
> On Oct 25, 2011, at 4:16 AM, John wrote:
>
> > Hello
>
> > I am using Ruby version - ruby 1.8.7 (2011-06-30 patchlevel 352) [i386-
> > mingw32]
>
> > Initially while trying to install Watir, I got the following error
>
> > ***************************************************************************­************

Luis Lavena

unread,
Oct 31, 2011, 10:11:30 AM10/31/11
to rubyin...@googlegroups.com
On Tue, Oct 25, 2011 at 6:16 AM, John <kv.b...@gmail.com> wrote:
> Hello

Hello John,

>
> I am using Ruby version - ruby 1.8.7 (2011-06-30 patchlevel 352) [i386-
> mingw32]
>
> Initially while trying to install Watir, I got the following error
>
> ***************************************************************************************
> ERROR:  Error installing watir:
>        The 'ffi' native gem requires installed build tools.
>
> Please update your PATH to include build tools or download the DevKit
> from 'http://rubyinstaller.org/downloads' and follow the instructions
> at 'http://github.com/oneclick/rubyinstaller/wiki/Development-Kit'
> ***************************************************************************************
>
> I followed the intructions and installed the devkit
> 3.4.5-20100819-1535-sfx and followed th steps as listed at
> https://github.com/oneclick/rubyinstaller/wiki/Development-Kit and the
> installation went on fine. I even could install rdiscount succesfully
> and could see the devkit.rb  and operating_system.rb files in my Ruby
> installation.
>

You need DevKit 4.5.2 for Ruby 1.8.7-p352 and newer versions of Ruby, not 3.4.5

The errors you're getting is because Ruby was build against GCC 4.5.2
and you're using GCC 3.4.5, expect more issues like that.

Reply all
Reply to author
Forward
0 new messages