ring
ring copied to clipboard
unable to build ring for aarch64-unknown-linux-gnu
When I try and build my project for my RPi using
cargo build --target=aarch64-unknown-linux-gnu
it fails on the build of ring (a dependency of a dependency) thus:
The following warnings were emitted during compilation:
warning: [email protected]: Compiler family detection failed due to error: ToolExecError: Command "arm-linux-gnueabihf-gcc" "-E" "/Users/andrew/workspace/pigg/target/aarch64-unknown-linux-gnu/debug/build/ring-9a31514cbb27c17e/out/516341469748360433detect_compiler_family.c" with args arm-linux-gnueabihf-gcc did not execute successfully (status code exit status: 1).
warning: [email protected]: Compiler family detection failed due to error: ToolExecError: Command "arm-linux-gnueabihf-gcc" "-E" "/Users/andrew/workspace/pigg/target/aarch64-unknown-linux-gnu/debug/build/ring-9a31514cbb27c17e/out/7005336917275502437detect_compiler_family.c" with args arm-linux-gnueabihf-gcc did not execute successfully (status code exit status: 1).
warning: [email protected]: arm-linux-gnueabihf-gcc: error trying to exec 'cc1': execvp: No such file or directory
error: failed to run custom build command for `ring v0.17.8`
Caused by:
process didn't exit successfully: `/Users/andrew/workspace/pigg/target/debug/build/ring-db76c668a0ccaef7/build-script-build` (exit status: 1)
--- stdout
cargo:rerun-if-env-changed=RING_PREGENERATE_ASM
cargo:rustc-env=RING_CORE_PREFIX=ring_core_0_17_8_
OPT_LEVEL = Some(0)
TARGET = Some(aarch64-unknown-linux-gnu)
OUT_DIR = Some(/Users/andrew/workspace/pigg/target/aarch64-unknown-linux-gnu/debug/build/ring-9a31514cbb27c17e/out)
HOST = Some(aarch64-apple-darwin)
cargo:rerun-if-env-changed=CC_aarch64-unknown-linux-gnu
CC_aarch64-unknown-linux-gnu = None
cargo:rerun-if-env-changed=CC_aarch64_unknown_linux_gnu
CC_aarch64_unknown_linux_gnu = None
cargo:rerun-if-env-changed=TARGET_CC
TARGET_CC = None
cargo:rerun-if-env-changed=CC
CC = None
cargo:rerun-if-env-changed=CROSS_COMPILE
CROSS_COMPILE = None
RUSTC_LINKER = Some(arm-linux-gnueabihf-gcc)
cargo:rerun-if-env-changed=CC_ENABLE_DEBUG_OUTPUT
cargo:warning=Compiler family detection failed due to error: ToolExecError: Command "arm-linux-gnueabihf-gcc" "-E" "/Users/andrew/workspace/pigg/target/aarch64-unknown-linux-gnu/debug/build/ring-9a31514cbb27c17e/out/516341469748360433detect_compiler_family.c" with args arm-linux-gnueabihf-gcc did not execute successfully (status code exit status: 1).
RUSTC_WRAPPER = None
cargo:rerun-if-env-changed=CRATE_CC_NO_DEFAULTS
CRATE_CC_NO_DEFAULTS = None
DEBUG = Some(true)
CARGO_CFG_TARGET_FEATURE = Some(neon)
cargo:rerun-if-env-changed=CFLAGS_aarch64-unknown-linux-gnu
CFLAGS_aarch64-unknown-linux-gnu = None
cargo:rerun-if-env-changed=CFLAGS_aarch64_unknown_linux_gnu
CFLAGS_aarch64_unknown_linux_gnu = None
cargo:rerun-if-env-changed=TARGET_CFLAGS
TARGET_CFLAGS = None
cargo:rerun-if-env-changed=CFLAGS
CFLAGS = None
cargo:warning=Compiler family detection failed due to error: ToolExecError: Command "arm-linux-gnueabihf-gcc" "-E" "/Users/andrew/workspace/pigg/target/aarch64-unknown-linux-gnu/debug/build/ring-9a31514cbb27c17e/out/7005336917275502437detect_compiler_family.c" with args arm-linux-gnueabihf-gcc did not execute successfully (status code exit status: 1).
cargo:warning=arm-linux-gnueabihf-gcc: error trying to exec 'cc1': execvp: No such file or directory
--- stderr
error occurred: Command "arm-linux-gnueabihf-gcc" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-gdwarf-4" "-fno-omit-frame-pointer" "-I" "include" "-I" "/Users/andrew/workspace/pigg/target/aarch64-unknown-linux-gnu/debug/build/ring-9a31514cbb27c17e/out" "-Wall" "-Wextra" "-fvisibility=hidden" "-std=c1x" "-Wall" "-Wbad-function-cast" "-Wcast-align" "-Wcast-qual" "-Wconversion" "-Wmissing-field-initializers" "-Wmissing-include-dirs" "-Wnested-externs" "-Wredundant-decls" "-Wshadow" "-Wsign-compare" "-Wsign-conversion" "-Wstrict-prototypes" "-Wundef" "-Wuninitialized" "-g3" "-DNDEBUG" "-o" "/Users/andrew/workspace/pigg/target/aarch64-unknown-linux-gnu/debug/build/ring-9a31514cbb27c17e/out/fad98b632b8ce3cc-curve25519.o" "-c" "crypto/curve25519/curve25519.c" with args arm-linux-gnueabihf-gcc did not execute successfully (status code exit status: 1).
warning: build failed, waiting for other jobs to finish...
Is there any workaround for this, or is there the prospect of this working at some time in the future?
Thanks for your help.
I think you need aarch64 linker and maybe LD and AR