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 provision a java 7 toolchain. #77

Open
wagyourtail opened this issue Sep 12, 2024 · 4 comments
Open

Can't provision a java 7 toolchain. #77

wagyourtail opened this issue Sep 12, 2024 · 4 comments

Comments

@wagyourtail
Copy link

wagyourtail commented Sep 12, 2024

I'm working on a project where I provision many different java versions to compile multiple sourceSets. And it appears that foojay fails to download/extract a working build of java 7. the api redirect does appear to download a working java 7 build, but it can't use it for some reason. tested on archlinux and the github ci

FAILURE: Build failed with an exception.

* What went wrong:
Failed to calculate the value of task ':compileJava' property 'javaCompiler'.
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/william/.gradle/jdks/zing20/zing20.09.1.0-1-jdk7.0.272-linux_x64' could not be probed: Command returned unexpected result code: 139
Error output:

java 6 works....

@jbartok
Copy link
Member

jbartok commented Sep 16, 2024

The failure above is about probing the JVM (which is basically starting up an instance of it to figure out data about it). So downloading and extracting work, the problem happens later.

From the top of my head I would guess the problem is due to that particular JVM not having the right architecture for the machine it's being used on. You can confirm that by trying to start a java process from it by hand.

If I'm right, then this is a known problem for which we don't really have a solution so far: #5

@wagyourtail
Copy link
Author

wagyourtail commented Sep 16, 2024

ahh, yeah. it appears to seg fault.
I use glibc on my system tho...
it seems that the top file returned by the foojay api just doesn't work, I just went and grabbed it manually to check,
all the java 7 ones are glibc.
is there a way to force it to pick zulu over zulu_prime, because those work?

@jbartok
Copy link
Member

jbartok commented Sep 16, 2024

Try using JvmVendorSpec.matching(String). I don't have time right now to dig deeper, but let me know if you can't get it working.

@wagyourtail
Copy link
Author

wagyourtail commented Sep 17, 2024

looks like JvmVendorSpec.AZUL got it to use the working one

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

2 participants