Subject:
Re: [ruby-ffi] 1.2.0.pre6 testing
From:
Jon
Date:
11/13/12 10:17 PM
To:
ruby-ffi@googlegroups.com

> I want to push out 1.2.0 this weekend, so if people can test the latest 
> 1.2.0.pre6 and give me feedback on it, I would appreciate it.
> 
> Hopefully, it resolves any installation problems on various rubies (e.g. 
> 2.0.0-preview1, jruby+bundler).

Build, install, and simple smoke tests look good on the following:

# Win7 32bit w/MRI trunk
C:\Users\Jon>ruby -v -e "p Gem::Specification.find_by_name('ffi').version.version"
ruby 2.0.0dev (2012-11-14 trunk 37650) [i386-mingw32]
"1.2.0.pre6"

C:\Users\Jon>ruby -rffi -e "%w[OS ADDRESS_SIZE LIBC].each { |i| puts '%s = %s' % [i,FFI::Platform.const_get(i)] }"
OS = windows
ADDRESS_SIZE = 32
LIBC = msvcrt.dll


# Arch 32bit w/MRI trunk
[jon@archee ~]$ uname -a
Linux archee 3.6.6-1-ARCH #1 SMP PREEMPT Mon Nov 5 13:14:42 CET 2012 i686 GNU/Linux

[jon@archee ~]$ /lib/libc.so.6
GNU C Library stable release version 2.16, by Roland McGrath et al.

[jon@archee ~]$ ruby -v -e "p Gem::Specification.find_by_name('ffi').version.version"
ruby 2.0.0dev (2012-11-14 trunk 37650) [i686-linux]
"1.2.0.pre6"

[jon@archee ~]$ ruby -rffi -e "%w[OS ADDRESS_SIZE LIBC].each { |i| puts '%s = %s' % [i,FFI::Platform.const_get(i)] }"
OS = linux
ADDRESS_SIZE = 32
LIBC = libc.so.6


While I never install ffi this way, jruby+bundler on Win7 32bit with JRuby 1.7.0 ended up in Wile E. flames trying to build the C ext due to my scheming:

C:\Users\Jon\Downloads\temp\ffi-java>type Gemfile
source :rubygems
gem 'ffi', '1.2.0.pre6', :platforms => :jruby

C:\Users\Jon\Downloads\temp\ffi-java>bundle install
Fetching gem metadata from http://rubygems.org/...........
Fetching gem metadata from http://rubygems.org/..
Installing ffi (1.2.0.pre6) with native extensions
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
...


But as this works fine, I'm now curious as the the correct way to install ffi with bundler:

C:\Users\Jon\Documents\RubyDev\ffi-git>rake java:gem

C:\Users\Jon\Documents\RubyDev\ffi-git>gem i pkg\ffi-1.2.0.pre6-java.gem
Successfully installed ffi-1.2.0.pre6-java
1 gem installed

C:\Users\Jon\Documents\RubyDev\ffi-git>jruby -v -e "p Gem::Specification.find_by_name('ffi').version.version"
jruby 1.7.0 (1.9.3p203) 2012-10-22 ff1ebbe on Java HotSpot(TM) Client VM 1.7.0_09-b05 +indy [Windows 7-x86]
"1.2.0.pre6"

C:\Users\Jon>jruby -rffi -e "%w[OS ADDRESS_SIZE LIBC].each { |i| puts '%s = %s' % [i,FFI::Platform.const_get(i)] }"
OS = windows
ADDRESS_SIZE = 32
LIBC = msvcrt.dll

Jon