fix: repair Docker dev-environment build and clarify native setup#388
Merged
Conversation
The documented setup was failing. The native path assumes a Debian host with LLVM 13, but aWsm's llvm-alt bindings call LLVM C-API functions (LLVMBuildCall, LLVMBuildLoad) removed in LLVM 15+, so the build fails to link against newer system LLVM (e.g. LLVM 21 on Ubuntu 24.04). The Docker route exists for exactly this reason but had bit-rotted in several places. Dockerfile.x86_64: - Install `hey` from focal's universe repo instead of downloading the prebuilt binary, whose hey-release S3/GCS URLs now return 403. - Add `git config --system --add safe.directory '*'` so the root-run `make install` doesn't abort with "dubious ownership" on the host-owned, bind-mounted /sledge. - Set RUSTUP_HOME/CARGO_HOME to the dev user's install so the root-run build can resolve the default Rust toolchain instead of failing with "no default is configured". Makefile: - Make the wasm_apps symlink rule idempotent (ln -srfn). The symlink is committed to the repo, so it already exists on a fresh clone and the old `ln -sr` failed with "File exists", breaking `make install`. README.md: - Recommend the Docker route and add an explicit caveat to the native section documenting the LLVM-13/Debian requirement and why Ubuntu 24.04 (and other non-LLVM-13 hosts) cannot use it. Verified end-to-end via `./devenv.sh setup`: aWsm, the runtime, and all benchmark apps build, and the runtime serves fibonacci, gocr, and resize_image requests with correct responses. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Contributor
Author
|
I'm potentially interested in using some of my AI tokens to get this up to date. Here's a PR of some issues I hit trying to clone and run the project. I've also opened a PR against gocr due to a link not returning a 404. That will take a few layers of PRs to get merged here due to our multi-layer submodule setup. |
emil916
requested changes
Jun 20, 2026
emil916
left a comment
Contributor
There was a problem hiding this comment.
Other than that it looks good.
Contributor
There was a problem hiding this comment.
This can be upgraded to "noble", I have been using it locally and it is compatible.
Contributor
Author
There was a problem hiding this comment.
@emil916 - I pushed a new commit for this and tested the Docker and native install paths on Noble.
The dev toolchain is pinned to LLVM 13 (aWsm builds against an LLVM-13 binding fork), but apt.llvm.org never published llvm-toolchain-noble-13 and noble dropped libtinfo5, so a plain focal->noble bump failed to build. - install_llvm.sh: on noble, pin the focal apt.llvm.org repo for LLVM 13 and install the focal-era libtinfo5/libffi7 the LLVM 13 packages need; skip lldb-13 (needs the absent libpython3.8). Other releases keep the upstream llvm.sh path. - Dockerfile.x86_64: base on ubuntu:noble; drop libtinfo5 from apt (handled by install_llvm.sh); reuse noble's stock ubuntu user at UID/GID 1000 instead of creating a colliding dev user. - install_deb.sh: drop libtinfo5 from apt (handled by install_llvm.sh). - README: document the validated native build on Ubuntu incl. 24.04 noble, with caveats (update-alternatives repoints default clang; focal-pinned packages). Verified end-to-end on Ubuntu 24.04.4 (noble), x86_64, both in Docker and natively: aWsm, libsledge, the runtime, and all nine sample *.wasm.so modules build and sledgert runs. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
19a49a6 to
8eccb03
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The documented setup instructions were failing. The native path assumes a Debian host with LLVM 13, but aWsm's
llvm-altbindings call LLVM C-API functions (LLVMBuildCall,LLVMBuildLoad) that were removed in LLVM 15+ — so on a newer host (e.g. Ubuntu 24.04 / LLVM 21) the build fails to link (undefined symbol: LLVMBuildCall), andinstall_deb.shcan't even run (libtinfo5and LLVM 13 aren't available there).The Docker route exists precisely to pin the LLVM-13 toolchain, but it had bit-rotted in several places. This PR repairs the Docker build and documents the native constraint. (A separate change to the
gocrzlib download URL is needed too, but it lives in a nested submodule and will be handled via the submodule chain.)Changes
Dockerfile.x86_64heyfrom focal'suniverserepo instead of downloading the prebuilt binary — thehey-releaseS3/GCS URLs now return 403.git config --system --add safe.directory '*'so the root-runmake installdoesn't abort with "dubious ownership" on the host-owned, bind-mounted/sledge.RUSTUP_HOME/CARGO_HOMEto thedevuser's install so the root-run build can resolve the default Rust toolchain instead of failing with "no default is configured".Makefilewasm_appssymlink rule idempotent (ln -srfn). The symlink is committed to the repo, so it already exists on a fresh clone and the oldln -srfailed with "File exists", breakingmake install.README.mdVerification
./devenv.sh setupnow completes end-to-end: aWsm, the runtime, and all benchmark apps build. The runtime was launched against the built binaries and served:GET /fib?10→55,?20→6765(correct HTTP headers)expected_result.txtexpected_result.jpg🤖 Generated with Claude Code