cross-rs / cross

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

Feature to support Ubuntu 22 image base instead of Ubuntu 20 #1534

Open garygan89 opened 3 months ago

garygan89 commented 3 months ago

Checklist

Describe your request

Currently the main tag is using Ubuntu 20 instead of Ubuntu 22. Since Ubuntu 20 is going to EOL on April 2025, is there any plan or any existing tag that include the toolchain but based on Ubuntu 22? Perhaps I missed it as it is not mentioned anywhere in the doc.

Thanks.

Describe why this would be a good inclusion for cross

This will be good to build any library that is meant to run on target host running Ubuntu 22.04. Currently I had to build all the libraries used in 22.04 but on the cross main image which is based on Ubuntu 20.

Emilgardis commented 3 months ago

See #973 which by now is a bit out of date, but its practically all that is needed

Emilgardis commented 3 months ago

There is a way to do this yourself also if you need a minimal environment (basically only gcc/g++ for that architecture). Possible to add other things to but it can be tricky

# Cross.toml
[target.TARGET]
image = "ubuntu:22.04"
prebuild = ["apt-get update && apt-get install <gcc>"]

For aarch64 you'd install g++-aarch64-linux-gnu libc6-dev-arm64-cross