Open Timtam opened 4 months ago
Same isse here, using rust:1.79.0-slim-bookworm as my builder image
Apparently the linker and compiler need to be specified... so says the Internet (and some other issues on this repo, like #1414, #2131).
export CARGO_TARGET_AARCH64_UNKNOWN_LINUX_MUSL_LINKER=aarch64-linux-gnu-gcc &&
export CC=aarch64-linux-gnu-gcc &&
I had the exact same error, and this was the final magic to getting ring
built as a dependency of another project (or sub[, sub ...]dep... I'm not even sure to what, exactly).
Hello,
first of all, sorry if I'll be missing important info here, i'm really unexperienced with linkers, compilers and stuff like that.
I am developing a Rust app that seems to be using ring as one of its sub-dependencies. Until now I built using the official rust docker image and deployed it into a debian-slim-bookworm container, which works just fine for amd_64 and arm64 containers. I however wanted to try to reduce the final image size and thus tried to switch to a musl-based clux/muslrust build image and a final alpine:3.20 deployment container. Everything works just fine with amd_64, but ring seems to fail the build process when building for arm64 (aarch64). Here's the dockerfile:
The project repository with all the necessary files can be found here: https://github.com/Timtam/hitster
I know I do have a different problem within my final stage with being unable to copy the build from the correct path when building for arm64, but the build process already fails before reaching that point with an error like this:
I'm trying to build with good old docker build -t hitster --platform linux/arm64 . I don't know if i'm doing anything wrong or if ring is the issue, but maybe someone is able to help me? Thank you. Please let me know if I can give you any more useful information.