ring
ring copied to clipboard
"include/GFp/check.h:27:11: fatal error: 'assert.h' file not found" on M1 apple silicon computers
Hello @briansmith,
I'm trying to cross-compile ring
on an Apple Silicon M1 to deploy an AWS lambda (target is a provided.al2
Amazon linux container that should generate a x86_64-unknown-linux-gnu
), but I'm facing the following issue:
error: failed to run custom build command for `ring v0.16.20`
Caused by:
process didn't exit successfully: `/private/var/folders/s8/0tz3dy0d1sbg1_cv0ylkx_m80000gn/T/tmpukcl2wae/target/release/build/ring-0c3d64667514526d/build-script-build` (exit status: 101)
--- stdout
OPT_LEVEL = Some("3")
TARGET = Some("x86_64-unknown-linux-gnu")
HOST = Some("aarch64-apple-darwin")
CC_x86_64-unknown-linux-gnu = None
CC_x86_64_unknown_linux_gnu = None
TARGET_CC = None
CC = None
CROSS_COMPILE = None
CFLAGS_x86_64-unknown-linux-gnu = None
CFLAGS_x86_64_unknown_linux_gnu = None
TARGET_CFLAGS = None
CFLAGS = None
CRATE_CC_NO_DEFAULTS = None
DEBUG = Some("false")
CARGO_CFG_TARGET_FEATURE = Some("fxsr,sse,sse2")
--- stderr
running "cc" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "-m64" "-I" "include" "-Wall" "-Wextra" "-pedantic" "-pedantic-errors" "-Wall" "-Wextra" "-Wcast-align" "-Wcast-qual" "-Wconversion" "-Wenum-compare" "-Wfloat-equal" "-Wformat=2" "-Winline" "-Winvalid-pch" "-Wmissing-field-initializers" "-Wmissing-include-dirs" "-Wredundant-decls" "-Wshadow" "-Wsign-compare" "-Wsign-conversion" "-Wundef" "-Wuninitialized" "-Wwrite-strings" "-fno-strict-aliasing" "-fvisibility=hidden" "-fstack-protector" "-g3" "-DNDEBUG" "-c" "-o/private/var/folders/s8/0tz3dy0d1sbg1_cv0ylkx_m80000gn/T/tmpukcl2wae/target/x86_64-unknown-linux-gnu/release/build/ring-1b5ef9a99e86a98a/out/aesni-x86_64-elf.o" "/Users/rvalls/.cargo/registry/src/github.com-1ecc6299db9ec823/ring-0.16.20/pregenerated/aesni-x86_64-elf.S"
/Users/rvalls/.cargo/registry/src/github.com-1ecc6299db9ec823/ring-0.16.20/pregenerated/aesni-x86_64-elf.S:1181:19: error: unexpected token in '.section' directive
.section .note.GNU-stack,"",@progbits
^
thread 'main' panicked at 'execution failed', /Users/rvalls/.cargo/registry/src/github.com-1ecc6299db9ec823/ring-0.16.20/build.rs:656:9
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Here's a quick reproducer:
brew tap aws/tap
brew install aws-sam-cli
git clone https://github.com/umccr/s3-rust-noodles-bam && cd s3-rust-noodles-bam
sam build
Usually you must set TARGET_CC and TARGET_AR, or equivalent, when cross-compiling. PTAL at .github/workflows/ci.yml and mk/cargo.sh in this repo to see how.
@brainstorm Did the advice I give you above resolve this for you?
Thanks for the followup @briansmith! It did not resolve it yet because my usecase depends heavily on the SAM cli but I bet I'd work with regular docker containers (without the SAM tool wrapping)... I've been hitting some limitations there as xref'd on this issue above :/
The env vars you mentioned and pointed to in the CI and .mk are all triplets, right? What would you put in CROSS_COMPILE
, btw? A triplet as well or just True
?
There are hoops that have to be jumped through to get a working C toolchain that targets Linux from a Mac host, especially for a -gnu
target. Basically you need to get a x86_64 Linux sysroot and a C compiler and linker targeting that target, and then point TARGET_CC and TARGET_AR to the C compiler (clang
or gcc
, probably) and archiver (the ar
next to that clang
or gcc
). Then it should "just work."
I know that setting up the sysroot is annoying and I'm hoping we can provide better support for this scenerio soon. I hope others that are already doing this can help with hints and/or scripts to help set up the sysroot for now.
@briansmith Thanks for the assistance and patience, I finally managed to sort this out in https://github.com/aws/aws-sam-build-images/pull/26#issuecomment-938311869
Reopening since this is not fully solved. @nmoutschen got one step forward using cross
in https://github.com/aws-samples/serverless-rust-demo/issues/2#issuecomment-949423936:
% CC_aarch64_unknown_linux_gnu=clang cross build --target aarch64-unknown-linux-gnu
(...)
error: failed to run custom build command for `ring v0.16.20`
Caused by:
process didn't exit successfully: `/Users/rvalls/dev/umccr/serverless-rust-demo/target/debug/build/ring-47b2d87b7a3a6ea6/build-script-build` (exit status: 101)
--- stdout
OPT_LEVEL = Some("0")
TARGET = Some("aarch64-unknown-linux-gnu")
HOST = Some("aarch64-apple-darwin")
CC_aarch64-unknown-linux-gnu = None
CC_aarch64_unknown_linux_gnu = Some("clang")
CFLAGS_aarch64-unknown-linux-gnu = None
CFLAGS_aarch64_unknown_linux_gnu = None
TARGET_CFLAGS = None
CFLAGS = None
CRATE_CC_NO_DEFAULTS = None
DEBUG = Some("true")
OPT_LEVEL = Some("0")
TARGET = Some("aarch64-unknown-linux-gnu")
HOST = Some("aarch64-apple-darwin")
CC_aarch64-unknown-linux-gnu = None
CC_aarch64_unknown_linux_gnu = Some("clang")
CFLAGS_aarch64-unknown-linux-gnu = None
CFLAGS_aarch64_unknown_linux_gnu = None
TARGET_CFLAGS = None
CFLAGS = None
CRATE_CC_NO_DEFAULTS = None
DEBUG = Some("true")
OPT_LEVEL = Some("0")
TARGET = Some("aarch64-unknown-linux-gnu")
HOST = Some("aarch64-apple-darwin")
CC_aarch64-unknown-linux-gnu = None
CC_aarch64_unknown_linux_gnu = Some("clang")
CFLAGS_aarch64-unknown-linux-gnu = None
CFLAGS_aarch64_unknown_linux_gnu = None
TARGET_CFLAGS = None
CFLAGS = None
CRATE_CC_NO_DEFAULTS = None
DEBUG = Some("true")
OPT_LEVEL = Some("0")
TARGET = Some("aarch64-unknown-linux-gnu")
HOST = Some("aarch64-apple-darwin")
CC_aarch64-unknown-linux-gnu = None
CC_aarch64_unknown_linux_gnu = Some("clang")
CFLAGS_aarch64-unknown-linux-gnu = None
CFLAGS_aarch64_unknown_linux_gnu = None
TARGET_CFLAGS = None
CFLAGS = None
CRATE_CC_NO_DEFAULTS = None
DEBUG = Some("true")
OPT_LEVEL = Some("0")
TARGET = Some("aarch64-unknown-linux-gnu")
HOST = Some("aarch64-apple-darwin")
CC_aarch64-unknown-linux-gnu = None
CC_aarch64_unknown_linux_gnu = Some("clang")
CFLAGS_aarch64-unknown-linux-gnu = None
CFLAGS_aarch64_unknown_linux_gnu = None
TARGET_CFLAGS = None
CFLAGS = None
CRATE_CC_NO_DEFAULTS = None
DEBUG = Some("true")
OPT_LEVEL = Some("0")
TARGET = Some("aarch64-unknown-linux-gnu")
HOST = Some("aarch64-apple-darwin")
CC_aarch64-unknown-linux-gnu = None
CC_aarch64_unknown_linux_gnu = Some("clang")
CFLAGS_aarch64-unknown-linux-gnu = None
CFLAGS_aarch64_unknown_linux_gnu = None
TARGET_CFLAGS = None
CFLAGS = None
CRATE_CC_NO_DEFAULTS = None
DEBUG = Some("true")
OPT_LEVEL = Some("0")
TARGET = Some("aarch64-unknown-linux-gnu")
HOST = Some("aarch64-apple-darwin")
CC_aarch64-unknown-linux-gnu = None
CC_aarch64_unknown_linux_gnu = Some("clang")
CFLAGS_aarch64-unknown-linux-gnu = None
CFLAGS_aarch64_unknown_linux_gnu = None
TARGET_CFLAGS = None
CFLAGS = None
CRATE_CC_NO_DEFAULTS = None
DEBUG = Some("true")
OPT_LEVEL = Some("0")
TARGET = Some("aarch64-unknown-linux-gnu")
HOST = Some("aarch64-apple-darwin")
CC_aarch64-unknown-linux-gnu = None
CC_aarch64_unknown_linux_gnu = Some("clang")
CFLAGS_aarch64-unknown-linux-gnu = None
CFLAGS_aarch64_unknown_linux_gnu = None
TARGET_CFLAGS = None
CFLAGS = None
CRATE_CC_NO_DEFAULTS = None
DEBUG = Some("true")
OPT_LEVEL = Some("0")
TARGET = Some("aarch64-unknown-linux-gnu")
HOST = Some("aarch64-apple-darwin")
CC_aarch64-unknown-linux-gnu = None
CC_aarch64_unknown_linux_gnu = Some("clang")
CFLAGS_aarch64-unknown-linux-gnu = None
CFLAGS_aarch64_unknown_linux_gnu = None
TARGET_CFLAGS = None
CFLAGS = None
CRATE_CC_NO_DEFAULTS = None
DEBUG = Some("true")
OPT_LEVEL = Some("0")
TARGET = Some("aarch64-unknown-linux-gnu")
HOST = Some("aarch64-apple-darwin")
CC_aarch64-unknown-linux-gnu = None
CC_aarch64_unknown_linux_gnu = Some("clang")
CFLAGS_aarch64-unknown-linux-gnu = None
CFLAGS_aarch64_unknown_linux_gnu = None
TARGET_CFLAGS = None
CFLAGS = None
CRATE_CC_NO_DEFAULTS = None
DEBUG = Some("true")
--- stderr
running "clang" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-g" "-fno-omit-frame-pointer" "--target=aarch64-unknown-linux-gnu" "-I" "include" "-Wall" "-Wextra" "-pedantic" "-pedantic-errors" "-Wall" "-Wextra" "-Wcast-align" "-Wcast-qual" "-Wconversion" "-Wenum-compare" "-Wfloat-equal" "-Wformat=2" "-Winline" "-Winvalid-pch" "-Wmissing-field-initializers" "-Wmissing-include-dirs" "-Wredundant-decls" "-Wshadow" "-Wsign-compare" "-Wsign-conversion" "-Wundef" "-Wuninitialized" "-Wwrite-strings" "-fno-strict-aliasing" "-fvisibility=hidden" "-fstack-protector" "-g3" "-DNDEBUG" "-c" "-o/Users/rvalls/dev/umccr/serverless-rust-demo/target/aarch64-unknown-linux-gnu/debug/build/ring-534ec964f23c4fa0/out/aesv8-armx-linux64.o" "/Users/rvalls/.cargo/registry/src/github.com-1ecc6299db9ec823/ring-0.16.20/pregenerated/aesv8-armx-linux64.S"
running "clang" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-g" "-fno-omit-frame-pointer" "--target=aarch64-unknown-linux-gnu" "-I" "include" "-Wall" "-Wextra" "-pedantic" "-pedantic-errors" "-Wall" "-Wextra" "-Wcast-align" "-Wcast-qual" "-Wconversion" "-Wenum-compare" "-Wfloat-equal" "-Wformat=2" "-Winline" "-Winvalid-pch" "-Wmissing-field-initializers" "-Wmissing-include-dirs" "-Wredundant-decls" "-Wshadow" "-Wsign-compare" "-Wsign-conversion" "-Wundef" "-Wuninitialized" "-Wwrite-strings" "-fno-strict-aliasing" "-fvisibility=hidden" "-fstack-protector" "-g3" "-DNDEBUG" "-c" "-o/Users/rvalls/dev/umccr/serverless-rust-demo/target/aarch64-unknown-linux-gnu/debug/build/ring-534ec964f23c4fa0/out/ghashv8-armx-linux64.o" "/Users/rvalls/.cargo/registry/src/github.com-1ecc6299db9ec823/ring-0.16.20/pregenerated/ghashv8-armx-linux64.S"
running "clang" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-g" "-fno-omit-frame-pointer" "--target=aarch64-unknown-linux-gnu" "-I" "include" "-Wall" "-Wextra" "-pedantic" "-pedantic-errors" "-Wall" "-Wextra" "-Wcast-align" "-Wcast-qual" "-Wconversion" "-Wenum-compare" "-Wfloat-equal" "-Wformat=2" "-Winline" "-Winvalid-pch" "-Wmissing-field-initializers" "-Wmissing-include-dirs" "-Wredundant-decls" "-Wshadow" "-Wsign-compare" "-Wsign-conversion" "-Wundef" "-Wuninitialized" "-Wwrite-strings" "-fno-strict-aliasing" "-fvisibility=hidden" "-fstack-protector" "-g3" "-DNDEBUG" "-c" "-o/Users/rvalls/dev/umccr/serverless-rust-demo/target/aarch64-unknown-linux-gnu/debug/build/ring-534ec964f23c4fa0/out/vpaes-armv8-linux64.o" "/Users/rvalls/.cargo/registry/src/github.com-1ecc6299db9ec823/ring-0.16.20/pregenerated/vpaes-armv8-linux64.S"
running "clang" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-g" "-fno-omit-frame-pointer" "--target=aarch64-unknown-linux-gnu" "-I" "include" "-Wall" "-Wextra" "-pedantic" "-pedantic-errors" "-Wall" "-Wextra" "-Wcast-align" "-Wcast-qual" "-Wconversion" "-Wenum-compare" "-Wfloat-equal" "-Wformat=2" "-Winline" "-Winvalid-pch" "-Wmissing-field-initializers" "-Wmissing-include-dirs" "-Wredundant-decls" "-Wshadow" "-Wsign-compare" "-Wsign-conversion" "-Wundef" "-Wuninitialized" "-Wwrite-strings" "-fno-strict-aliasing" "-fvisibility=hidden" "-fstack-protector" "-g3" "-DNDEBUG" "-c" "-o/Users/rvalls/dev/umccr/serverless-rust-demo/target/aarch64-unknown-linux-gnu/debug/build/ring-534ec964f23c4fa0/out/armv8-mont-linux64.o" "/Users/rvalls/.cargo/registry/src/github.com-1ecc6299db9ec823/ring-0.16.20/pregenerated/armv8-mont-linux64.S"
running "clang" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-g" "-fno-omit-frame-pointer" "--target=aarch64-unknown-linux-gnu" "-I" "include" "-Wall" "-Wextra" "-pedantic" "-pedantic-errors" "-Wall" "-Wextra" "-Wcast-align" "-Wcast-qual" "-Wconversion" "-Wenum-compare" "-Wfloat-equal" "-Wformat=2" "-Winline" "-Winvalid-pch" "-Wmissing-field-initializers" "-Wmissing-include-dirs" "-Wredundant-decls" "-Wshadow" "-Wsign-compare" "-Wsign-conversion" "-Wundef" "-Wuninitialized" "-Wwrite-strings" "-fno-strict-aliasing" "-fvisibility=hidden" "-fstack-protector" "-g3" "-DNDEBUG" "-c" "-o/Users/rvalls/dev/umccr/serverless-rust-demo/target/aarch64-unknown-linux-gnu/debug/build/ring-534ec964f23c4fa0/out/chacha-armv8-linux64.o" "/Users/rvalls/.cargo/registry/src/github.com-1ecc6299db9ec823/ring-0.16.20/pregenerated/chacha-armv8-linux64.S"
running "clang" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-g" "-fno-omit-frame-pointer" "--target=aarch64-unknown-linux-gnu" "-I" "include" "-Wall" "-Wextra" "-pedantic" "-pedantic-errors" "-Wall" "-Wextra" "-Wcast-align" "-Wcast-qual" "-Wconversion" "-Wenum-compare" "-Wfloat-equal" "-Wformat=2" "-Winline" "-Winvalid-pch" "-Wmissing-field-initializers" "-Wmissing-include-dirs" "-Wredundant-decls" "-Wshadow" "-Wsign-compare" "-Wsign-conversion" "-Wundef" "-Wuninitialized" "-Wwrite-strings" "-fno-strict-aliasing" "-fvisibility=hidden" "-fstack-protector" "-g3" "-DNDEBUG" "-c" "-o/Users/rvalls/dev/umccr/serverless-rust-demo/target/aarch64-unknown-linux-gnu/debug/build/ring-534ec964f23c4fa0/out/ecp_nistz256-armv8-linux64.o" "/Users/rvalls/.cargo/registry/src/github.com-1ecc6299db9ec823/ring-0.16.20/pregenerated/ecp_nistz256-armv8-linux64.S"
running "clang" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-g" "-fno-omit-frame-pointer" "--target=aarch64-unknown-linux-gnu" "-I" "include" "-Wall" "-Wextra" "-pedantic" "-pedantic-errors" "-Wall" "-Wextra" "-Wcast-align" "-Wcast-qual" "-Wconversion" "-Wenum-compare" "-Wfloat-equal" "-Wformat=2" "-Winline" "-Winvalid-pch" "-Wmissing-field-initializers" "-Wmissing-include-dirs" "-Wredundant-decls" "-Wshadow" "-Wsign-compare" "-Wsign-conversion" "-Wundef" "-Wuninitialized" "-Wwrite-strings" "-fno-strict-aliasing" "-fvisibility=hidden" "-fstack-protector" "-g3" "-DNDEBUG" "-c" "-o/Users/rvalls/dev/umccr/serverless-rust-demo/target/aarch64-unknown-linux-gnu/debug/build/ring-534ec964f23c4fa0/out/ghash-neon-armv8-linux64.o" "/Users/rvalls/.cargo/registry/src/github.com-1ecc6299db9ec823/ring-0.16.20/pregenerated/ghash-neon-armv8-linux64.S"
running "clang" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-g" "-fno-omit-frame-pointer" "--target=aarch64-unknown-linux-gnu" "-I" "include" "-Wall" "-Wextra" "-pedantic" "-pedantic-errors" "-Wall" "-Wextra" "-Wcast-align" "-Wcast-qual" "-Wconversion" "-Wenum-compare" "-Wfloat-equal" "-Wformat=2" "-Winline" "-Winvalid-pch" "-Wmissing-field-initializers" "-Wmissing-include-dirs" "-Wredundant-decls" "-Wshadow" "-Wsign-compare" "-Wsign-conversion" "-Wundef" "-Wuninitialized" "-Wwrite-strings" "-fno-strict-aliasing" "-fvisibility=hidden" "-fstack-protector" "-g3" "-DNDEBUG" "-c" "-o/Users/rvalls/dev/umccr/serverless-rust-demo/target/aarch64-unknown-linux-gnu/debug/build/ring-534ec964f23c4fa0/out/sha512-armv8-linux64.o" "/Users/rvalls/.cargo/registry/src/github.com-1ecc6299db9ec823/ring-0.16.20/pregenerated/sha512-armv8-linux64.S"
running "clang" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-g" "-fno-omit-frame-pointer" "--target=aarch64-unknown-linux-gnu" "-I" "include" "-Wall" "-Wextra" "-pedantic" "-pedantic-errors" "-Wall" "-Wextra" "-Wcast-align" "-Wcast-qual" "-Wconversion" "-Wenum-compare" "-Wfloat-equal" "-Wformat=2" "-Winline" "-Winvalid-pch" "-Wmissing-field-initializers" "-Wmissing-include-dirs" "-Wredundant-decls" "-Wshadow" "-Wsign-compare" "-Wsign-conversion" "-Wundef" "-Wuninitialized" "-Wwrite-strings" "-fno-strict-aliasing" "-fvisibility=hidden" "-fstack-protector" "-g3" "-DNDEBUG" "-c" "-o/Users/rvalls/dev/umccr/serverless-rust-demo/target/aarch64-unknown-linux-gnu/debug/build/ring-534ec964f23c4fa0/out/sha256-armv8-linux64.o" "/Users/rvalls/.cargo/registry/src/github.com-1ecc6299db9ec823/ring-0.16.20/pregenerated/sha256-armv8-linux64.S"
running "clang" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-g" "-fno-omit-frame-pointer" "--target=aarch64-unknown-linux-gnu" "-I" "include" "-Wall" "-Wextra" "-std=c1x" "-Wbad-function-cast" "-Wnested-externs" "-Wstrict-prototypes" "-pedantic" "-pedantic-errors" "-Wall" "-Wextra" "-Wcast-align" "-Wcast-qual" "-Wconversion" "-Wenum-compare" "-Wfloat-equal" "-Wformat=2" "-Winline" "-Winvalid-pch" "-Wmissing-field-initializers" "-Wmissing-include-dirs" "-Wredundant-decls" "-Wshadow" "-Wsign-compare" "-Wsign-conversion" "-Wundef" "-Wuninitialized" "-Wwrite-strings" "-fno-strict-aliasing" "-fvisibility=hidden" "-fstack-protector" "-g3" "-DNDEBUG" "-c" "-o/Users/rvalls/dev/umccr/serverless-rust-demo/target/aarch64-unknown-linux-gnu/debug/build/ring-534ec964f23c4fa0/out/aes_nohw.o" "crypto/fipsmodule/aes/aes_nohw.c"
In file included from crypto/fipsmodule/aes/aes_nohw.c:17:
In file included from crypto/fipsmodule/aes/../../internal.h:114:
include/GFp/check.h:27:11: fatal error: 'assert.h' file not found
# include <assert.h>
^~~~~~~~~~
1 error generated.
thread 'main' panicked at 'execution failed', /Users/rvalls/.cargo/registry/src/github.com-1ecc6299db9ec823/ring-0.16.20/build.rs:656:9
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...
error: build failed
@briansmith Do you have any further suggestions on what might be going wrong here?
It's interesting that Graviton2 ARMs work fine but not Apple Silicon M1s... as mentioned before though, ideally ring
should be "cross-compilable" without docker containers being involved.
Similar issue noted on https://github.com/briansmith/ring/issues/1374, this issue tracks non-MUSL cross-compiling of ring
though.
Sans cross
, with just cargo
, there seems to be the same symptom (/cc @nmoutschen), which can make debugging potentially easier...
% RUSTFLAGS='-C target-cpu=apple-a14' CC_aarch64_unknown_linux_gnu=clang cargo build --target aarch64-unknown-linux-gnu
Compiling regex-automata v0.1.10
Compiling http-body v0.4.3
Compiling ring v0.16.20
Compiling num-traits v0.2.14
Compiling unicode-normalization v0.1.19
Compiling jemalloc-sys v0.3.2
Compiling signal-hook-registry v1.4.0
Compiling num_cpus v1.13.0
error: failed to run custom build command for `ring v0.16.20`
Caused by:
process didn't exit successfully: `/Users/rvalls/dev/umccr/s3-rust-noodles-bam/target/debug/build/ring-47b2d87b7a3a6ea6/build-script-build` (exit status: 101)
--- stdout
OPT_LEVEL = Some("0")
TARGET = Some("aarch64-unknown-linux-gnu")
HOST = Some("aarch64-apple-darwin")
CC_aarch64-unknown-linux-gnu = None
CC_aarch64_unknown_linux_gnu = Some("clang")
CFLAGS_aarch64-unknown-linux-gnu = None
CFLAGS_aarch64_unknown_linux_gnu = None
TARGET_CFLAGS = None
CFLAGS = None
CRATE_CC_NO_DEFAULTS = None
DEBUG = Some("true")
--- stderr
running "clang" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-g" "-fno-omit-frame-pointer" "--target=aarch64-unknown-linux-gnu" "-I" "include" "-Wall" "-Wextra" "-std=c1x" "-Wbad-function-cast" "-Wnested-externs" "-Wstrict-prototypes" "-pedantic" "-pedantic-errors" "-Wall" "-Wextra" "-Wcast-align" "-Wcast-qual" "-Wconversion" "-Wenum-compare" "-Wfloat-equal" "-Wformat=2" "-Winline" "-Winvalid-pch" "-Wmissing-field-initializers" "-Wmissing-include-dirs" "-Wredundant-decls" "-Wshadow" "-Wsign-compare" "-Wsign-conversion" "-Wundef" "-Wuninitialized" "-Wwrite-strings" "-fno-strict-aliasing" "-fvisibility=hidden" "-fstack-protector" "-g3" "-DNDEBUG" "-c" "-o/Users/rvalls/dev/umccr/s3-rust-noodles-bam/target/aarch64-unknown-linux-gnu/debug/build/ring-534ec964f23c4fa0/out/aes_nohw.o" "crypto/fipsmodule/aes/aes_nohw.c"
In file included from crypto/fipsmodule/aes/aes_nohw.c:17:
In file included from crypto/fipsmodule/aes/../../internal.h:114:
include/GFp/check.h:27:11: fatal error: 'assert.h' file not found
# include <assert.h>
^~~~~~~~~~
1 error generated.
thread 'main' panicked at 'execution failed', /Users/rvalls/.cargo/registry/src/github.com-1ecc6299db9ec823/ring-0.16.20/build.rs:656:9
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Now, digging into this specific error, there's "-I" "include"
listed in the output, so it should find ring
's include
dir, which suggests that the arch and/or AsmTarget
is not being detected properly... then looking into build.rs:656:9
and its backtrace:
# include <assert.h>
^~~~~~~~~~
1 error generated.
thread 'main' panicked at 'execution failed', /Users/rvalls/.cargo/registry/src/github.com-1ecc6299db9ec823/ring-0.16.20/build.rs:656:9
stack backtrace:
0: std::panicking::begin_panic
at /rustc/c8dfcfe046a7680554bf4eb612bad840e7631c4b/library/std/src/panicking.rs:541:12
1: build_script_build::run_command
at ./build.rs:656:9
2: build_script_build::compile
at ./build.rs:512:13
3: build_script_build::build_library::{{closure}}
at ./build.rs:447:18
4: core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &mut F>::call_once
at /rustc/c8dfcfe046a7680554bf4eb612bad840e7631c4b/library/core/src/ops/function.rs:280:13
5: core::option::Option<T>::map
at /rustc/c8dfcfe046a7680554bf4eb612bad840e7631c4b/library/core/src/option.rs:823:29
6: <core::iter::adapters::map::Map<I,F> as core::iter::traits::iterator::Iterator>::next
at /rustc/c8dfcfe046a7680554bf4eb612bad840e7631c4b/library/core/src/iter/adapters/map.rs:101:9
7: alloc::vec::Vec<T,A>::extend_desugared
at /rustc/c8dfcfe046a7680554bf4eb612bad840e7631c4b/library/alloc/src/vec/mod.rs:2550:35
8: <alloc::vec::Vec<T,A> as alloc::vec::spec_extend::SpecExtend<T,I>>::spec_extend
at /rustc/c8dfcfe046a7680554bf4eb612bad840e7631c4b/library/alloc/src/vec/spec_extend.rs:18:9
9: <alloc::vec::Vec<T> as alloc::vec::spec_from_iter_nested::SpecFromIterNested<T,I>>::from_iter
at /rustc/c8dfcfe046a7680554bf4eb612bad840e7631c4b/library/alloc/src/vec/spec_from_iter_nested.rs:37:9
10: <alloc::vec::Vec<T> as alloc::vec::spec_from_iter::SpecFromIter<T,I>>::from_iter
at /rustc/c8dfcfe046a7680554bf4eb612bad840e7631c4b/library/alloc/src/vec/spec_from_iter.rs:33:9
11: <alloc::vec::Vec<T> as core::iter::traits::collect::FromIterator<T>>::from_iter
at /rustc/c8dfcfe046a7680554bf4eb612bad840e7631c4b/library/alloc/src/vec/mod.rs:2453:9
12: core::iter::traits::iterator::Iterator::collect
at /rustc/c8dfcfe046a7680554bf4eb612bad840e7631c4b/library/core/src/iter/traits/iterator.rs:1749:9
13: build_script_build::build_library
at ./build.rs:443:16
14: build_script_build::build_c_code::{{closure}}
at ./build.rs:416:9
15: <core::slice::iter::Iter<T> as core::iter::traits::iterator::Iterator>::for_each
at /rustc/c8dfcfe046a7680554bf4eb612bad840e7631c4b/library/core/src/slice/iter/macros.rs:203:21
16: build_script_build::build_c_code
at ./build.rs:415:5
17: build_script_build::ring_build_rs_main
at ./build.rs:279:5
18: build_script_build::main
at ./build.rs:240:13
19: core::ops::function::FnOnce::call_once
at /rustc/c8dfcfe046a7680554bf4eb612bad840e7631c4b/library/core/src/ops/function.rs:227:5
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
warning: build failed, waiting for other jobs to finish...
error: build failed
After following its logic, I suspect that the mapping of M1 to its underlying ASM (pregenerator?) is not defined yet (and so it defaults to aes_nohw.c
)?:
% ls ../ring/crypto/fipsmodule/aes/asm
aesni-x86.pl aesni-x86_64.pl aesv8-armx.pl bsaes-armv7.pl vpaes-armv7.pl vpaes-armv8.pl vpaes-x86.pl vpaes-x86_64.pl
I'll check through the issues/PRs if somebody started work defining this mapping...
Scratch the previous observations, passing the ("right"?) TARGET_CFLAGS
so that ring
can find the system's assert.h
:
RUST_BACKTRACE=1 RUSTFLAGS='-C target-cpu=neoverse-n1' TARGET_CFLAGS="-I /Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk/usr/include" CC_aarch64_unknown_linux_gnu=clang cargo build --target aarch64-unknown-linux-gnu
We run into a long chain of architecture not supported
error messages (for the neoverse-n1
, which is Graviton2)... which suggests that Apple's LLVM might not support them but other LLVM builds could?:
In file included from crypto/fipsmodule/aes/aes_nohw.c:15:
In file included from include/ring-core/aes.h:52:
In file included from include/ring-core/base.h:67:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk/usr/include/stddef.h:64:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk/usr/include/_types.h:27:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk/usr/include/sys/_types.h:32:
/Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk/usr/include/sys/cdefs.h:828:2: error: Unsupported architecture
#error Unsupported architecture
^
In file included from crypto/fipsmodule/aes/aes_nohw.c:15:
In file included from include/ring-core/aes.h:52:
In file included from include/ring-core/base.h:67:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk/usr/include/stddef.h:64:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk/usr/include/_types.h:27:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk/usr/include/sys/_types.h:33:
/Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk/usr/include/machine/_types.h:36:2: error: architecture not supported
#error architecture not supported
^
In file included from crypto/fipsmodule/aes/aes_nohw.c:15:
In file included from include/ring-core/aes.h:52:
In file included from include/ring-core/base.h:67:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk/usr/include/stddef.h:64:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk/usr/include/_types.h:27:
/Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk/usr/include/sys/_types.h:55:9: error: unknown type name '__int64_t'
typedef __int64_t __darwin_blkcnt_t; /* total blocks */
^
/Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk/usr/include/sys/_types.h:56:9: error: unknown type name '__int32_t'; did you mean '__int128_t'?
typedef __int32_t __darwin_blksize_t; /* preferred block size */
^~~~~~~~~
__int128_t
note: '__int128_t' declared here
/Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk/usr/include/sys/_types.h:57:9: error: unknown type name '__int32_t'; did you mean '__int128_t'?
typedef __int32_t __darwin_dev_t; /* dev_t */
^~~~~~~~~
__int128_t
note: '__int128_t' declared here
/Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk/usr/include/sys/_types.h:60:9: error: unknown type name '__uint32_t'; did you mean '__uint128_t'?
typedef __uint32_t __darwin_gid_t; /* [???] process and group IDs */
^~~~~~~~~~
__uint128_t
note: '__uint128_t' declared here
/Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk/usr/include/sys/_types.h:61:9: error: unknown type name '__uint32_t'; did you mean '__uint128_t'?
typedef __uint32_t __darwin_id_t; /* [XSI] pid_t, uid_t, or gid_t*/
^~~~~~~~~~
__uint128_t
note: '__uint128_t' declared here
/Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk/usr/include/sys/_types.h:62:9: error: unknown type name '__uint64_t'
typedef __uint64_t __darwin_ino64_t; /* [???] Used for 64 bit inodes */
^
/Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk/usr/include/sys/_types.h:68:9: error: unknown type name '__darwin_natural_t'
typedef __darwin_natural_t __darwin_mach_port_name_t; /* Used by mach */
^
/Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk/usr/include/sys/_types.h:70:9: error: unknown type name '__uint16_t'; did you mean '__uint128_t'?
typedef __uint16_t __darwin_mode_t; /* [???] Some file attributes */
^~~~~~~~~~
__uint128_t
note: '__uint128_t' declared here
/Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk/usr/include/sys/_types.h:71:9: error: unknown type name '__int64_t'
typedef __int64_t __darwin_off_t; /* [???] Used for file sizes */
^
/Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk/usr/include/sys/_types.h:72:9: error: unknown type name '__int32_t'; did you mean '__int128_t'?
typedef __int32_t __darwin_pid_t; /* [???] process and group IDs */
^~~~~~~~~
__int128_t
note: '__int128_t' declared here
/Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk/usr/include/sys/_types.h:73:9: error: unknown type name '__uint32_t'; did you mean '__uint128_t'?
typedef __uint32_t __darwin_sigset_t; /* [???] signal set */
^~~~~~~~~~
__uint128_t
note: '__uint128_t' declared here
/Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk/usr/include/sys/_types.h:74:9: error: unknown type name '__int32_t'; did you mean '__int128_t'?
typedef __int32_t __darwin_suseconds_t; /* [???] microseconds */
^~~~~~~~~
__int128_t
note: '__int128_t' declared here
/Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk/usr/include/sys/_types.h:75:9: error: unknown type name '__uint32_t'; did you mean '__uint128_t'?
typedef __uint32_t __darwin_uid_t; /* [???] user IDs */
^~~~~~~~~~
__uint128_t
note: '__uint128_t' declared here
/Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk/usr/include/sys/_types.h:76:9: error: unknown type name '__uint32_t'; did you mean '__uint128_t'?
typedef __uint32_t __darwin_useconds_t; /* [???] microseconds */
^~~~~~~~~~
__uint128_t
note: '__uint128_t' declared here
In file included from crypto/fipsmodule/aes/aes_nohw.c:15:
In file included from include/ring-core/aes.h:52:
In file included from include/ring-core/base.h:67:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk/usr/include/stddef.h:64:
/Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk/usr/include/_types.h:43:9: error: unknown type name '__uint32_t'; did you mean '__uint128_t'?
typedef __uint32_t __darwin_wctype_t;
^~~~~~~~~~
__uint128_t
note: '__uint128_t' declared here
In file included from crypto/fipsmodule/aes/aes_nohw.c:15:
In file included from include/ring-core/aes.h:52:
In file included from include/ring-core/base.h:67:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk/usr/include/stddef.h:69:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk/usr/include/sys/_types/_ptrdiff_t.h:31:
/Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk/usr/include/machine/types.h:39:2: error: architecture not supported
#error architecture not supported
^
In file included from crypto/fipsmodule/aes/aes_nohw.c:15:
In file included from include/ring-core/aes.h:52:
In file included from include/ring-core/base.h:67:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk/usr/include/stddef.h:69:
/Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk/usr/include/sys/_types/_ptrdiff_t.h:32:9: error: unknown type name '__darwin_ptrdiff_t'
typedef __darwin_ptrdiff_t ptrdiff_t;
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
thread 'main' panicked at 'execution failed', build.rs:707:9
stack backtrace:
0: std::panicking::begin_panic
at /rustc/c8dfcfe046a7680554bf4eb612bad840e7631c4b/library/std/src/panicking.rs:541:12
1: build_script_build::run_command
at ./build.rs:707:9
2: build_script_build::compile
at ./build.rs:556:9
3: build_script_build::build_library::{{closure}}
at ./build.rs:505:18
4: core::iter::adapters::map::map_fold::{{closure}}
at /rustc/c8dfcfe046a7680554bf4eb612bad840e7631c4b/library/core/src/iter/adapters/map.rs:82:28
5: core::iter::traits::iterator::Iterator::fold
at /rustc/c8dfcfe046a7680554bf4eb612bad840e7631c4b/library/core/src/iter/traits/iterator.rs:2174:21
6: <core::iter::adapters::chain::Chain<A,B> as core::iter::traits::iterator::Iterator>::fold
at /rustc/c8dfcfe046a7680554bf4eb612bad840e7631c4b/library/core/src/iter/adapters/chain.rs:122:19
7: <core::iter::adapters::map::Map<I,F> as core::iter::traits::iterator::Iterator>::fold
at /rustc/c8dfcfe046a7680554bf4eb612bad840e7631c4b/library/core/src/iter/adapters/map.rs:122:9
8: core::iter::traits::iterator::Iterator::for_each
at /rustc/c8dfcfe046a7680554bf4eb612bad840e7631c4b/library/core/src/iter/traits/iterator.rs:737:9
9: <alloc::vec::Vec<T,A> as alloc::vec::spec_extend::SpecExtend<T,I>>::spec_extend
at /rustc/c8dfcfe046a7680554bf4eb612bad840e7631c4b/library/alloc/src/vec/spec_extend.rs:40:17
10: <alloc::vec::Vec<T> as alloc::vec::spec_from_iter_nested::SpecFromIterNested<T,I>>::from_iter
at /rustc/c8dfcfe046a7680554bf4eb612bad840e7631c4b/library/alloc/src/vec/spec_from_iter_nested.rs:56:9
11: <alloc::vec::Vec<T> as alloc::vec::spec_from_iter::SpecFromIter<T,I>>::from_iter
at /rustc/c8dfcfe046a7680554bf4eb612bad840e7631c4b/library/alloc/src/vec/spec_from_iter.rs:33:9
12: <alloc::vec::Vec<T> as core::iter::traits::collect::FromIterator<T>>::from_iter
at /rustc/c8dfcfe046a7680554bf4eb612bad840e7631c4b/library/alloc/src/vec/mod.rs:2453:9
13: core::iter::traits::iterator::Iterator::collect
at /rustc/c8dfcfe046a7680554bf4eb612bad840e7631c4b/library/core/src/iter/traits/iterator.rs:1749:9
14: build_script_build::build_library
at ./build.rs:502:16
15: build_script_build::build_c_code::{{closure}}
at ./build.rs:485:13
16: <core::slice::iter::Iter<T> as core::iter::traits::iterator::Iterator>::for_each
at /rustc/c8dfcfe046a7680554bf4eb612bad840e7631c4b/library/core/src/slice/iter/macros.rs:203:21
17: build_script_build::build_c_code
at ./build.rs:482:5
18: build_script_build::ring_build_rs_main
at ./build.rs:350:5
19: build_script_build::main
at ./build.rs:300:48
20: core::ops::function::FnOnce::call_once
at /rustc/c8dfcfe046a7680554bf4eb612bad840e7631c4b/library/core/src/ops/function.rs:227:5
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
And then running with the latest stable Rust 1.56 without setting CC_aarch64_unknown_linux_gnu=clang
(defaulting to GCC?):
% RUSTFLAGS='-C target-cpu=neoverse-n1' cargo build --release --target aarch64-unknown-linux-gnu
Compiling libc v0.2.105
Compiling cc v1.0.71
Compiling untrusted v0.9.0
Compiling spin v0.9.2
Compiling once_cell v1.8.0
Compiling ring v0.17.0-not-released-yet (/Users/rvalls/dev/umccr/ring)
error: failed to run custom build command for `ring v0.17.0-not-released-yet (/Users/rvalls/dev/umccr/ring)`
Caused by:
process didn't exit successfully: `/Users/rvalls/dev/umccr/ring/target/release/build/ring-d83f6c96138416e2/build-script-build` (exit status: 101)
--- stdout
cargo:rerun-if-env-changed=RING_PREGENERATE_ASM
cargo:rustc-env=RING_CORE_PREFIX=ring_core_0_17_0_not_released_yet_
cargo:rerun-if-env-changed=PERL_EXECUTABLE
cargo:rerun-if-env-changed=PERL_EXECUTABLE
cargo:rerun-if-env-changed=PERL_EXECUTABLE
cargo:rerun-if-env-changed=PERL_EXECUTABLE
cargo:rerun-if-env-changed=PERL_EXECUTABLE
cargo:rerun-if-env-changed=PERL_EXECUTABLE
cargo:rerun-if-env-changed=PERL_EXECUTABLE
cargo:rerun-if-env-changed=PERL_EXECUTABLE
OPT_LEVEL = Some("3")
TARGET = Some("aarch64-unknown-linux-gnu")
HOST = Some("aarch64-apple-darwin")
CC_aarch64-unknown-linux-gnu = None
CC_aarch64_unknown_linux_gnu = None
TARGET_CC = None
CC = None
CROSS_COMPILE = None
CFLAGS_aarch64-unknown-linux-gnu = None
CFLAGS_aarch64_unknown_linux_gnu = None
TARGET_CFLAGS = None
CFLAGS = None
CRATE_CC_NO_DEFAULTS = None
DEBUG = Some("false")
CARGO_CFG_TARGET_FEATURE = None
--- stderr
running "perl" "crypto/fipsmodule/aes/asm/aesv8-armx.pl" "linux64" "/Users/rvalls/dev/umccr/ring/target/aarch64-unknown-linux-gnu/release/build/ring-7f1435bdf59d9724/out/aesv8-armx-linux64.S"
running "perl" "crypto/fipsmodule/modes/asm/ghashv8-armx.pl" "linux64" "/Users/rvalls/dev/umccr/ring/target/aarch64-unknown-linux-gnu/release/build/ring-7f1435bdf59d9724/out/ghashv8-armx-linux64.S"
running "perl" "crypto/fipsmodule/aes/asm/vpaes-armv8.pl" "linux64" "/Users/rvalls/dev/umccr/ring/target/aarch64-unknown-linux-gnu/release/build/ring-7f1435bdf59d9724/out/vpaes-armv8-linux64.S"
running "perl" "crypto/fipsmodule/bn/asm/armv8-mont.pl" "linux64" "/Users/rvalls/dev/umccr/ring/target/aarch64-unknown-linux-gnu/release/build/ring-7f1435bdf59d9724/out/armv8-mont-linux64.S"
running "perl" "crypto/chacha/asm/chacha-armv8.pl" "linux64" "/Users/rvalls/dev/umccr/ring/target/aarch64-unknown-linux-gnu/release/build/ring-7f1435bdf59d9724/out/chacha-armv8-linux64.S"
running "perl" "crypto/fipsmodule/modes/asm/ghash-neon-armv8.pl" "linux64" "/Users/rvalls/dev/umccr/ring/target/aarch64-unknown-linux-gnu/release/build/ring-7f1435bdf59d9724/out/ghash-neon-armv8-linux64.S"
running "perl" "crypto/fipsmodule/sha/asm/sha512-armv8.pl" "linux64" "/Users/rvalls/dev/umccr/ring/target/aarch64-unknown-linux-gnu/release/build/ring-7f1435bdf59d9724/out/sha512-armv8-linux64.S"
running "perl" "crypto/fipsmodule/sha/asm/sha512-armv8.pl" "linux64" "/Users/rvalls/dev/umccr/ring/target/aarch64-unknown-linux-gnu/release/build/ring-7f1435bdf59d9724/out/sha256-armv8-linux64.S"
running "aarch64-linux-gnu-gcc" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "-I" "include" "-I" "/Users/rvalls/dev/umccr/ring/target/aarch64-unknown-linux-gnu/release/build/ring-7f1435bdf59d9724/out" "-Wall" "-Wextra" "-pedantic" "-pedantic-errors" "-Wall" "-Wextra" "-Wcast-align" "-Wcast-qual" "-Wconversion" "-Wenum-compare" "-Wfloat-equal" "-Wformat=2" "-Winline" "-Winvalid-pch" "-Wmissing-field-initializers" "-Wmissing-include-dirs" "-Wredundant-decls" "-Wshadow" "-Wsign-compare" "-Wsign-conversion" "-Wundef" "-Wuninitialized" "-Wwrite-strings" "-fno-strict-aliasing" "-fvisibility=hidden" "-fstack-protector" "-g3" "-DNDEBUG" "-Werror" "-c" "-o/Users/rvalls/dev/umccr/ring/target/aarch64-unknown-linux-gnu/release/build/ring-7f1435bdf59d9724/out/aesv8-armx-linux64.o" "/Users/rvalls/dev/umccr/ring/target/aarch64-unknown-linux-gnu/release/build/ring-7f1435bdf59d9724/out/aesv8-armx-linux64.S"
thread 'main' panicked at 'failed to execute ["aarch64-linux-gnu-gcc" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "-I" "include" "-I" "/Users/rvalls/dev/umccr/ring/target/aarch64-unknown-linux-gnu/release/build/ring-7f1435bdf59d9724/out" "-Wall" "-Wextra" "-pedantic" "-pedantic-errors" "-Wall" "-Wextra" "-Wcast-align" "-Wcast-qual" "-Wconversion" "-Wenum-compare" "-Wfloat-equal" "-Wformat=2" "-Winline" "-Winvalid-pch" "-Wmissing-field-initializers" "-Wmissing-include-dirs" "-Wredundant-decls" "-Wshadow" "-Wsign-compare" "-Wsign-conversion" "-Wundef" "-Wuninitialized" "-Wwrite-strings" "-fno-strict-aliasing" "-fvisibility=hidden" "-fstack-protector" "-g3" "-DNDEBUG" "-Werror" "-c" "-o/Users/rvalls/dev/umccr/ring/target/aarch64-unknown-linux-gnu/release/build/ring-7f1435bdf59d9724/out/aesv8-armx-linux64.o" "/Users/rvalls/dev/umccr/ring/target/aarch64-unknown-linux-gnu/release/build/ring-7f1435bdf59d9724/out/aesv8-armx-linux64.S"]: No such file or directory (os error 2)', build.rs:704:9
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Then installing this GCC cross compiler (aarch64-linux-gnu-gcc
) on an M1 is also a bit more involved than normal according to: https://github.com/spack/spack/issues/26317#issuecomment-929700562
try
brew install llvm
When I set my environment variable export CC=/usr/bin/cc
the errors were resolved
I am on Mac OS, Ventura
When I set my environment variable export CC=/usr/bin/cc the errors were resolved I am on Mac OS, Ventura
Thanks! This worked for me as well.
Closing since this seems like it was resolved for people and because I build on an M2 all the time.