-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Build does not produce statically linked binary anymore (on musl hosts) #3950
Comments
Looking at the diff: My initial suspect would be this PR; There's not too many commits between v1.1.7 and v1.1.8, so perhaps a git-bisect would work? |
The binaries built for the release are all static AFAICS, so this isn't a problem with our regular builds:
I suspect the issue is that the riscv patchset switched to using --static-pie on platforms where it is supported on glibc -- and it seems that musl doesn't support that? To quote the comment:
I'm not sure if there's a nice way to detect whether the libc we're using supports |
updates: * podman 4.6.2 * runc 1.1.9 * crun 1.9 * conmon 2.1.8 * slirp4netns 1.2.2 * libfuse 3.16.1 * fuseoverlayfs 1.13 Download runc instead of building it from source since static build doesn't produce static binary anymore with musl, see opencontainers/runc#3950
updates: * podman 4.6.2 * runc 1.1.9 * crun 1.9 * conmon 2.1.8 * slirp4netns 1.2.2 * libfuse 3.16.1 * fuseoverlayfs 1.13 Download runc instead of building it from source since static build doesn't produce static binary anymore with musl, see opencontainers/runc#3950
No, I think the root cause be here 923ae4d |
Yep, the musl in alpine is not support the static pie, there are multiple report in the community like rust-lang/cargo#5266 I think maybe we can limit the static pie compile for Debian/Ubuntu & GNU libc platform? |
Description
Calling
make static
is no longer producing a statically linked binary since release v1.1.8.The produced binary is dynamically linked to musl libc.
Steps to reproduce the issue
Compile static runc v1.1.8 binary (on alpine:3.18 with Go 1.18):
With runc v1.1.7 this was producing a statically linked binary but stopped doing so with the v1.1.8 release.
Describe the results you received and expected
ldd runc
should fail with/lib/ld-musl-x86_64.so.1: /usr/local/bin/runc: Not a valid dynamic program
as it did with runc v1.1.7.What version of runc are you using?
v1.1.8
Host OS information
Host kernel information
The text was updated successfully, but these errors were encountered: