Issue
I need to build kotlin-stdlib/kotlin-reflect from sources (version 1.9.22).
I've setup JAVA_HOME to Java 17 and used ./gradlew build
.
But getting error:
FAILURE: Build failed with an exception.
* What went wrong:
Could not determine the dependencies of task ':kotlin-stdlib:compileMainJdk7KotlinJvm'.
> Unable to download toolchain matching the requirements ({languageVersion=7, vendor=any, implementation=vendor-specific}) from 'https://api.foojay.io/disco/v3.0/ids/45dfb704e8dcceab434285501d74cd33/redirect'.
> Provisioned toolchain '/home/xxx/.gradle/jdks/zing20/zing20.09.1.0-1-jdk7.0.272-linux_x64' could not be probed: Command returned unexpected result code: 6
Error output:
Error: dl failure on line 1093
Error: failed /home/xxx/.gradle/jdks/zing20/zing20.09.1.0-1-jdk7.0.272-linux_x64/jre/lib/amd64/server/libjvm.so, because /home/xxx/.gradle/jdks/zing20/zing20.09.1.0-1-jdk7.0.272-linux_x64/jre/lib/amd64/server/../../../../etc/orca/lib/liborca.so.0: file too short
The /home/xxx/.gradle/jdks/zing20
doesn't exist.
I've download and extracted zing20.09.1.0-1-jdk7.0.272-linux_x64.tar.gz
and run again. Got this error
FAILURE: Build failed with an exception.
* What went wrong:
Could not determine the dependencies of task ':kotlin-stdlib:compileMainJdk7KotlinJvm'.
> Unable to download toolchain matching the requirements ({languageVersion=7, vendor=any, implementation=vendor-specific}) from 'https://api.foojay.io/disco/v3.0/ids/45dfb704e8dcceab434285501d74cd33/redirect'.
> Provisioned toolchain '/home/xxx/.gradle/jdks/zing20/zing20.09.1.0-1-jdk7.0.272-linux_x64' could not be probed: Command returned unexpected result code: 1
Error output:
Zing VM Error: Zing License Verification failed - no valid license found.
Is there a way how to build kotlin-stdlib/kotlin-reflect without zing20?
Thanks
Solution
This issue is problem of missing Java 7. To fix this there are two possibilities:
- add Java 7 to a
$HOME/.m2/toolchains.xml
- add to
local.properties
(in the root ofkotlin
project) propertykotlin.build.isObsoleteJdkOverrideEnabled=true
- the Java 8 will be used to compile Java 7 related classes
Answered By - Pat
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.