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

[FR] Request ability to build prefab on apple silicon: fail to get a suitable JDK #166

Closed
dneto0 opened this issue May 26, 2023 · 1 comment · Fixed by #167
Closed

[FR] Request ability to build prefab on apple silicon: fail to get a suitable JDK #166

dneto0 opened this issue May 26, 2023 · 1 comment · Fixed by #167
Labels
enhancement New feature or request

Comments

@dneto0
Copy link

dneto0 commented May 26, 2023

Is your feature request related to a problem? Please describe.
I can't build prefab on Apple silicon.

this is the output I get:

$ ./gradlew installDist
Starting a Gradle Daemon, 2 incompatible Daemons could not be reused, use --status for details

FAILURE: Build failed with an exception.

* What went wrong:
Could not determine the dependencies of task ':cli:installDist'.
> Could not resolve all dependencies for configuration ':cli:runtimeClasspath'.
   > Failed to calculate the value of task ':cli:compileJava' property 'javaCompiler'.
      > Unable to download toolchain matching these requirements: {languageVersion=8, vendor=any, implementation=vendor-specific}
         > Unable to download toolchain. This might indicate that the combination (version, architecture, release/early access, ...) for the requested JDK is not available.
            > Could not read 'https://api.adoptopenjdk.net/v3/binary/latest/8/ga/mac/aarch64/jdk/hotspot/normal/adoptopenjdk' as it does not exist.

* 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 4s

I have tried with various JDK versions, including openjdk 20.0.1 installed via "brew install openjdk"

Describe the solution you'd like
I'd like the build to work.

Describe alternatives you've considered
I have tried building with openjdk installed via "brew install openjdk"

Additional context

Seems to be the similar to https://youtrack.jetbrains.com/issue/KTIJ-24695/Default-Kotlin-project-can-not-be-synced-on-Mac-M1
and maybe also https://youtrack.jetbrains.com/issue/KTIJ-25475/Up-kotlin-jvmToolchain-to-11-and-higher-only-for-aarch64

@dneto0 dneto0 added the enhancement New feature or request label May 26, 2023
DanAlbert added a commit to DanAlbert/prefab that referenced this issue Jun 1, 2023
Some set of tools here (Gradle? Kotlin compiler?) don't work on M1 Macs.
We should update regardless, of course :) The new version of
kotlinx.serialization even includes better serialization that fix some
of our xfail tests.

There are quite a few other old dependencies we probably ought to
update, but for now I've limited it to just what was needed to get this
building on M1.

Fixes google#166.
DanAlbert added a commit to DanAlbert/prefab that referenced this issue Jun 1, 2023
We don't need (or want) JDK 8, we just need the output to be compatible
with JRE 8 (though even that's debatable and we should figure out what
a reasonable minimum Java version is these days).

Fixes google#166.
@DanAlbert
Copy link
Member

Can cherry-pick #167 if you want the fix before someone has a chance to review.

DanAlbert added a commit that referenced this issue Jun 1, 2023
We don't need (or want) JDK 8, we just need the output to be compatible
with JRE 8 (though even that's debatable and we should figure out what
a reasonable minimum Java version is these days).

Fixes #166.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants