-
Notifications
You must be signed in to change notification settings - Fork 392
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
binutils too old to be compatible with recent nightlies #1319
Comments
the latest images works, using ld 2.34 $ CROSS_TARGET_X86_64_UNKNOWN_LINUX_GNU_IMAGE="ghcr.io/cross-rs/x86_64-unknown-linux-gnu:main" \
cross-util run --target x86_64-unknown-linux-gnu -- "ld --version"
GNU ld (GNU Binutils for Ubuntu) 2.34 Make sure that $ docker pull ghcr.io/cross-rs/x86_64-unknown-linux-gnu:main
docker pull ghcr.io/cross-rs/x86_64-unknown-linux-gnu:main
main: Pulling from cross-rs/x86_64-unknown-linux-gnu
edaedc954fb5: Already exists
3ba6a39e216b: Pull complete
ceb9f63710c9: Pull complete
b09634800521: Pull complete
6c70d1c0e806: Pull complete
8b1d4c95c4a4: Pull complete
c710eb4c7c4b: Pull complete
da0191c7c407: Pull complete
0e1376e6048d: Pull complete
fb5bccee428c: Pull complete
913a127e772e: Pull complete
44e47dfe46b9: Pull complete
2a23a22cb021: Pull complete
f204b9544051: Pull complete
Digest: sha256:30235811948871aef514c986f0f991fa9b56385910210038d8354e9bf63d06e2
Status: Downloaded newer image for ghcr.io/cross-rs/x86_64-unknown-linux-gnu:main
ghcr.io/cross-rs/x86_64-unknown-linux-gnu:main
$ docker image ls ghcr.io/cross-rs/x86_64-unknown-linux-gnu:main
REPOSITORY TAG IMAGE ID CREATED SIZE
ghcr.io/cross-rs/x86_64-unknown-linux-gnu main 396b40224753 38 hours ago 1.46GB To solve this, you can either use below workaround to update the image cross uses, or use cross installed from main (and ensuring that the image is updated). Quick workaround for users on env: # set to latest image
CROSS_TARGET_X86_64_UNKNOWN_LINUX_GNU_IMAGE=ghcr.io/cross-rs/x86_64-unknown-linux-gnu:main config: # Cross.toml
[target.x86_64-unknown-linux-gnu]
image = "ghcr.io/cross-rs/x86_64-unknown-linux-gnu:main" Or
|
closed by accident |
Upgrading the default distro is however not a great idea either. Since you need to build on a sufficiently old version of glibc to not get errors when trying to run the binary on other distros (notably: stable Debian, RHEL/CentOS). Some care is needed to ensure that this doesn't break. |
We provide a unknown-linux-gnu centos7 images to make this easier, however it uses ld 2.27 [target.aarch64-unknown-linux-gnu]
image = "ghcr.io/cross-rs/aarch64-unknown-linux-gnu:main-centos" we also have integration with cargo-zigbuild which lets you choose glibc version, https://github.com/cross-rs/cross/wiki/Configuration#buildzig |
Checklist
Describe your issue
Recent Rust nightlies require a newer linker version:
cross seems to use
GNU ld (GNU Binutils for Ubuntu) 2.26.1
on the problematic targets. I don't know which version resolves the problem, but I do know that the problem goes away with the latest version.What target(s) are you cross-compiling for?
x86_64-unknown-linux-gnu
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, cargo 1.74.0-nightly (2cc50bc0b 2023-08-22)
Example
cross +nightly build --target x86_64-unknown-linux-gnu
Additional information / notes
Rust issue rust-lang/rust#115239
The text was updated successfully, but these errors were encountered: