-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[CI] Build with musl libc #199
Comments
What is the end benefit of this? Is it that, a single musl-build binary will run on different variants of Linux where otherwise multiple binaries would be required? If so, do we have examples of at least 2 different variants of linux can be used as a test case whereby a) a single non-musl binary will fail and b) a single static musl-binary will succeed? |
Looking into this more, it looks like a good idea to do so. Could you please add to the automated build artifacts? |
Yes.
It helps lift the dependency on GLIBC. Same is true for CentOS also, though it's EOL now. |
@liquidaty: UPDATE Successfully built Installed sudo apt install musl-tools and, initially, built with $ PREFIX=amd64-linux-musl \
CC=musl-gcc \
MAKE=make \
ARTIFACT_DIR=artifacts \
LDFLAGS=-static \
RUN_TESTS=false \
./scripts/ci-build.sh
$ ls -Gghl amd64-linux-musl/bin/zsv
-rwxrwxr-x 1 2.3M Oct 3 15:28 amd64-linux-musl/bin/zsv
$ file amd64-linux-musl/bin/zsv
amd64-linux-musl/bin/zsv: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), statically linked, with debug_info, not stripped The final static executable works fine for all the supported commands except when it comes to dynamic extensions. Here are relevant threads that discuss this in great detail:
Given above, with Library zsvextmy.so not found
Error: unable to initialize extension my In conclusion, the static linking may well work with static extensions but I didn't verify that. |
Let's not abandon yet-- I will take a look! |
Lets keep the automated build for musl, but i) for the musl build only, do not run the extension tests, and ii) (this can be done at a later time) add a build option such as NO_DL_OPEN which when set will have the effect of omitting extension support (it would be ideal if the configure script for test for this, but maybe it's not possible and it will simply have to hardcode it if the compiler contains "musl" and leave it as a configuration option for all other cases) |
musl libc: https://musl.libc.org/
Have this been considered before?
What do you think about it?
Might be helpful for generating a fully static Linux binary.
xsv
is providing a pre-built binary with musl libc.See https://github.com/BurntSushi/xsv/releases/tag/0.13.0.
The text was updated successfully, but these errors were encountered: