Closed Kaanta0 closed 6 months ago
Compiling ring v0.17.8 The following warnings were emitted during compilation:
warning: ring@0.17.8: aarch64-fslc-linux-gcc: error: unrecognized command-line option ‘-m64’
error: failed to run custom build command for ring v0.17.8
Caused by:
process didn't exit successfully: /home/ibrahimkaan/remote-service/target/release/build/ring-bd52227bc0c72a9b/build-script-build
(exit status: 1)
--- stdout
cargo:rerun-if-env-changed=RING_PREGENERATE_ASM
cargo:rustc-env=RING_CORE_PREFIX=ring_core_0_178
OPT_LEVEL = Some("3")
TARGET = Some("x86_64-unknown-linux-gnu")
HOST = Some("x86_64-unknown-linux-gnu")
cargo:rerun-if-env-changed=CC_x86_64-unknown-linux-gnu
CC_x86_64-unknown-linux-gnu = None
cargo:rerun-if-env-changed=CC_x86_64_unknown_linux_gnu
CC_x86_64_unknown_linux_gnu = None
cargo:rerun-if-env-changed=HOST_CC
HOST_CC = None
cargo:rerun-if-env-changed=CC
CC = Some("aarch64-fslc-linux-gcc -march=armv8-a+crc+crypto -fstack-protector-strong -O2 -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security --sysroot=/opt/fslc-xwayland/4.0/sysroots/armv8a-fslc-linux")
cargo:rerun-if-env-changed=CC_ENABLE_DEBUG_OUTPUT
cargo:rerun-if-env-changed=CRATE_CC_NO_DEFAULTS
CRATE_CC_NO_DEFAULTS = None
DEBUG = Some("false")
CARGO_CFG_TARGET_FEATURE = Some("fxsr,sse,sse2")
cargo:rerun-if-env-changed=CFLAGS_x86_64-unknown-linux-gnu
CFLAGS_x86_64-unknown-linux-gnu = None
cargo:rerun-if-env-changed=CFLAGS_x86_64_unknown_linux_gnu
CFLAGS_x86_64_unknown_linux_gnu = None
cargo:rerun-if-env-changed=HOST_CFLAGS
HOST_CFLAGS = None
cargo:rerun-if-env-changed=CFLAGS
CFLAGS = Some(" -O2 -pipe -g -feliminate-unused-debug-types ")
cargo:warning=aarch64-fslc-linux-gcc: error: unrecognized command-line option ‘-m64’
--- stderr
error occurred: Command "aarch64-fslc-linux-gcc" "-march=armv8-a+crc+crypto" "-fstack-protector-strong" "-O2" "-D_FORTIFY_SOURCE=2" "-Wformat" "-Wformat-security" "-Werror=format-security" "--sysroot=/opt/fslc-xwayland/4.0/sysroots/armv8a-fslc-linux" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "-m64" "-O2" "-pipe" "-g" "-feliminate-unused-debug-types" "-I" "include" "-I" "/home/ibrahimkaan/remote-service/target/release/build/ring-7d4abcf80cf11c40/out" "-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" "/home/ibrahimkaan/remote-service/target/release/build/ring-7d4abcf80cf11c40/out/fad98b632b8ce3cc-curve25519.o" "-c" "crypto/curve25519/curve25519.c" with args "aarch64-fslc-linux-gcc" did not execute successfully (status code exit status: 1).
It looks like the cc-rs crate passes -m64
to aarch64-fslc-linux-gcc
but aarch64-fslc-linux-gcc
does not accept that flag. Perhaps you should file a PR (or at least an issue) against rust-lang/cc-rs for this.
I'm going to close this, because I think this is esither an issue with cc-rs or an issue with your environment.
hi @briansmith ,
First of all thanks a lot for ring and your work.
I have the same issue on multiple environment while cross compiling. Even on clean environment from Github runner ubuntu-latest (24.04LTS)
It always fail with a bad -m64
flag
See https://github.com/sctg-development/sctgdesk-server/actions/runs/11349077620/job/31564343573
--- 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(x86_64-unknown-linux-gnu)
OUT_DIR = Some(/home/runner/work/sctgdesk-server/sctgdesk-server/target/release/build/ring-55c6dbd99767a94a/out)
HOST = Some(x86_64-unknown-linux-gnu)
cargo:rerun-if-env-changed=CC_x86_64-unknown-linux-gnu
CC_x86_64-unknown-linux-gnu = None
cargo:rerun-if-env-changed=CC_x86_64_unknown_linux_gnu
CC_x86_64_unknown_linux_gnu = None
cargo:rerun-if-env-changed=HOST_CC
HOST_CC = None
cargo:rerun-if-env-changed=CC
CC = Some(aarch64-linux-gnu-gcc)
cargo:rerun-if-env-changed=CC_KNOWN_WRAPPER_CUSTOM
CC_KNOWN_WRAPPER_CUSTOM = None
RUSTC_WRAPPER = None
cargo:rerun-if-env-changed=CC_ENABLE_DEBUG_OUTPUT
cargo:rerun-if-env-changed=CRATE_CC_NO_DEFAULTS
CRATE_CC_NO_DEFAULTS = None
DEBUG = Some(false)
CARGO_CFG_TARGET_FEATURE = Some(fxsr,sse,sse2)
cargo:rerun-if-env-changed=CFLAGS_x86_64-unknown-linux-gnu
CFLAGS_x86_64-unknown-linux-gnu = None
cargo:rerun-if-env-changed=CFLAGS_x86_64_unknown_linux_gnu
CFLAGS_x86_64_unknown_linux_gnu = None
cargo:rerun-if-env-changed=HOST_CFLAGS
HOST_CFLAGS = None
cargo:rerun-if-env-changed=CFLAGS
CFLAGS = None
cargo:warning=aarch64-linux-gnu-gcc: error: unrecognized command-line option ‘-m64’
exit status: 1
i'm trying to build a rust binary that has a library using ring as dependency, but it just simply does not want to compile. i checked the "mk/cargo.sh" file, but i couldn't find what i needed.
is there a way for me to solve this issue ? if not, is there a workaround for this ?