1
Fork 0
Go to file
Motiejus Jakštys e8767d2b76 Dockerfile: move to bullseye
Zig's 0.11.0 linking code has a bug where it would refuse to link to a
symbol that links to `pthread_create@@GLIBC_2_34`, since
`pthread_create@GLIBC_2.2.5` exists.

All that weirdness can be worked around by using a distro that has glibc
2.31.

For someone who is porting this to a modern distro: getting glibc-linked
0.11.0 may be tough. You may have better luck with 0.12.0.
If you really need 0.11.0, link stage3 to musl, that will just work.
2024-11-10 00:31:11 +02:00
0.10.0-675-g9d93b2ccf1-TypeOf-hack.patch run: BoundFn hack 2024-11-03 22:20:46 +02:00
0.10.0-747-g7b2a936173-CallOptions.patch add missing patch 2024-11-06 14:11:20 +02:00
0.10.0-1638-g7199d7c777-re-add-qualCast.patch add missing patch 2024-11-09 14:39:42 +02:00
Dockerfile Dockerfile: move to bullseye 2024-11-10 00:31:11 +02:00
README.md container fixes 2024-11-09 23:17:04 +02:00
llvm-snapshot.gpg.key Initial commit 2024-11-01 09:33:22 +02:00
llvm.list Initial commit 2024-11-01 09:33:22 +02:00
run step31, 32, 33 2024-11-10 00:04:37 +02:00

README.md

Building modern Zig from the original C++ implementation

This repository explores building Zig from the C++ implementation without using binary blobs. Forum post goes with this.

Clone zig and prune binary files from history:

$ git clone https://github.com/ziglang/zig zig2
$ cd zig2
$ git config user.name "$(git config --get user.name)"
$ git config user.email "$(git config --get user.email)"
$ git filter-repo --prune-empty=never --prune-degenerate never --invert-paths --path-glob 'stage1/zig1.wasm*' --path stage1/zig1.c

Now build an isolated container with a bunch of zig historic dependencies:

$ docker build -t zig-repro .
$ docker run -ti --rm --name zig-repro \
    -v ~/code:/x \
    -v /home/$USER/.cache/zig:/home/$USER/.cache/zig \
    -w /x/zig2 \
    zig-repro \
    sh -c "useradd -s /bin/bash -u $UID $USER && su $USER; bash"

And run the thing in the container:

$ ../zig-repro/run