cross-rs / cross

“Zero setup” cross compilation and “cross testing” of Rust crates
Apache License 2.0
6.53k stars 365 forks source link

GitHub release is built with too new a version of glibc #1300

Open tyilo opened 1 year ago

tyilo commented 1 year ago

Checklist

Describe your issue

cross-x86_64-unknown-linux-gnu.tar.gz from https://github.com/cross-rs/cross/releases/tag/v0.2.5 requires version 2.34 of glibc to run.

The official rust docker image only comes with version 2.31 of glibc. Thus I propose to built the official release of the cross binary with a lower version of glibc.

What target(s) are you cross-compiling for?

No response

Which operating system is the host (e.g computer cross is on) running?

What architecture is the host?

What container engine is cross using?

cross version

cross 0.2.5

Example

$ docker run --rm -it rust:1.71.0
# cd /tmp
# curl -L -O https://github.com/cross-rs/cross/releases/download/v0.2.5/cross-x86_64-unknown-linux-gnu.tar.gz
# tar xf cross-x86_64-unknown-linux-gnu.tar.gz 
# ./cross --version
./cross: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.33' not found (required by ./cross)
./cross: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.32' not found (required by ./cross)
./cross: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.34' not found (required by ./cross)

Additional information / notes

This also occurs when using cargo-binstall to install cross in the image.

Emilgardis commented 1 year ago

the official rust image has multiple debian sources, I'd recommend you use bookworm instead which ships with 2.36

We could maybe consider lowering it in our binary release, but I don't see the benefit of doing so.

tyilo commented 1 year ago

We could maybe consider lowering it in our binary release, but I don't see the benefit of doing so.

The benefit would be that it would work with the default version of the official rust docker image.

haarts commented 10 months ago

Is there a way to work around this issue till a more permanent solution has been implemented?