look for libc at runtime on linux #870
Labels
enhancement
Solving this issue will likely involve adding new logic or components to the codebase.
os-linux
Milestone
Right now we have a pretty decent runtime libc detection on Windows. This enables us to provide automatically built artifacts from appveyor for every commit to master branch. Users can download the .zip file, unzip, and it just works.
Linux users can sometimes have a hard time obtaining newer zig releases, especially when llvm has recently released and hasn't quite made it to all the package managers.
I've managed to create a static build of zig using alpine linux inside docker (PR coming soon to https://github.com/zig-lang/docker-zig), but the static binary does not know where to find libc, since we currently rely on compile-time configuration of the default libc on linux.
I also noticed that zig does not find its own std lib based on its own exe path like it does on windows:
Unable to find zig lib directory. Reinstall Zig or use --zig-install-prefix.
This issue is to do the following things:
Of course, instead of executing shell scripts, zig will directly run
cc
and do the text manipulations.One can always overwrite this detection with command line arguments:
If no c compiler is installed or no runtime libc can be detected, and no libc arguments are given, this is when, once #514 is done, we would use zig's own libc.
Once the above 2 checkbox items are complete, we can have Travis CI (or maybe docker?) build a static linux binary for each commit to master branch, and this will work on every linux distribution.
The text was updated successfully, but these errors were encountered: