naether icon indicating copy to clipboard operation
naether copied to clipboard

fail to install naether 0.15.7 with jruby 9.2.17.0

Open JoostVanAverbeke opened this issue 3 years ago • 5 comments

Good afternoon,

I fail to gem install the latest version of naether, which is naether 0.15.7. I am using jruby version 9.2.17.0. To try to fix the issue, I have cloned the latest naether repo from github (https://github.com/mguymon/naether)

I have tried to package the project via maven.

mvn package

But I get failing jUnit tests.

Failed tests: systemPathDependency(com.tobedevoured.naether.SystemPathDependencyTest): expected:<[ch.qos.logback:logback-classic:jar:0.9.29, org.slf4j:slf4j-api:jar:1.6.1, pom:with-system-path:jar:2, ch.qos.logback:logback-core:jar:0.9.29]> but was:<[pom:with-system-path:jar:2]>

hasBrokenDep(com.tobedevoured.naether.SystemPathDependencyTest): expected:<[ch.qos.logback:logback-classic:jar:0.9.29, pom:with-broken-dep:jar:1, org.slf4j:slf4j-api:jar:1.6.1, pom:with-system-path:jar:2, ch.qos.logback:logback-core:jar:0.9.29]> but was:<[pom:with-broken-dep:jar:1, pom:with-system-path:jar:2]>

Is that the reason why I can't 'gem install naether'?

Underneath you'll find my maven and java details:

Apache Maven 3.6.3 (cecedd343002696d0abb50b32b541b8a6ba2883f) Maven home: C:\maven\apache-maven-3.6.3\bin.. Java version: 1.8.0_265, vendor: AdoptOpenJDK, runtime: C:\Program Files\AdoptOpenJDK\jdk-8.0.265.01-hotspot\jre Default locale: en_GB, platform encoding: Cp1252 OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows".

You would help me a lot if you could fix this issue.

Thanks in advance anyway.

Joost

JoostVanAverbeke avatar Apr 13 '21 09:04 JoostVanAverbeke

The tests do not run when the gem is installed. The jar dependencies are fetched as part of the gem install. Later today I will take a look at what is ailing the install.

On Tue, Apr 13, 2021, 05:59 JoostVanAverbeke @.***> wrote:

Good afternoon,

I fail to gem install the latest version of naether, which is naether 0.15.7. I am using jruby version 9.2.17.0. To try to fix the issue, I have cloned the latest naether repo from github (https://github.com/mguymon/naether)

I have tried to package the project via maven.

mvn package

But I get failing jUnit tests.

Failed tests: systemPathDependency(com.tobedevoured.naether.SystemPathDependencyTest): expected:<[ch.qos.logback:logback-classic:jar:0.9.29, org.slf4j:slf4j-api:jar:1.6.1, pom:with-system-path:jar:2, ch.qos.logback:logback-core:jar:0.9.29]> but was:<[pom:with-system-path:jar:2]>

hasBrokenDep(com.tobedevoured.naether.SystemPathDependencyTest): expected:<[ch.qos.logback:logback-classic:jar:0.9.29, pom:with-broken-dep:jar:1, org.slf4j:slf4j-api:jar:1.6.1, pom:with-system-path:jar:2, ch.qos.logback:logback-core:jar:0.9.29]> but was:<[pom:with-broken-dep:jar:1, pom:with-system-path:jar:2]>

Is that the reason why I can't 'gem install naether'?

Underneath you'll find my maven and java details:

Apache Maven 3.6.3 (cecedd343002696d0abb50b32b541b8a6ba2883f) Maven home: C:\maven\apache-maven-3.6.3\bin.. Java version: 1.8.0_265, vendor: AdoptOpenJDK, runtime: C:\Program Files\AdoptOpenJDK\jdk-8.0.265.01-hotspot\jre Default locale: en_GB, platform encoding: Cp1252 OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows".

You would help me a lot if you could fix this issue.

Thanks in advance anyway.

Joost

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/mguymon/naether/issues/36, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAAUBMZQ2SEQNZ5SFO3N4LTIQIXFANCNFSM423AM7WA .

mguymon avatar Apr 13 '21 15:04 mguymon

I found an issue with RJB not working with newer JDK (15 and 16). I upgrade that deps from 1.4 => 1.6. This error appears different than the one you described though. I am able to pull down the repo and tests the Java and runs the tests on the Ruby and JRuby.

I pushed the lastest to 0.15.8, can you try that and report and errors you see?

mguymon avatar Apr 14 '21 18:04 mguymon

Thanks already very much for the effort. I will try the latest 0.15.8 version. I have done some additional investigation. I have installed jruby 9.2.16.0 and when I bundle install the lock_jar project, which is using the naether gem 0.15.7, everything is working as expected. When I use jruby 9.2.17.0 I get the error:

C:\Users\joost>c:\jruby-9.2.17.0\bin\jruby -v jruby 9.2.17.0 (2.5.8) 2021-03-29 84d363da97 Java HotSpot(TM) 64-Bit Server VM 25.281-b09 on 1.8.0_281-b09 +jit [mswin32-x86_64]

When I execute a bundle install for the gem project lock_jar I get:

Installing naether 0.15.7 (java) with native extensions? Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

current directory: C:/jruby-9.2.17.0/lib/ruby/gems/shared/gems/naether-0.15.7-java C:/jruby-9.2.17.0/bin/jruby.exe -IC:/jruby-9.2.17.0/lib/ruby/stdlib/rubygems -rrubygems C:/jruby-9.2.17.0/lib/ruby/gems/shared/gems/rake-10.5.0/bin/rake RUBYARCHDIR=C:/jruby-9.2.17.0/lib/ruby/gems/shared/extensions/universal-java-1.8/2.5.0/naether-0.15.7-java RUBYLIBDIR=C:/jruby-9.2.17.0/lib/ruby/gems/shared/extensions/universal-java-1.8/2.5.0/naether-0.15.7-java rake failedNo such file or directory - {"SOURCE_DATE_EPOCH"=>"1618467846"}

Gem files will remain installed in C:/jruby-9.2.17.0/lib/ruby/gems/shared/gems/naether-0.15.7-java for inspection. Results logged to C:/jruby-9.2.17.0/lib/ruby/gems/shared/extensions/universal-java-1.8/2.5.0/naether-0.15.7-java/gem_make.out

?[0m?[31mAn error occurred while installing naether (0.15.7), and Bundler cannot continue. Make sure that gem install naether -v '0.15.7' --source 'https://rubygems.org/' succeeds before bundling.?[0m

In Gemfile: lock_jar was resolved to 0.15.2, which depends on naether?[0m

Process finished with exit code 5 Regards, Joost

JoostVanAverbeke avatar Apr 15 '21 06:04 JoostVanAverbeke

The naether 0.15.8 version didn't help. When I execute a 'bundle install' in the lock_jar project I still get the following error:

Fetching gem metadata from https://rubygems.org/......... Resolving dependencies........... Using rake 12.3.3 Using ast 2.4.2 Using parser 2.7.2.0 Using astrolabe 1.3.1 Using bundler 2.2.16 Using docile 1.1.5 Using json 2.5.1 (java) Using simplecov-html 0.10.2 Using simplecov 0.13.0 Using codeclimate-test-reporter 1.0.9 Using coderay 1.1.3 Using diff-lcs 1.4.4 Using ffi 1.15.0 (java) Using httpclient 2.8.3 Using jarfile_gem 0.0.1 from source at spec/fixtures/jarfile_gem Fetching naether 0.15.8 (java)?[0mInstalling naether 0.15.8 (java) with native extensions? mGem::Ext::BuildError: ERROR: Failed to build gem native extension. current directory: C:/jruby-9.2.17.0/lib/ruby/gems/shared/gems/naether-0.15.8-java C:/jruby-9.2.17.0/bin/jruby.exe -IC:/jruby-9.2.17.0/lib/ruby/stdlib/rubygems -rrubygems C:/jruby-9.2.17.0/lib/ruby/gems/shared/gems/rake-12.3.3/exe/rake RUBYARCHDIR=C:/jruby-9.2.17.0/lib/ruby/gems/shared/extensions/universal-java-1.8/2.5.0/naether-0.15.8-java RUBYLIBDIR=C:/jruby-9.2.17.0/lib/ruby/gems/shared/extensions/universal-java-1.8/2.5.0/naether-0.15.8-java rake failedNo such file or directory - {"SOURCE_DATE_EPOCH"=>"1618469040"}

Gem files will remain installed in C:/jruby-9.2.17.0/lib/ruby/gems/shared/gems/naether-0.15.8-java for inspection. Results logged to C:/jruby-9.2.17.0/lib/ruby/gems/shared/extensions/universal-java-1.8/2.5.0/naether-0.15.8-java/gem_make.out

An error occurred while installing naether (0.15.8), and Bundler cannot continue. Make sure that gem install naether -v '0.15.8' --source 'https://rubygems.org/' succeeds before bundling.?[0m

In Gemfile: lock_jar was resolved to 0.15.2, which depends on naether?[0m

Process finished with exit code 5

I even uninstalled the jruby 9.2.1.17 version and reinstalled that version again, but even that didn't help.

JoostVanAverbeke avatar Apr 15 '21 06:04 JoostVanAverbeke

I will try and test on windows. I had done everything on Linux so far.

Naether uses a Rake task that runs as a native extensions to fetch all the jar dependencies. When the naether gem is installed, the task runs and downloads everything to a local directory. If something fails during that time, it simply is reported as the "Failed to build gem native extension".

mguymon avatar Apr 15 '21 21:04 mguymon