Open pragadeesh2050 opened 4 years ago
You are actually using JRuby on Windows here, right?
Yes jruby-9.2.11.0
You are actually using JRuby on Windows here, right?
I'm experiencing exactly the same. Win 10.
Are you on JRuby as well?
@gsamokovarov Yeah. Dropped it. Now running Ruby 2.6.6p146 and it works great.
@gsamokovarov Can we get this fixed? I think the problem is that it's getting the platform mixed up when it's JRuby + Windows and not building properly.
JRuby gems almost never do extension builds because there's no need, and because many Java installs do not ship with javac. I can help you set up a -java gem that ships a pre-built JRuby extension, or we can find some other option. This is being reported to us as well: https://github.com/jruby/jruby/issues/6291
I'm in a remote location and downloading a Windows 10 virtual machine image is not an option for me at the moment. The solution is to release gems called bindex-java
and skiptrace-java
with the prebuilt JARs, right? I'm open to this.
As @headius mentioned in the issue I opened earlier, here are some traces on a new Windows PC, no other Ruby installed:
- Windows 1O Professional
- 64 bits
Steps to follow:
jruby
with 64x installer jruby_windows_x64_9_2_12_0.exe
jruby -v
jruby 9.2.12.0 (2.5.7) 2020-07-01 db01a49ba6 Java HotSpot(TM) 64-Bit Server VM 25.251-b08 on 1.8.0_251-b08 +jit [mswin32-x86_64]
jruby -S gem install bindex
It raises the error:
C:/jruby-9.2.12.0/bin/jruby.exe -I C:/jruby-9.2.12.0/lib/ruby/stdlib -r ./siteconf20200718-3884-1ddzkf4.rb extconf.rb
current directory: C:/jruby-9.2.12.0/lib/ruby/gems/shared/gems/bindex-0.8.1/ext/skiptrace
make "DESTDIR=" clean
current directory: C:/jruby-9.2.12.0/lib/ruby/gems/shared/gems/bindex-0.8.1/ext/skiptrace
make "DESTDIR="
make failedCannot run program "make" (in directory "C:\jruby-9.2.12.0\lib\ruby\gems\shared\gems\bindex-0.8.1\ext\skiptrace"): CreateProcess error=2, Le fichier spécifié est introuvable
Gem files will remain installed in C:/jruby-9.2.12.0/lib/ruby/gems/shared/gems/bindex-0.8.1 for inspection.
Results logged to C:/jruby-9.2.12.0/lib/ruby/gems/shared/extensions/universal-java-1.8/2.5.0/bindex-0.8.1/gem_make.out
C:\Users\Serge>jruby -v
jruby 9.2.12.0 (2.5.7) 2020-07-01 db01a49ba6 Java HotSpot(TM) 64-Bit Server VM 25.251-b08 on 1.8.0_251-b08 +jit [mswin32-x86_64]
@headius I just run into this and I'd say this is some Open3 issue on JRuby + Windows? Looking at the extension, I think it's supposed to do nothing on JRuby, but the problem seems to be that JRuby on Windows fails to run make
?
Nevermind, as the error message actually suggess, I did not have make
installed 🙈. @belgoros I was able to fix the error running winget install --source winget ezwinports.make
seems to have fixed the issue for me.
Yeah JRuby generally doesn't need make
for JRuby extensions, and our installers and packages for Windows only need a JVM installed, so extensions that require building will have to get make
some other way. I am guessing that some of the Windows packages for CRuby also include make
and appropriate compiler stuff.
We could consider doing that, but I'm reluctant to add that to our packages.
@belgoros Your issue should be fixed by installing a compiler toolkit that includes make
. This illustrates the problem I've tried to explain in https://github.com/rubygems/rubygems/issues/3520.
@deivid-rodriguez that issue is closed but remains a problem... even though nothing gets built, gems complain they need to be built when switching JDK version.
Other related issues:
The bottom line issue is that extension gems that support JRuby and don't want to ship a separate -java
platform gem must stub out their makefile, but that means they still need make
present and will complain if switching JDK version (because RubyGems' "already built" logic is specific to each JDK version even though nothing actually gets built).
Cool.
Yeah, the use case explained in https://github.com/rubygems/rubygems/pull/7372 seems valid, I'm happy to try making it easier to optionally avoid running make
at all. That PR proposes a more explicit approach, but more complicated to rollout. I personally think detecting empty Makefiles is easy enough and will fix most issues.
I am unable to bundle install. See my below gem file
I get the below error in my console
Fetching bindex 0.8.1 Installing bindex 0.8.1 with native extensions C:/jruby-9.2.11.0/lib/ruby/stdlib/rubygems/ext/builder.rb:76: warning: unsupported popen option: err Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
current directory: C:/jruby-9.2.11.0/lib/ruby/gems/shared/gems/bindex-0.8.1/ext/skiptrace C:/jruby-9.2.11.0/bin/jruby.exe -I C:/jruby-9.2.11.0/lib/ruby/stdlib -r ./siteconf20200317-12972-weoypc.rb extconf.rb
current directory: C:/jruby-9.2.11.0/lib/ruby/gems/shared/gems/bindex-0.8.1/ext/skiptrace make "DESTDIR=" clean current directory: C:/jruby-9.2.11.0/lib/ruby/gems/shared/gems/bindex-0.8.1/ext/skiptrace make "DESTDIR=" make failedCannot run program "make" (in directory "C:\jruby-9.2.11.0\lib\ruby\gems\shared\gems\bindex-0.8.1\ext\skiptrace"): CreateProcess error=2, The system cannot find the file specified
Gem files will remain installed in C:/jruby-9.2.11.0/lib/ruby/gems/shared/gems/bindex-0.8.1 for inspection. Results logged to C:/jruby-9.2.11.0/lib/ruby/gems/shared/extensions/universal-java-1.8/2.5.0/bindex-0.8.1/gem_make.out
An error occurred while installing bindex (0.8.1), and Bundler cannot continue. Make sure that
gem install bindex -v '0.8.1' --source 'https://rubygems.org/'
succeeds before bundling.In Gemfile: web-console was resolved to 4.0.1, which depends on bindex