linkerd-await 0.2.8 fails to run on alpine linux
What is the issue?
Since 0.2.8 iinkerd-await is dynamically linked against glibc which is not present on alpine linux. Installing compatibility package does not satisfy the dependencies for linkerd-await.
How can it be reproduced?
Download and run linkerd-await on alpine linux (e.g. python:3.11-alpine:latest):
- docker run --rm -ti python:3.11-alpine sh
- apk add gcompat libgcc
- wget https://github.com/linkerd/linkerd-await/releases/download/release/v0.2.8/linkerd-await-v0.2.8-amd64
- chmod +x linkerd-await-v0.2.8-amd64
- ./linkerd-await-v0.2.8-amd64
Logs, error output, etc
Output when running linkerd-await:
Error relocating /linkerd-await-v0.2.8-amd64: __res_init: symbol not found
Output from ldd:
/lib64/ld-linux-x86-64.so.2 (0x7f3db46d7000)
libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0x7f3db457f000)
libc.so.6 => /lib64/ld-linux-x86-64.so.2 (0x7f3db46d7000)
Error relocating linkerd-await-v0.2.8-amd64: __res_init: symbol not found
Error relocating linkerd-await-v0.2.8-amd64: gnu_get_libc_version: symbol not found
output of linkerd check -o short
n/a (this is about linkerd-await. linkerd itself works like a charm.)
Environment
alpine linux based images (e.g. python:3.11-alpine)
Possible solution
Build the binary statically linked
RUSTFLAGS='-C target-feature=+crt-static' cargo build --release --target x86_64-unknown-linux-gnu
Another solution would be to link against an older version of glibc (e.g. manylinux2014) instead of the one included in latest Ubuntu.
Additional context
No response
Would you like to work on fixing this bug?
None
Thanks for reporting this - we are unlikely to have bandwidth to look at this before the new year. But if anyone wants to try and submit a fix we'd welcome it.
I wrote https://github.com/linkerd/linkerd-await/pull/418 with a possible fix here.
@DavidMcLaughlin can you take a look at the linked PR?
@kflynn @DavidMcLaughlin any update on this please?
linkerd-await v0.2.9 is released as static binaries.