Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't download GraalVM 19.3.0 #239

Closed
mageddo opened this issue Nov 20, 2019 · 17 comments
Closed

Can't download GraalVM 19.3.0 #239

mageddo opened this issue Nov 20, 2019 · 17 comments

Comments

@mageddo
Copy link

mageddo commented Nov 20, 2019

What happened?

I'm not able to download graalvm 19.3 I'm getting

> Task :downloadGraalTooling FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':downloadGraalTooling'.
> java.io.FileNotFoundException: https://github.com/oracle/graal/releases/download//vm-19.3.0/graalvm-ce-linux-amd64-19.3.0.tar.gz

* Try:

What did you want to happen?

Be able to download graalvm, maybe it would better to have a property to specify full graalvm download url

New URLs are

@mageddo
Copy link
Author

mageddo commented Nov 20, 2019

Possible bypass it to put a # (hash) at the end of the downloadBaseUrl

graal {
	downloadBaseUrl("https://github.com/graalvm/graalvm-ce-builds/releases/download/vm-19.3.0/graalvm-ce-java11-linux-amd64-19.3.0.tar.gz#")
}

@mageddo
Copy link
Author

mageddo commented Nov 20, 2019

No, it is not a possible bypass, it fail at another point

> Task :extractGraalTooling FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':extractGraalTooling'.
> Failed to find Graal update binary: /home/typer/.gradle/caches/com.palantir.graal/19.3.0/graalvm-ce-19.3.0/bin/gu

@nhoughto
Copy link

Self hosting it on s3 or similar will obv work, kinda annoying tho but is temporary until they fix it.
You have to download the archive, gu install --file=native-image..jar and then re-archive it if you want to do native images tho.

@carterkozak
Copy link
Contributor

Are you interested in contributing a fix?

@cosminpolifronie
Copy link
Contributor

cosminpolifronie commented Nov 29, 2019

@carterkozak I'm willing to contribute a fix, but I can't build the Gradle plugin. Is it buildable on Windows currently?

λ  .\gradlew.bat clean build
Downloading https://services.gradle.org/distributions/gradle-5.6.4-bin.zip
.........................................................................................

Welcome to Gradle 5.6.4!

Here are the highlights of this release:
 - Incremental Groovy compilation
 - Groovy compile avoidance
 - Test fixtures for Java projects
 - Manage plugin versions via settings script

For more details see https://docs.gradle.org/5.6.4/release-notes.html

Starting a Gradle Daemon (subsequent builds will be faster)
locking FileBasedConfig[C:\Users\Cosmin\.gitconfig] failed after 5 retries

