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

Unable to get graalvm in index on macm1 #49

Open
masonedmison opened this issue Apr 15, 2022 · 2 comments
Open

Unable to get graalvm in index on macm1 #49

masonedmison opened this issue Apr 15, 2022 · 2 comments

Comments

@masonedmison
Copy link

Describe the bug

Unable to find graalvm in index when running nativeImage command.

To Reproduce Steps to reproduce the behavior:
with additional setting of:

JVM graalvm-java11:21.0.0 not found in index: JVM graalvm-java11 not found

and run sbt myproject/nativeImage.

  1. Run command 'sbt myproject/nativeImage'

Expected behavior

I would expect the binary to be generated

Installation:

  • Operating system: macOS/Linux - mac m1
  • Version: Monterey 12.2.1

Additional context

I can see a graalvm-java11 entry "...github.com/coursier/jvm-index/.../index.json" entry.

Search terms

m1 java11

@masonedmison masonedmison changed the title Unable to graalvm in index on macm1 Unable to get graalvm in index on macm1 Apr 15, 2022
@olafurpg
Copy link
Member

Thank you for reporting! The Java installation is discovered through the coursier java-home command, as implemented here

coursier,
"java-home",
"--jvm-index",
index,
"--jvm",
s"$jvm:$svm"

The version 21.0.0 does not support M1, it seems like you need to use a devbuild instead oracle/graal#2666

There's not much sbt-native-image can do to fix this issue except to upgrade the default GraalVM version when the latest stable release supports M1.

@masonedmison
Copy link
Author

masonedmison commented Apr 19, 2022

Thanks so much for the kind reply! I'll try to get the devbuild installed tonight and give it another go. In theory, I should be able to pass the path to this devbuild with nativeImageGraavlHome and that will override the automatic fetching via coursier, yeah?

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