fwcd / fwcd/kotlin-language-server

Failed to build on Mac M1 (arm - aarch64)

Open
#335 4 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Kotlin
Stars
2k
Forks
252
PR merge metrics
No merged PRs in 30d

Description

I tried building using `./gradlew :server:installDist` with java version `17.0.2` on the PATH. I get this failure:

```
Downloading https://services.gradle.org/distributions/gradle-7.3.1-bin.zip
...........10%...........20%...........30%...........40%...........50%...........60%...........70%...........80%...........90%...........100%

Welcome to Gradle 7.3.1!

Here are the highlights of this release:
- Easily declare new test suites in Java projects
- Support for Java 17
- Support for Scala 3

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

Starting a Gradle Daemon (subsequent builds will be faster)

FAILURE: Build failed with an exception.

* What went wrong:
Could not determine the dependencies of task ':server:installDist'.
> Could not resolve all dependencies for configuration ':server:runtimeClasspath'.
> Failed to calculate the value of task ':server:compileJava' property 'javaCompiler'.
> Unable to download toolchain matching these requirements: {languageVersion=11, 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/11/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
```

From some Googling, I found [this issue](https://github.com/square/okhttp/issues/6943) in a different project, and what may have helped them is updating to Gradle 7.4 and some other changes (see [this comment](https://github.com/square/okhttp/issues/6943#issuecomment-1045545124)).

Contributor guide

No contributing guide indexed for this repository

Research direction

Reproduce the failure on a Mac M1 with Java 17 using `./gradlew :server:installDist`. Start by checking the Gradle 7.3.1 toolchain configuration and its request for JDK 11 on macOS aarch64. Done means the command resolves a compatible toolchain and completes successfully.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, kotlin
Domain
build-system
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.