> Task :compileJava
D:\Works\Repos\github\cosminpolifronie\gradle-graal\src\main\java\com\palantir\gradle\graal\BaseGraalCompileTask.java:111: Note: [SwitchStatementDefaultCase] Avoid using default case in switch statement.
        switch (Platform.operatingSystem()) {
        ^
    (see https://github.com/palantir/gradle-baseline#baseline-error-prone-checks)
D:\Works\Repos\github\cosminpolifronie\gradle-graal\src\main\java\com\palantir\gradle\graal\BaseGraalCompileTask.java:121: Note: [SwitchStatementDefaultCase] Avoid using default case in switch statement.
        switch (Platform.operatingSystem()) {
        ^
    (see https://github.com/palantir/gradle-baseline#baseline-error-prone-checks)
D:\Works\Repos\github\cosminpolifronie\gradle-graal\src\main\java\com\palantir\gradle\graal\DownloadGraalTask.java:106: Note: [SwitchStatementDefaultCase] Avoid using default case in switch statement.
        switch (Platform.operatingSystem()) {
        ^
    (see https://github.com/palantir/gradle-baseline#baseline-error-prone-checks)
D:\Works\Repos\github\cosminpolifronie\gradle-graal\src\main\java\com\palantir\gradle\graal\DownloadGraalTask.java:119: Note: [SwitchStatementDefaultCase] Avoid using default case in switch statement.
        switch (Platform.architecture()) {
        ^
    (see https://github.com/palantir/gradle-baseline#baseline-error-prone-checks)
D:\Works\Repos\github\cosminpolifronie\gradle-graal\src\main\java\com\palantir\gradle\graal\DownloadGraalTask.java:128: Note: [SwitchStatementDefaultCase] Avoid using default case in switch statement.
        switch (Platform.operatingSystem()) {
        ^
    (see https://github.com/palantir/gradle-baseline#baseline-error-prone-checks)
D:\Works\Repos\github\cosminpolifronie\gradle-graal\src\main\java\com\palantir\gradle\graal\ExtractGraalTask.java:121: Note: [SwitchStatementDefaultCase] Avoid using default case in switch statement.
        switch (Platform.operatingSystem()) {
        ^
    (see https://github.com/palantir/gradle-baseline#baseline-error-prone-checks)
D:\Works\Repos\github\cosminpolifronie\gradle-graal\src\main\java\com\palantir\gradle\graal\NativeImageTask.java:51: Note: [SwitchStatementDefaultCase] Avoid using default case in switch statement.
        switch (Platform.operatingSystem()) {
        ^
    (see https://github.com/palantir/gradle-baseline#baseline-error-prone-checks)
D:\Works\Repos\github\cosminpolifronie\gradle-graal\src\main\java\com\palantir\gradle\graal\SharedLibraryTask.java:47: Note: [SwitchStatementDefaultCase] Avoid using default case in switch statement.
        switch (Platform.operatingSystem()) {
        ^
    (see https://github.com/palantir/gradle-baseline#baseline-error-prone-checks)

> Task :test
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.codehaus.groovy.vmplugin.v7.Java7$1 (file:/C:/Users/Cosmin/.gradle/wrapper/dists/gradle-5.6.4-bin/bxirm19lnfz6nurbatndyydux/gradle-5.6.4/lib/groovy-all-1.3-2.5.4.jar) to constructor java.lang.invoke.MethodHandles$Lookup(java.lang.Class,int)
WARNING: Please consider reporting this to the maintainers of org.codehaus.groovy.vmplugin.v7.Java7$1
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release

com.palantir.gradle.graal.GradleGraalEndToEndSpec > test default version nativeImage FAILED
    org.gradle.api.GradleException at GradleGraalEndToEndSpec.groovy:52
        Caused by: org.gradle.internal.exceptions.LocationAwareException
            Caused by: org.gradle.api.tasks.TaskExecutionException
                Caused by: org.gradle.process.internal.ExecException

com.palantir.gradle.graal.GradleGraalEndToEndSpec > allows specifying additional properties FAILED
    org.spockframework.runtime.ConditionNotSatisfiedError at GradleGraalEndToEndSpec.groovy:197

com.palantir.gradle.graal.GradleGraalEndToEndSpec > can build shared libraries on default version FAILED
    org.gradle.api.GradleException at GradleGraalEndToEndSpec.groovy:216
        Caused by: org.gradle.internal.exceptions.LocationAwareException
            Caused by: org.gradle.api.tasks.TaskExecutionException
                Caused by: org.gradle.process.internal.ExecException

15 tests completed, 3 failed, 4 skipped

> Task :test FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':test'.
> There were failing tests. See the report at: file:///D:/Works/Repos/github/cosminpolifronie/gradle-graal/build/reports/tests/test/index.html

* Try:
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 3m 33s
19 actionable tasks: 17 executed, 2 up-to-date

@muhlba91
Copy link

muhlba91 commented Dec 9, 2019

@cosminpolifronie, @carterkozak is there any progress or help needed on this? :)

We have a bunch of Java 11 services we want to get running on Graal native images but are hitting this bug now.

@cosminpolifronie
Copy link
Contributor

cosminpolifronie commented Dec 9, 2019

@muhlba91 I started working on it but it's much more work than I anticipated. For now it's not a priority as I have other tasks to complete. It will get done, eventually, if someone else will not be working on this.

@muhlba91
Copy link

muhlba91 commented Dec 9, 2019

Could you maybe fill me/us in on the missing steps and where you are? Maybe I find some time to help out a bit. ;)

@cosminpolifronie
Copy link
Contributor

I haven't actually started implementing, but just made a plan and tried a few things.

First of all the tests must be disabled until this feature is ready if you're developing on Windows, as they check native-image which is not currently supported (this is what 19.3 is for).

Second of all, there is one new parameter that must be introduced, I called it javaVersion (either 8 or 11 - it refers to the type of GraalVM package).

The thing is that those input arguments are used in almost all scripts, so you have to modify multiple scripts in order to add support for 19.3. It's not hard, it's just time consuming and I haven't gotten around to doing it (while also maintaining support for older versions).

Also, the binaries for GraalVM CE have been moved to this repository: https://github.com/graalvm/graalvm-ce-builds/releases

@muhlba91
Copy link

Thanks for the explanation and as far as time permits I'll start implementing a fix based on your information. :)

Just to verify another part. I believe, the cache directory layout will also change to support multiple versions and javaVersions:

~/.gradle/caches/com.palantir.graal/
 └── [version]/
     ├──[javaVersion]/
      |  ├── graalvm-ce-[javaVersion]-[version]/
     │      └── [local architecture-specific GraalVM tooling]
     └── graalvm-ce-[javaVersion]-[version]-amd64.tar.gz

Also, depending on the graal version chosen (19.3+ or not) we need to swap the download URLs to keep backwards compatibility with versions lower than that.

@muhlba91
Copy link

muhlba91 commented Dec 10, 2019

@cosminpolifronie I still haven't got the chance to test it but I have created a WIP PR #255 with some changes.

-> moving discussion to PR

@jarohen
Copy link

jarohen commented Jan 26, 2020

it's a hacky work-around, but you can use an existing GraalVM installation in the meantime:

  • mkdir -p ~/.gradle/caches/com.palantir.graal/19.3.1/graalvm-ce-19.3.1/bin
  • touch ~/.gradle/caches/com.palantir.graal/19.3.1/graalvm-ce-19.3.1-amd64.tar.gz
  • ln -s /usr/lib/jvm/java-11-graalvm/bin/native-image ~/.gradle/caches/com.palantir.graal/19.3.1/graalvm-ce-19.3.1/bin/native-image

(substituting versions, architectures and GraalVM directories as necessary)

HTH!

@UkonnRa
Copy link

UkonnRa commented Apr 3, 2020

+1, any advice?

@muhlba91
Copy link

muhlba91 commented Apr 3, 2020

@UkonnRa we are waiting for @iamdanfox to review my PR #255 which adds support for GraalVM 19.3+ and Java 11.

@AceHack
Copy link

AceHack commented Apr 11, 2020

Yes running into same problem

GPopZach pushed a commit to GPopZach/gradle-graal that referenced this issue Apr 30, 2020
GPopZach pushed a commit to GPopZach/gradle-graal that referenced this issue Apr 30, 2020
GPopZach pushed a commit to GPopZach/gradle-graal that referenced this issue Apr 30, 2020
GPopZach pushed a commit to GPopZach/gradle-graal that referenced this issue Apr 30, 2020
GPopZach pushed a commit to GPopZach/gradle-graal that referenced this issue Apr 30, 2020
GPopZach pushed a commit to GPopZach/gradle-graal that referenced this issue Apr 30, 2020
GPopZach pushed a commit to GPopZach/gradle-graal that referenced this issue Apr 30, 2020
@matwjones
Copy link

For anyone stumbling around this and waiting for the next plugin release, I've added a comment here for a manual workaround.

@smecsia
Copy link

smecsia commented May 18, 2020

In addition to the manual workaround described by @matwjones I created a dirty hack to workaround this: graal.gradle.kts.zip

just put it in your project's root and then add this to your gradle file:

// Workaround of https://github.com/palantir/gradle-graal/issues/239
apply(from = "${rootDir}/graal.gradle.kts")

and this to your gradle.properties (example for Graalvm dev build):

graalvmVersion=20.2.0-dev
graalvmGithubRepo=graalvm-ce-dev-builds
graalvmDownloadPrefix=
graalvmDownloadSuffix=-20200429_0231

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants