cargo-dist icon indicating copy to clipboard operation
cargo-dist copied to clipboard

`musl-g++` missing when building `x86_64-unknown-linux-musl` artifact

Open ManuelSopenaBallesteros opened this issue 1 year ago • 1 comments

Dear cargo dist team,

I have this pipeline https://github.com/eth-cscs/manta/actions/runs/13227334279/job/36919876655 created with cargo dist, one of the targets is x86_64-unknown-linux-musl)) and currently fails because the crate rdkafka is a c binding and needs musl-g++ to compile.

For some reason x86_64-unknown-linux-gnu works

Any idea? is this something that could be fixed?

thank you

ManuelSopenaBallesteros avatar Feb 09 '25 18:02 ManuelSopenaBallesteros

You can use the approach described here: https://opensource.axo.dev/cargo-dist/book/ci/customizing.html?highlight=build-setup.yml#customizing-build-setup

To first install musl-tools e.g. add a step with sudo apt-get update && sudo apt-get install musl-tools

Here's an example from one of my projects of using a build-setup.yml to install compilers for cross compilation: https://github.com/CramBL/fidelityfetch/blob/bccae1cf7e969c521b4f9cbf54ed2a868777155b/.github/build-setup.yml.

CramBL avatar Mar 02 '25 12:03 CramBL

This does not seem to do the trick. musl-tools installation does not affect the error.

ThomasTNO avatar Nov 19 '25 13:11 ThomasTNO