feat: configure cross to support x86_64 and aarch64 for linux/musl#674
feat: configure cross to support x86_64 and aarch64 for linux/musl#674h3nill merged 2 commits intobytebeamio:mainfrom
Conversation
…4-unknown-linux-musl
h3nill
left a comment
There was a problem hiding this comment.
this is failing to build for me with error:
Error:
0: failed to parse file `"/home/henil/Workspace/bytebeam/rumqtt/Cross.toml"` as TOML
1: invalid type: map, expected a string for key `target.x86_64-unknown-linux-musl.image` at line 8 column 14
$ cross version
cross 0.2.5
|
@henil You must follow the official installation procedure from Cross docs: cargo install cross --git https://github.com/cross-rs/crossI don't know why they want to install using git and not directly from cargo but they decided to do this :/ The CI respect their decision :) |
|
gotcha, works when installed via git and cargo. btw why was gnu build removed, We would like to have both |
|
@henil The top level |
|
oh my bad missed that, been a while since i used
but
with error (click to expand)
How are you running it for aarch target? |
|
@henil Any update? 🤗🥳 |
|
i was working on this only :) turns out to build for aarch target you need to install qemu and one other related package, see: https://stackoverflow.com/questions/71531771/docker-buildx-armv7-platform-missing. can you mention this somewhere? (also due to emulation compilation is very slow) PS: sorry for the delay it was kinda hard to notice that i was missing arm platform support in docker so took a while to debug. |
|
I don't have |
|
what machine are you on? |
|
@henil See https://www.docker.com/blog/how-to-rapidly-build-multi-architecture-images-with-buildx I have already configured docker buildx create --name mybuilder --use --bootstrapRestart
|
|
|
Well install |
|
I've created the script for building the binaries (see PR #673) |
|
Nevertheless this is strange because from |
|
@carlocorradini I confirmed with someone else as well, aarch binaries doesn't build unless you have qemu related dependencies installed (i think its probably a docker thing not a cross), can you mention this two dependencies ref: https://stackoverflow.com/questions/71531771/docker-buildx-armv7-platform-missing |
|
Good to know! |
It's a cross thing, as in qemu is used to emulate hardware for running/testing against expected backend. |
|
@henil Done |
|
In the script available in PR #673 I'll add a check before running cross to assert the presence of |
@de-sh but running the following command shouldn't run binary or tests
|
|
Thank you @carlocorradini! 🎉 |

Related to PR #671 and PR #673
What has been changed:
crossfor enhanced cross compilation supportingx86_64-unknown-linux-muslandaarch64-unknown-linux-musland more...