Closed as not planned
Description
We use Zig as a C compiler and rust-lld
as linker to cross-compile Rust from x86_64 (or aarch64) Linux to {x86_64,aarch64} Darwin.
Updating cc from 1.0.83 to 1.0.85 breaks compilation for these.
Not sure if that's caused by cc
directly or whether that's a problem in Ring.
x86_64-unknown-linux-gnu -> aarch64-apple-darwin
The following warnings were emitted during compilation:
warning: [email protected]: error: UnknownArchitecture
error: failed to run custom build command for `ring v0.17.7`
Caused by:
process didn't exit successfully: `/build/source/target/release/build/ring-dff0a7997c328e11/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_7_
OPT_LEVEL = Some("3")
TARGET = Some("aarch64-apple-darwin")
HOST = Some("x86_64-unknown-linux-gnu")
cargo:rerun-if-env-changed=CC_aarch64-apple-darwin
CC_aarch64-apple-darwin = Some("aarch64-apple-darwin-zigcc")
running: "aarch64-apple-darwin-zigcc" "--version"
exit status: 0
cargo:rerun-if-env-changed=CRATE_CC_NO_DEFAULTS
CRATE_CC_NO_DEFAULTS = None
DEBUG = Some("false")
running: "xcrun" "--show-sdk-platform-version" "--sdk" "macosx"
cargo:rerun-if-env-changed=CFLAGS_aarch64-apple-darwin
CFLAGS_aarch64-apple-darwin = None
cargo:rerun-if-env-changed=CFLAGS_aarch64_apple_darwin
CFLAGS_aarch64_apple_darwin = None
cargo:rerun-if-env-changed=TARGET_CFLAGS
TARGET_CFLAGS = None
cargo:rerun-if-env-changed=CFLAGS
CFLAGS = None
running: "aarch64-apple-darwin-zigcc" "--version"
exit status: 0
running: "xcrun" "--show-sdk-platform-version" "--sdk" "macosx"
running: "aarch64-apple-darwin-zigcc" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "--target=arm64-apple-darwin" "-mmacosx-version-min=11.0" "-I" "include" "-I" "/build/source/target/aarch64-apple-darwin/release/build/ring-18a91eda96a80e50/out" "-Wall" "-Wextra" "-fvisibility=hidden" "-std=c1x" "-pedantic" "-Wall" "-Wextra" "-Wbad-function-cast" "-Wcast-align" "-Wcast-qual" "-Wconversion" "-Wenum-compare" "-Wfloat-equal" "-Wformat=2" "-Winline" "-Winvalid-pch" "-Wmissing-field-initializers" "-Wmissing-include-dirs" "-Wnested-externs" "-Wredundant-decls" "-Wshadow" "-Wsign-compare" "-Wsign-conversion" "-Wstrict-prototypes" "-Wundef" "-Wuninitialized" "-Wwrite-strings" "-gfull" "-DNDEBUG" "-o" "/build/source/target/aarch64-apple-darwin/release/build/ring-18a91eda96a80e50/out/fad98b632b8ce3cc-curve25519.o" "-c" "crypto/curve25519/curve25519.c"
cargo:warning=error: UnknownArchitecture
exit status: 1
--- stderr
error occurred: Command "aarch64-apple-darwin-zigcc" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "--target=arm64-apple-darwin" "-mmacosx-version-min=11.0" "-I" "include" "-I" "/build/source/target/aarch64-apple-darwin/release/build/ring-18a91eda96a80e50/out" "-Wall" "-Wextra" "-fvisibility=hidden" "-std=c1x" "-pedantic" "-Wall" "-Wextra" "-Wbad-function-cast" "-Wcast-align" "-Wcast-qual" "-Wconversion" "-Wenum-compare" "-Wfloat-equal" "-Wformat=2" "-Winline" "-Winvalid-pch" "-Wmissing-field-initializers" "-Wmissing-include-dirs" "-Wnested-externs" "-Wredundant-decls" "-Wshadow" "-Wsign-compare" "-Wsign-conversion" "-Wstrict-prototypes" "-Wundef" "-Wuninitialized" "-Wwrite-strings" "-gfull" "-DNDEBUG" "-o" "/build/source/target/aarch64-apple-darwin/release/build/ring-18a91eda96a80e50/out/fad98b632b8ce3cc-curve25519.o" "-c" "crypto/curve25519/curve25519.c" with args "aarch64-apple-darwin-zigcc" did not execute successfully (status code exit status: 1).
x86_64-unknown-linux-gnu -> x86_64-apple-darwin
The following warnings were emitted during compilation:
warning: [email protected]: error: UnknownOperatingSystem
error: failed to run custom build command for `ring v0.17.7`
Caused by:
process didn't exit successfully: `/build/source/target/release/build/ring-dff0a7997c328e11/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_7_
OPT_LEVEL = Some("3")
TARGET = Some("x86_64-apple-darwin")
HOST = Some("x86_64-unknown-linux-gnu")
cargo:rerun-if-env-changed=CC_x86_64-apple-darwin
CC_x86_64-apple-darwin = Some("x86_64-apple-darwin-zigcc")
running: "x86_64-apple-darwin-zigcc" "--version"
exit status: 0
cargo:rerun-if-env-changed=CRATE_CC_NO_DEFAULTS
CRATE_CC_NO_DEFAULTS = None
DEBUG = Some("false")
running: "xcrun" "--show-sdk-platform-version" "--sdk" "macosx"
cargo:rerun-if-env-changed=CFLAGS_x86_64-apple-darwin
CFLAGS_x86_64-apple-darwin = None
cargo:rerun-if-env-changed=CFLAGS_x86_64_apple_darwin
CFLAGS_x86_64_apple_darwin = None
cargo:rerun-if-env-changed=TARGET_CFLAGS
TARGET_CFLAGS = None
cargo:rerun-if-env-changed=CFLAGS
CFLAGS = None
running: "x86_64-apple-darwin-zigcc" "--version"
exit status: 0
running: "xcrun" "--show-sdk-platform-version" "--sdk" "macosx"
running: "x86_64-apple-darwin-zigcc" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "-m64" "--target=x86_64-apple-darwin" "-mmacosx-version-min=10.7" "-I" "include" "-I" "/build/source/target/x86_64-apple-darwin/release/build/ring-e988c0c94f7e5625/out" "-Wall" "-Wextra" "-fvisibility=hidden" "-std=c1x" "-pedantic" "-Wall" "-Wextra" "-Wbad-function-cast" "-Wcast-align" "-Wcast-qual" "-Wconversion" "-Wenum-compare" "-Wfloat-equal" "-Wformat=2" "-Winline" "-Winvalid-pch" "-Wmissing-field-initializers" "-Wmissing-include-dirs" "-Wnested-externs" "-Wredundant-decls" "-Wshadow" "-Wsign-compare" "-Wsign-conversion" "-Wstrict-prototypes" "-Wundef" "-Wuninitialized" "-Wwrite-strings" "-gfull" "-DNDEBUG" "-o" "/build/source/target/x86_64-apple-darwin/release/build/ring-e988c0c94f7e5625/out/fad98b632b8ce3cc-curve25519.o" "-c" "crypto/curve25519/curve25519.c"
cargo:warning=error: UnknownOperatingSystem
exit status: 1
--- stderr
error occurred: Command "x86_64-apple-darwin-zigcc" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "-m64" "--target=x86_64-apple-darwin" "-mmacosx-version-min=10.7" "-I" "include" "-I" "/build/source/target/x86_64-apple-darwin/release/build/ring-e988c0c94f7e5625/out" "-Wall" "-Wextra" "-fvisibility=hidden" "-std=c1x" "-pedantic" "-Wall" "-Wextra" "-Wbad-function-cast" "-Wcast-align" "-Wcast-qual" "-Wconversion" "-Wenum-compare" "-Wfloat-equal" "-Wformat=2" "-Winline" "-Winvalid-pch" "-Wmissing-field-initializers" "-Wmissing-include-dirs" "-Wnested-externs" "-Wredundant-decls" "-Wshadow" "-Wsign-compare" "-Wsign-conversion" "-Wstrict-prototypes" "-Wundef" "-Wuninitialized" "-Wwrite-strings" "-gfull" "-DNDEBUG" "-o" "/build/source/target/x86_64-apple-darwin/release/build/ring-e988c0c94f7e5625/out/fad98b632b8ce3cc-curve25519.o" "-c" "crypto/curve25519/curve25519.c" with args "x86_64-apple-darwin-zigcc" did not execute successfully (status code exit status: 1).
Refs bytecodealliance/wit-deps#118
For reference, the zigcc script is defined at https://github.com/rvolosatovs/nixify/blob/3e34d28daa53c41ae615360f4c106cc1771ae869/lib/rust/mkAttrs.nix#L297-L312
Metadata
Metadata
Assignees
Labels
No labels