Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JRuby compatibility #9

Closed
sobrinho opened this issue Jul 24, 2012 · 3 comments
Closed

JRuby compatibility #9

sobrinho opened this issue Jul 24, 2012 · 3 comments

Comments

@sobrinho
Copy link

@tenderlove,

I'm not sure if it's a JRuby issue or something related to racc itself.

I didn't tried to fix it yet because I'm not a C developer, I will need some time to detect what's wrong :)

That's the output on jruby-1.6.7.2:


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

        /Users/sobrinho/.rbenv/versions/jruby-1.6.7.2/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

make
cc -I. -I/Users/sobrinho/.rbenv/versions/jruby-1.6.7.2/lib/native/include -I/Users/sobrinho/.rbenv/versions/jruby-1.6.7.2/lib/native/include/ruby -I. -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE      -fPIC -DTARGET_RT_MAC_CFM=0  -fno-omit-frame-pointer -fno-strict-aliasing  -fexceptions    -arch x86_64 -c cparse.c
cparse.c:289:8: warning: implicit declaration of function 'rb_iter_break' is invalid in C99 [-Wimplicit-function-declaration]
       rb_iter_break(); 
       ^
cparse.c:672:12: warning: implicit declaration of function 'rb_catch' is invalid in C99 [-Wimplicit-function-declaration]
    code = rb_catch("racc_jump", reduce0, v->value_v);
           ^
2 warnings generated.
cc -dynamic -bundle -undefined dynamic_lookup  -o cparse.bundle cparse.o -L"." -L"/Users/sobrinho/.rbenv/versions/jruby-1.6.7.2/lib" -bundle -framework JavaVM -Wl,-syslibroot, -mmacosx-version-min=10.5   -arch x86_64  
ld: library not found for -lbundle1.o
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [cparse.bundle] Error 1


Gem files will remain installed in /Users/sobrinho/.rbenv/versions/jruby-1.6.7.2/lib/ruby/gems/1.8/gems/racc-1.4.8 for inspection.
Results logged to /Users/sobrinho/.rbenv/versions/jruby-1.6.7.2/lib/ruby/gems/1.8/gems/racc-1.4.8/ext/racc/gem_make.out

Similar error is happening on travis: http://travis-ci.org/#!/rails/journey/jobs/1935123

Probably @headius can confirm that it is related to JRuby :)

@zenspider
Copy link
Collaborator

cparse.c:289:8: warning: implicit declaration of function 'rb_iter_break' is invalid in C99 [-Wimplicit-function-declaration]
       rb_iter_break(); 

That is most likely a problem on the jruby side. Or a problem with the build system, which would probably also be on the jruby side (mkmf.rb) as described in the output:

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

@zenspider
Copy link
Collaborator

@zenspider
Copy link
Collaborator

Since you only need the racc gem to compile grammars, and it looks like jruby ships with the racc runtime (it'll have to run in pure ruby mode, I guess), I'm gonna go ahead and say this is a jruby issue, but a low priority one. You can always compile a grammar with MRI + the racc gem and then run it on jruby.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants