2

I cross-compile in Mac OS system. the version for solana is v1.13.5, rustc is v1.63.0. I want to compile a linux static target in Mac.

step1. rustup target add x86_64-unknown-linux-musl
step2. brew install FiloSottile/musl-cross/musl-cross
step3. ln -s /usr/local/bin/x86_64-linux-musl-gcc /usr/local/bin/musl-gcc
step4. add a .cargo/config.toml file in the root fold of project with below content.

[target.x86_64-unknown-linux-musl]
linker = "x86_64-linux-musl-gcc"

step5. cargo build --release --target x86_64-unknown-linux-musl

everthing goes smoothly now. when complie solana-streamer v1.14.7, the error occur. see below pic. enter image description here

if I adopt the the suggestion(add .try_into().unwrap()) in error msg. it compile without error. any suggestion that needn't to change the third party code. appreciate your effort.

1
  • Actually, now that I read it, I think your suggestion is a great idea! Please put in a PR for this. You'll probably need to add a #[allow(clippy::...)] somewhere for this to work on all platforms.
    – Jon C
    Commented Dec 12, 2022 at 16:09

1 Answer 1

1

Unfortunately, this might be an issue in the libc recvmmsg implementation differing in musl vs other platforms: https://www.openwall.com/lists/musl/2014/06/07/5

1
  • ok, maybe this is a issue.
    – tang wen
    Commented Jan 5, 2023 at 8:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.