-
Notifications
You must be signed in to change notification settings - Fork 11
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
Not downloading aarch64 (ARM64) version of java when running on Apple M1 #14
Comments
It seems that GOOS and GOARCH are used to get available release/url list, meaning these are fixed at build time. Line 54 in e33ac29
Did you build a native arm jabba from source, or did you use the amd64 binary ? |
I used the one that is downloaded when running the installer. Which is the darwin-amd64 version. I didn't know that this was decided at compile time. That makes it even more problematic because I want to be able to download both AMD and ARM Java. I have built a darwin-arm jabba from source. But it doesn't list anything with ❯ ./jabba-0.12.0-darwin-arm64 ls-remote
❯ ./jabba-0.12.0-darwin-amd64 ls-remote |head -n2
[email protected]
aoj@16
❯ file jabba-0.12.0-darwin-arm64 jabba-0.12.0-darwin-amd64
jabba-0.12.0-darwin-arm64: Mach-O 64-bit executable arm64
jabba-0.12.0-darwin-amd64: Mach-O 64-bit executable x86_64
|
When I'm debugging the application on my MacBook I get the following values for Line 54 in a0d6422
Line 19 in a0d6422
But the Line 3367 in a0d6422
The Lines 165 to 166 in a0d6422
❯ jabba ls-remote --arch aarch64 | head -n2
[email protected]
corretto@19 |
I don't think there was ever much multi-arch support in Jabba originally but it's been requested in other ways before. (i.e. 64 bit Windows users wanting to also install 32-bit java). Definitely something worth adding though. I would like to bring all the go modules up to date as a first step then I can take a look at this. |
It is probably better to fix the index from darwin/aarch64 to darwin/amd64 during generation. |
@martonsz Can you check installing a jdk works on darwin/arm64 using a darwin/arm64 build? |
@nicerloop Short answer: Version 0.12.1-rc works now on my MacBook with Apple M1 I have downloaded the binaries from GitHub and now the ARM64 version is downloading a JDK with the correct architecture.
|
I'm not getting the arm64 version of java on my MacBook Pro M1
In the following example, I'm installing [email protected] which exists in both
darwin/aarch64
anddarwin/amd64
in the index.jsonThe amd64 version is downloaded instead of the aarch64.
The workaround is to download using an URL to the aarch64 version
❯ jabba --version 0.12.0 ❯ uname -a Darwin AMAYXVXTHQVW1 21.6.0 Darwin Kernel Version 21.6.0: Sun Nov 6 23:31:13 PST 2022; root:xnu-8020.240.14~1/RELEASE_ARM64_T6000 arm64
The text was updated successfully, but these errors were encountered: