How to use direct cross-compilation under Linux #26223
|
I want to compile the executable file of aarch64-unknown-linux-gnu under x86_64 GNU/Linux. How to configure the project parameters is needed. I have installed gcc-aarch64-linux-gnu \ g++-aarch64-linux-gnu \binutils-aarch64-linux-gnu \libc6-dev-arm64-cross. Using cross-compilation ultimately depends on the glibc version of the compilation environment, which may be higher than my running environment. .cargo/config.toml |
Replies: 2 comments 4 replies
|
You can try to use cross for this. See https://github.com/vectordotdev/vector/blob/master/.github/workflows/cross.yml. Note that we no longer use the aarch64 binary that is created by this workflow for our releases. We build on native arm instead. However, following what this workflow does locally should work |
|
The decisive line in that wall of output is this one:
There's a second one queued up right behind it, incidentally. Which is the real argument for @thomasqueirozb's suggestion, and it happens to answer your glibc concern rather than sidestep it. Linking against |
You can try to use cross for this. See https://github.com/vectordotdev/vector/blob/master/.github/workflows/cross.yml.
Note that we no longer use the aarch64 binary that is created by this workflow for our releases. We build on native arm instead. However, following what this workflow does locally should work