rtomayko / posix-spawn

Ruby process spawning library

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[JRuby] ERROR: Failed to build gem native extension.

skull-squadron opened this issue · comments

Tried with gcc-4.2 and llvm.

Building native extensions.  This could take a while...
ERROR:  Error installing posix-spawn:
    ERROR: Failed to build gem native extension.

        /path/to/.rvm/rubies/jruby-1.6.7/bin/jruby 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.
creating Makefile


Gem files will remain installed in /path/to/.rvm/gems/jruby-1.6.7@global/gems/posix-spawn-0.3.6 for inspection.
Results logged to /path/to/.rvm/gems/jruby-1.6.7@global/gems/posix-spawn-0.3.6/ext/gem_make.out

I realize this is a 7 month old issue, but Google brought me here, so I'll answer it.

This isn't a posix-spawn bug, this is normal behavior for JRuby. To install libraries with C extensions in JRuby, you'll need to set jruby to load w/ the property -Xcext.enabled=true

The easiest way to do this? export JRUBY_OPTS="-Xcext.enabled=true"

I'm getting this error and I'm not using JRuby, I've got ruby1.9.1 (on ubuntu)

Closing as we don't have plans to support JRuby in posix-spawn.