gunnarmorling / 1brc

1️⃣🐝🏎️ The One Billion Row Challenge -- A fun exploration of how quickly 1B rows from a text file can be aggregated with Java
https://www.morling.dev/blog/one-billion-row-challenge/
Apache License 2.0
6k stars 1.8k forks source link

Project won't compile on WSL #642

Closed paskozdilar closed 5 months ago

paskozdilar commented 7 months ago

When running in WSL, with openjdk-21-jre-headless, the command ./mvnw clean verify -X fails:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.12.1:compile (default-compile) on project average: Fatal error compiling: error: release version 21 not supported -> [Help 1]

This is the output of java --version:

openjdk 21.0.1 2023-10-17
OpenJDK Runtime Environment (build 21.0.1+12-Ubuntu-222.04)
OpenJDK 64-Bit Server VM (build 21.0.1+12-Ubuntu-222.04, mixed mode, sharing)

Full log uploaded:

log.txt

marktodisco commented 5 months ago

@paskozdilar I found this helpful stack overflow post.

https://stackoverflow.com/questions/75835961/fatal-error-compiling-error-release-version-17-not-supported

I'm also using WSL, and the solution was to download and install Java directly (not with apt).

https://www.oracle.com/java/technologies/downloads/#jdk21-linux

Hopefully, this helps!

paskozdilar commented 5 months ago

Thanks @marktodisco. I've tried following your instructions, but with OpenJDK instead of proprietary Oracle JDK: https://jdk.java.net/21/ And the build has passed.

Even though I would still consider this a bug worthy of investigation (why doesn't it work with default Ubuntu package?), I won't keep this issue open since the project works now.