n0-computer / dumbpipe

https://dumbpipe.dev
Other
107 stars 9 forks source link

Linux release requires GLibc 2.34 #7

Open link2xt opened 9 months ago

link2xt commented 9 months ago

I have tried to run Linux x86_64 release, and it failed on a system with glibc 2.31:

$ ./dumbpipe 
./dumbpipe: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.32' not found (required by ./dumbpipe)
./dumbpipe: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.33' not found (required by ./dumbpipe)
./dumbpipe: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.34' not found (required by ./dumbpipe)

Maybe build with cargo-zigbuild to get a static binary?

Otherwise at least build in an Ubuntu 18.04 container or something like this, but then it would not be runnable in Alpine Linux containers with musl libc.

I am using zig toolchain here without cargo-zigbuild, works pretty well and runs on any Linux: https://github.com/deltachat/deltachat-core-rust/blob/280f13b8cf85e933c994f819ad6fae2823a563a0/scripts/zig-rpc-server.sh https://github.com/deltachat/deltachat-core-rust/blob/280f13b8cf85e933c994f819ad6fae2823a563a0/scripts/zig-cc

dignifiedquire commented 9 months ago

glibc is the new dot-net..

rklaehn commented 9 months ago

I guess we need to build with musl then. Thanks for testing.

rklaehn commented 9 months ago

Unfortunately I currently don't have access to my linux box on the attic.

Would it work to just install with musl?

cargo install dumbpipe --target x86_64-unknown-linux-musl

Tried this locally and it works, but for some weird reason my mac does not like the binary then... :-)

link2xt commented 9 months ago

cargo install will work in any case as it will be linked against local libc. The issue is about the tarballs provided for 0.1.0 release.

Building against x86_64-unknown-linux-musl instead of x86_64-unknown-linux-gnu should work indeed, zig toolchains are only needed if you also want to cross-compile for aarch64 etc.