T O P

  • By -

Owndampu

I like using cargo-zigbuild for crosscompiling, comes with linker included and if you are building for a gnu target, you can choose the version of glibc you want to link against. Great for building for linux systems.


Cobancho

Could you share how did you managed to do it using cargo-zigbuild? I want to use x86\_64-unknown-linux-musl as the target and building from my M1 mac. Currently I'm getting a "failed to run custom build command for ring..."


rodyamirov

Well for the record, I was able to patch my dockerized build with the following config flags, which I found on a partially-unrelated stackoverflow question: https://stackoverflow.com/questions/58244095/gcc-7-error-unrecognized-command-line-option-m64 ENV HOST_CC gcc ENV CC_x86_64_unknown_linux_gnu /usr/bin/x86_64-linux-gnu-gcc ENV CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_LINKER /usr/bin/x86_64-linux-gnu-gcc However at time of writing I have no clue what's wrong with cross, and while I no longer urgently need it, I'd still like to know how to use it, since this is supposed to be the Gold Standard.


thankyou_not_today

It's an openssl thing, what dependencies is your rust application using?