Comments (4)
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
from cross.
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 ghcr.io/cross-rs/x86_64-unknown-linux-gnu:main
is actually updated, cross doesn't pull in the latest images for a tag like main
/edge
$ 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 0.2.5
, note that cross 0.2.5
has Ubuntu 16.04, newer cross uses Ubuntu 20.04.
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
# Cargo.toml
[package.metadata.cross.target.x86_64-unknown-linux-gnu]
image = "ghcr.io/cross-rs/x86_64-unknown-linux-gnu:main"
from cross.
closed by accident
from cross.
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.
from cross.
Related Issues (20)
- `CROSS_CONTAINER_OPTS` is also used for `docker exec` when using `CROSS_REMOTE`
- Fail to build for `aarch64-unknown-linux-gnu` HOT 11
- When using pre-build commands cross build hangs under Windows HOT 9
- failed to read configuration file `/cargo/config.toml`
- Doing `Getting Started` tutorial corrupted my WSL HOT 2
- Failed cross build with Docker built image: aarch64-pc-windows-msvc-cross
- cross test failed with error: test failed, to rerun pass --lib
- On arm/android a zero initialized vec is not actually filled with zeros HOT 5
- Fresh install - build fail mmap issue HOT 1
- error: failed to run custom build command for ring v0.16.20 HOT 1
- pkgconfig search path not defined for arm-unknown-linux-gnueabihf HOT 6
- Running `apt-get update` hangs on `armv7-unknown-linux-gnueabihf` target HOT 7
- Act: Build fails with `sh: 1: cargo: not found` HOT 7
- Undefined temporary symbol `$BB342_17` when compiling `rustc-demangle` HOT 2
- error while loading shared library `libtest`
- CACHEDIR.TAG is not written when using custom docker image HOT 1
- cross build --target-dir does not behave the same as cargo build --target-dir HOT 2
- Incorrect warning about invalid CARGO_TARGET_arch_RUSTFLAGS being unused HOT 2
- Wrong binary when compiling with cross to x86_64-unknown-linux-musl target (error: No such file or directory) HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cross.