Code Monkey home page Code Monkey logo

Comments (6)

lbergelson avatar lbergelson commented on July 18, 2024

Huh, that's strange.
I'm not able to reproduce it yet. It doesn't happen on my system, and I tried in a clean docker which also didn't hit that error.

Are you sure java 8 isn't sneaking in somewhere? Just to be clear, which java, echo $JAVA_HOME and java -version are all consistent with 21?

from picard.

himanshisyadav avatar himanshisyadav commented on July 18, 2024

I am one of the system admins of the HPC that the OP is using. Here is the build behavior with different Java versions. It works with java/17.0.10 as of now (we didn't support java/17 on our HPC but installed it to experiment if it would make a difference with this build.)

$ which java
/software/java-21.0-el8-x86_64/bin/java
$ echo $JAVA_HOME
/software/java-21.0-el8-x86_64
$ java --version
java 21.0.2 2024-01-16 LTS
Java(TM) SE Runtime Environment (build 21.0.2+13-LTS-58)
Java HotSpot(TM) 64-Bit Server VM (build 21.0.2+13-LTS-58, mixed mode, sharing)
$ ls
build.gradle  build_push_docker.sh  build.xml  Dockerfile  docs  etc  gradle  gradlew  LICENSE.txt  README.md  scripts  settings.gradle  src  testdata
$ ./gradlew shadowJar
Starting a Gradle Daemon (subsequent builds will be faster)

> Configure project :
Warning: using Java 21 but only Java 17 has been tested.

FAILURE: Build failed with an exception.

* What went wrong:
Could not determine the dependencies of task ':shadowJar'.
> Failed to calculate the value of task ':compileJava' property 'javaCompiler'.
   > No matching toolchains found for requested specification: {languageVersion=17, vendor=any, implementation=vendor-specific} for LINUX on x86_64.
      > No locally installed toolchains match and toolchain download repositories have not been configured.

* Try:
> Learn more about toolchain auto-detection at https://docs.gradle.org/8.5/userguide/toolchains.html#sec:auto_detection.
> Learn more about toolchain repositories at https://docs.gradle.org/8.5/userguide/toolchains.html#sub:download_repositories.
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
> Get more help at https://help.gradle.org.

BUILD FAILED in 15s
$ module unload java/21.0 
$ module load java/17.0.10 
$ ./gradlew shadowJar
Starting a Gradle Daemon, 1 incompatible Daemon could not be reused, use --status for details

> Task :compileJava
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.

BUILD SUCCESSFUL in 29s
4 actionable tasks: 4 executed

from picard.

cmnbroad avatar cmnbroad commented on July 18, 2024

If you want to build with Java 21, you'll need to change the language version to 21 in build.gradle. Note that we don't technically support Java 21 yet.

from picard.

lbergelson avatar lbergelson commented on July 18, 2024

@himanshisyadav The error you're seeing makes sense to me. We specify 17 as our java toolchain version.

Specifically in this line:

java {
    toolchain {
        languageVersion = JavaLanguageVersion.of(17)
    }
    withJavadocJar()
    withSourcesJar()
}

Change the toolchain from 17 to 21 and it should work. (or add a second language version line with 21).
We don't regularly test with 21 but I wouldn't expect any particular issues.

from picard.

himanshisyadav avatar himanshisyadav commented on July 18, 2024

@lbergelson Thank you! I'll try that! We have recommended our users use Java 17 as it has developer support!

from picard.

lbergelson avatar lbergelson commented on July 18, 2024

We'd like to move to officially support java 21 soon but there's no specific timeline.

from picard.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.