Open rolandoam opened 4 months ago
This issue is being marked as stale because there was no activity in the last 2 months
Same error here. I figured out that -o conftest -I/include/universal-java22
is the command which is executed. But as one can see it does not include an executable, only command line options. Having gcc installed I figured that mkmf gem is (at least in this specific case) relying on the CC
env variable to be present. So having export CC=gcc
somewhere in a shell initialization script will get you further, but only to:
"gcc -o conftest -I/include/universal-java17 -I~/.rvm/rubies/jruby-9.4.8.0/lib/ruby/include/ruby/backward -I~/.rvm/rubies/jruby-9.4.8.0/lib/ruby/include -I. -fno-omit-frame-pointer -fno-strict-aliasing -fexceptions conftest.c -L. -L~/.rvm/rubies/jruby-9.4.8.0/lib -m64 "
In file included from conftest.c:1:
~/.rvm/rubies/jruby-9.4.8.0/lib/ruby/include/ruby.h:1:2: error: #error JRuby does not support native extensions
1 | #error JRuby does not support native extensions
| ^~~~~
In file included from conftest.c:3:
~/.rvm/rubies/jruby-9.4.8.0/lib/ruby/include/ruby.h:1:2: error: #error JRuby does not support native extensions
1 | #error JRuby does not support native extensions
| ^~~~~
checked program was:
/* begin */
1: #include "ruby.h"
2:
3: #include <ruby.h>
4: int main(int argc, char **argv)
5: {
6: return 0;
7: }
/* end */
So did ruby-lsp switch from not using a native extension to using one?
We added a dependency on rbs
otherwise there's no way to index core declarations from the language (e.g.: String
, Integer
and so on).
Unfortunately, rbs
doesn't support JRuby yet (which we didn't realize when we introduced it). And Rubygems doesn't support conditional/optional runtime dependencies, so we have no way of saying that we can only depend on rbs
for the mri
platform.
To fix this, we are going to need to ensure that rbs
can work with JRuby.
A short term option would be a -java platform gem that removes the rbs dependency, but we also want to get rbs support for JRuby.
Description
Reproduction steps
rbenv install jruby-9.4.8.0
)gem install ruby-lsp
Code snippet or error message
mkmf.log:
Last known version to build seems to be 0.17.2: