linkerd2 icon indicating copy to clipboard operation
linkerd2 copied to clipboard

linkerd-await 0.2.8 fails to run on alpine linux

Open elias5000 opened this issue 2 years ago • 3 comments

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

elias5000 avatar Dec 14 '23 10:12 elias5000

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.

DavidMcLaughlin avatar Dec 14 '23 17:12 DavidMcLaughlin

I wrote https://github.com/linkerd/linkerd-await/pull/418 with a possible fix here.

kflynn avatar Dec 21 '23 17:12 kflynn

@DavidMcLaughlin can you take a look at the linked PR?

SuperSandro2000 avatar Mar 19 '24 12:03 SuperSandro2000

@kflynn @DavidMcLaughlin any update on this please?

michalschott avatar May 11 '24 22:05 michalschott

linkerd-await v0.2.9 is released as static binaries.

olix0r avatar May 16 '24 22:05 olix0r