JRuby-on-Windows C extension building

The recently refactored DevKit from the RubyInstaller project is a
self-extracting 7-Zip archive (a full-featured installer in in progress)
that combines packages from MSys, MinGW, and TDM-GCC with custom install
helper scripts that make it easy for Windows users without a build
environment to

gem install rdiscount bson_ext RedCloth eventmachine --platform=ruby

and the gems just work. We also use the new DevKit to build the
RubyInstaller (MRI 1.8, 1.9) artifacts and their dependencies such as
OpenSSL, libyaml, and libffi. Others are using the DevKit to build
Mercurial, vim, etc. for Windows systems as the DevKit supports the
“autconf → configure → make → make install” dance.

Why post here?

You can download a self-extracting DevKit from
http://www.mediafire.com/?t646gxju6f9pbu9 or build a gcc 4.5.0 DevKit by

git clone git://github.com/oneclick/rubyinstaller.git
cd rubyinstaller
rake devkit sfx=1
cd …/pkg

Then extract everything into a dir with no spaces (e.g C:\DevKit) and

cd <DEVKIT_INSTALL_DIR>
ruby dk.rb init

edit the generated config.yml file to include the root

dirs of all the Rubies that should use the DevKit

ruby dk.rb review
ruby dk.rb install

On JRuby Windows systems, this should install

  • lib/ruby/site_ruby/1.8/rubygems/defaults/operating_system.rb # gem
    pre_install hook
  • lib/ruby/site_ruby/shared/devkit.rb # helper library

which should allow you to do things like “jruby -rdevkit extconf.rb”
and “jruby -S gem install bson_ext --platform=ruby” or similar. (I
haven’t confirmed yet as I’ve run into a build error on cext)

For anyone testing JRuby’s cext branch on Windows, please check out the
DevKit and reply back with how it’s working (or not working) for you, as
well as whether the install script is injecting artifacts into the
correct locations.

Thanks,
Jon

p.s. - I’d also like to talk offlist with whomever’s doing the JRuby
installer (Tom?) to add better JRuby support to the dk.rb script by
adding the correct registry key to dk.rb’s automagic scan list.


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email