So I have been trying to figure out what is causing a native gem
compilation
issue, and noticed that it can’t find the ruby.h header to even build
the
extension.
PS C:\jruby-1.6.0.RC2\lib\native> jruby -S gem install bond
Temporarily enhancing PATH to include DevKit…
Building native extensions. This could take a while…
ERROR: Error installing bond:
ERROR: Failed to build gem native extension.
C:/jruby-1.6.0.RC2/bin/jruby.exe extconf.rb
WARNING: JRuby does not support native extensions or the `mkmf’ library
very
well.
Check http://kenai.com/projects/jruby/pages/Home for alternatives.
TopDirectory: C:/jruby-1.6.0.RC2/lib/native/include
mkmf.rb can’t find header files for ruby at
C:/jruby-1.6.0.RC2/lib/native/include/ruby/ruby.h
Gem files will remain installed in
C:/jruby-1.6.0.RC2/lib/ruby/gems/1.8/gems/bond-0.4.0 for inspection.
Results logged to
C:/jruby-1.6.0.RC2/lib/ruby/gems/1.8/gems/bond-0.4.0/ext/readline_line_buffer/gem_make.out
So I looked at some of the config information (specifically whatever
this
TopDir is supposed to be):
PS C:\mydocs> jruby -S irb
irb(main):001:0> Config::MAKEFILE_CONFIG[‘includedir’]
=> “C:/jruby-1.6.0.RC2/lib/native/include”
irb(main):002:0> exit
But under my JRuby 1.6.0.RC2 installation, there is no include directory
under lib/native:
PS C:\jruby-1.6.0.RC2\lib\native> tree
Folder PATH listing
Volume serial number is 501E-516B
C:.
├───i386-Windows
└───x86_64-Windows
On RC1, there is:
PS C:\jruby-1.6.0.RC1\lib\native> tree
Folder PATH listing
Volume serial number is 501E-516B
C:.
├───Darwin
├───i386-FreeBSD
├───i386-Linux
├───i386-OpenBSD
├───i386-SunOS
├───i386-Windows
├───include
│ └───ruby
├───ppc-AIX
├───ppc-Linux
├───sparc-SunOS
├───sparcv9-SunOS
├───x86_64-FreeBSD
├───x86_64-Linux
├───x86_64-OpenBSD
└───x86_64-Windows
Did I set something up weird or is this a packaging issue between RC1
and
RC2?
-Nick K.