Improve development setup instructions
- Dominant language
- Java
- Stars
- 11.5k
- Forks
- 402
- Avg merge
- 1d 15h
- Merged PRs (30d)
- 20
Description
I'm trying to build Pkl on Ubuntu 22.04/WSL 2.0.14. (I'd prefer to build directly in Windows but ran into https://github.com/apple/pkl/issues/20 and failing tests.) After reading through `DEVELOPMENT.adoc`, I have the following questions:
What does "Setup Gradle on your system" entail? (`./gradlew build` seems to work fine without further setup.)
How do I make `./gradlew buildNative` work? Currently, task `:pkl-cli:alpineExecutableAmd64` fails with:
```
/usr/bin/ld: cannot find -lz: No such file or directory
```
Further up I see:
```
[7/7] Creating image... (0.0s @ 1.86GB)
Fatal error: java.lang.RuntimeException: There was an error linking the native image: Linker command exited with 1
Based on the linker command output, possible reasons for this include:
1. It appears as though libz:.a is missing. Please install it.
```
Installing package `zlib1g-dev`, which contains `/usr/lib/x86_64-linux-gnu/libz.a`, didn't solve the problem.
The good news is that after tinkering with the build scripts to exclude the Alpine build and test tasks, `./gradlew build buildNative` succeeded. So I think I'm pretty close...
Contributor guide
Research direction
Start with DEVELOPMENT.adoc and the ./gradlew buildNative task, then inspect the build scripts that select the Alpine executable and test tasks. Reproduce the linker failure on Ubuntu 22.04/WSL and compare it with the successful build after excluding Alpine tasks. Done means the development setup instructions explain Gradle setup, native-build prerequisites, and the relevant limitation or workaround.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100