Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

must-ar not executing successfully while building ring #111

Open
szinn opened this issue Oct 24, 2022 · 6 comments
Open

must-ar not executing successfully while building ring #111

szinn opened this issue Oct 24, 2022 · 6 comments

Comments

@szinn
Copy link

szinn commented Oct 24, 2022

Running on Mac M1

Commandline:
docker run -v $PWD:/volume --rm -t clux/muslrust:stable cargo build --release

error: failed to run custom build command for ring v0.16.20

Caused by:
process didn't exit successfully: /volume/target/release/build/ring-c0a105218b2127e9/build-script-build (exit status: 1)

  error occurred: Command "musl-ar" "cq" "/volume/target/x86_64-unknown-linux-musl/release/build/ring-d41bbc5b2d5f8002/out/libring-core.a" "/volume/target/x86_64-unknown-linux-musl/release/build/ring-d41bbc5b2d5f8002/out/aesni-x86_64-elf.o" "/volume/target/x86_64-unknown-linux-musl/release/build/ring-d41bbc5b2d5f8002/out/vpaes-x86_64-elf.o" "/volume/target/x86_64-unknown-linux-musl/release/build/ring-d41bbc5b2d5f8002/out/x86_64-mont-elf.o" "/volume/target/x86_64-unknown-linux-musl/release/build/ring-d41bbc5b2d5f8002/out/x86_64-mont5-elf.o" "/volume/target/x86_64-unknown-linux-musl/release/build/ring-d41bbc5b2d5f8002/out/chacha-x86_64-elf.o" "/volume/target/x86_64-unknown-linux-musl/release/build/ring-d41bbc5b2d5f8002/out/p256-x86_64-asm-elf.o" "/volume/target/x86_64-unknown-linux-musl/release/build/ring-d41bbc5b2d5f8002/out/aesni-gcm-x86_64-elf.o" "/volume/target/x86_64-unknown-linux-musl/release/build/ring-d41bbc5b2d5f8002/out/ghash-x86_64-elf.o" "/volume/target/x86_64-unknown-linux-musl/release/build/ring-d41bbc5b2d5f8002/out/sha512-x86_64-elf.o" "/volume/target/x86_64-unknown-linux-musl/release/build/ring-d41bbc5b2d5f8002/out/chacha20_poly1305_x86_64-elf.o" "/volume/target/x86_64-unknown-linux-musl/release/build/ring-d41bbc5b2d5f8002/out/sha256-x86_64-elf.o" "/volume/target/x86_64-unknown-linux-musl/release/build/ring-d41bbc5b2d5f8002/out/aes_nohw.o" "/volume/target/x86_64-unknown-linux-musl/release/build/ring-d41bbc5b2d5f8002/out/montgomery.o" "/volume/target/x86_64-unknown-linux-musl/release/build/ring-d41bbc5b2d5f8002/out/montgomery_inv.o" "/volume/target/x86_64-unknown-linux-musl/release/build/ring-d41bbc5b2d5f8002/out/limbs.o" "/volume/target/x86_64-unknown-linux-musl/release/build/ring-d41bbc5b2d5f8002/out/mem.o" "/volume/target/x86_64-unknown-linux-musl/release/build/ring-d41bbc5b2d5f8002/out/poly1305.o" "/volume/target/x86_64-unknown-linux-musl/release/build/ring-d41bbc5b2d5f8002/out/crypto.o" "/volume/target/x86_64-unknown-linux-musl/release/build/ring-d41bbc5b2d5f8002/out/curve25519.o" "/volume/target/x86_64-unknown-linux-musl/release/build/ring-d41bbc5b2d5f8002/out/ecp_nistz.o" "/volume/target/x86_64-unknown-linux-musl/release/build/ring-d41bbc5b2d5f8002/out/ecp_nistz256.o" "/volume/target/x86_64-unknown-linux-musl/release/build/ring-d41bbc5b2d5f8002/out/gfp_p256.o" "/volume/target/x86_64-unknown-linux-musl/release/build/ring-d41bbc5b2d5f8002/out/gfp_p384.o" "/volume/target/x86_64-unknown-linux-musl/release/build/ring-d41bbc5b2d5f8002/out/cpu-intel.o" "/volume/target/x86_64-unknown-linux-musl/release/build/ring-d41bbc5b2d5f8002/out/poly1305_vec.o" with args "musl-ar" did not execute successfully (status code exit status: 127).
@szinn
Copy link
Author

szinn commented Oct 24, 2022

It did run on x86 linux box, so could just be an M1 issue with Docker.

@clux
Copy link
Owner

clux commented Oct 28, 2022

Possibly, have not tested much on arm yet.

You could try passing -v to the cargo build in the container and see if something more useful pops out.

@videah
Copy link

videah commented Feb 13, 2023

Getting the same issue, only happens on M1

@bmo-at
Copy link

bmo-at commented Jul 27, 2023

Did anyone find a workaround for this? I have to make builds possible on M1/M2 hardware...

@nwtgck
Copy link

nwtgck commented Feb 10, 2024

workaround

This should be an issue of Docker on Apple Silicon, not this docker image.

I solved the issue by using lima. The lima base image should be x86_64 beucase I had the same issue when using arch: "aarch64" in lima. I installed docker by How To Install and Use Docker on Ubuntu 22.04 | DigitalOcean.

arch: "x86_64"

images:
- location: "https://cloud-images.ubuntu.com/releases/22.04/release-20240126/ubuntu-22.04-server-cloudimg-amd64.img"
  arch: "x86_64"
  digest: "sha256:9f8a0d84b81a1d481aafca2337cb9f0c1fdf697239ac488177cf29c97d706c25"

mounts:
- location: "~"
- location: "/tmp/lima"
  writable: true

https://lima-vm.io/docs/config/multi-arch/

@cbeck88
Copy link
Contributor

cbeck88 commented Feb 24, 2024

My workaround was to swap out and upgrade dependencies so as not to rely on ring. Latest releases of rustls use aws-lc-rc instead of ring by default

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants