pkl icon indicating copy to clipboard operation
pkl copied to clipboard

Improve development setup instructions

Open translatenix opened this issue 4 months ago • 4 comments

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...

translatenix avatar Feb 05 '24 13:02 translatenix