Repository navigation
Closed
Description
As far as I understand ring 0.17 supports aarch64-cp-windows-msvc target, however when trying to build it with xwin I get the following error:
error: failed to run custom build command for `ring v0.17.5`
Caused by:
process didn't exit successfully: `/tmp/test-ring/target/debug/build/ring-2031b15c66896d66/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_5_
OPT_LEVEL = Some("0")
TARGET = Some("aarch64-pc-windows-msvc")
HOST = Some("x86_64-unknown-linux-gnu")
cargo:rerun-if-env-changed=CC_aarch64-pc-windows-msvc
CC_aarch64-pc-windows-msvc = None
cargo:rerun-if-env-changed=CC_aarch64_pc_windows_msvc
CC_aarch64_pc_windows_msvc = Some("clang-cl")
cargo:rerun-if-env-changed=CRATE_CC_NO_DEFAULTS
CRATE_CC_NO_DEFAULTS = None
CARGO_CFG_TARGET_FEATURE = Some("crt-static,neon")
DEBUG = Some("true")
cargo:rerun-if-env-changed=CFLAGS_aarch64-pc-windows-msvc
CFLAGS_aarch64-pc-windows-msvc = None
cargo:rerun-if-env-changed=CFLAGS_aarch64_pc_windows_msvc
CFLAGS_aarch64_pc_windows_msvc = Some("--target=aarch64-pc-windows-msvc -Wno-unused-command-line-argument -fuse-ld=lld-link /imsvc/home/user/.cache/cargo-xwin/xwin/crt/include /imsvc/home/user/.cache/cargo-xwin/xwin/sdk/include/ucrt /imsvc/home/user/.cache/cargo-xwin/xwin/sdk/include/um /imsvc/home/user/.cache/cargo-xwin/xwin/sdk/include/shared ")
--- stderr
running "clang" "-O0" "--target=aarch64-pc-windows-msvc" "-ffunction-sections" "-fdata-sections" "-g" "-fno-omit-frame-pointer" "--target=aarch64-pc-windows-msvc" "--target=aarch64-pc-windows-msvc" "-Wno-unused-command-line-argument" "-fuse-ld=lld-link" "/imsvc/home/user/.cache/cargo-xwin/xwin/crt/include" "/imsvc/home/user/.cache/cargo-xwin/xwin/sdk/include/ucrt" "/imsvc/home/user/.cache/cargo-xwin/xwin/sdk/include/um" "/imsvc/home/user/.cache/cargo-xwin/xwin/sdk/include/shared" "-I" "include" "-I" "/tmp/test-ring/target/aarch64-pc-windows-msvc/debug/build/ring-8705dbada3a9c548/out" "-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" "-g3" "-DNDEBUG" "-c" "-o/tmp/test-ring/target/aarch64-pc-windows-msvc/debug/build/ring-8705dbada3a9c548/out/aesv8-armx-win64.o" "/home/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ring-0.17.5/pregenerated/aesv8-armx-win64.S"
clang: error: no such file or directory: '/imsvc/home/user/.cache/cargo-xwin/xwin/crt/include'
clang: error: no such file or directory: '/imsvc/home/user/.cache/cargo-xwin/xwin/sdk/include/ucrt'
clang: error: no such file or directory: '/imsvc/home/user/.cache/cargo-xwin/xwin/sdk/include/um'
clang: error: no such file or directory: '/imsvc/home/user/.cache/cargo-xwin/xwin/sdk/include/shared'
thread 'main' panicked at /home/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ring-0.17.5/build.rs:676:9:
execution failed
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Reacted by Eric Zhang
Metadata
Metadata
Assignees
Labels
No labels
Activity
messense commentedon Oct 31, 2023
Looks like/home/user/.cache/cargo-xwin/xwin/directory has been deleted by something.messense commentedon Oct 31, 2023
Anyway, can you try delete the whole
/home/user/.cache/cargo-xwindirectory and re-run? I suspect it might have something to do with #74.ancwrd1 commentedon Oct 31, 2023
Tried cleaning it up but without much success. If I look at the command line output:
It seems that there is a mix of gnu-style and msvc-style arguments which is probably a cause of the issue because the leading slash is not recognized as an option.
ancwrd1 commentedon Oct 31, 2023
Simple to reproduce:
messense commentedon Oct 31, 2023
https://github.com/briansmith/ring/blob/a9b88826e7826a6f9422680fb6240f75511cf2c7/build.rs#L580
I'm not sure what we can do here,
ringforcesclanginstead of supporting bothclangandclang-cl.cargo-xwin/src/common.rs
Lines 149 to 152 in e851cd5
ancwrd1 commentedon Oct 31, 2023
But then I am wondering why does it work for x86_64?
ancwrd1 commentedon Oct 31, 2023
Ah, sorry, I see the code in the ring specifically for AARCH64...
Remove aarch64-pc-windows-msvc
Windows support for sshx (#99)
fix: remove MATURIN_USE_XWIN
messense commentedon Dec 21, 2024
This has been fixed in v0.18.0 with the new
clangcross compiler support.cargo init test-ring cd test-ring cargo add ring cargo xwin build --target aarch64-pc-windows-msvc --cross-compiler clangAdd support for arm64 windows builds
Add support for arm64 windows builds (#120)
Windows support for sshx (ekzhang#99)
Add support for arm64 windows builds (ekzhang#120)