Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fails to install on arm64 #799

Open
wmmc88 opened this issue Feb 23, 2023 · 4 comments
Open

Fails to install on arm64 #799

wmmc88 opened this issue Feb 23, 2023 · 4 comments

Comments

@wmmc88
Copy link
Contributor

wmmc88 commented Feb 23, 2023

Describe The Bug

cargo install cargo-make fails to run on arm64

To Reproduce

Run cargo install cargo-make on arm64 PC.

Error Stack

~\git-reposcargo install cargo-make
    Updating crates.io index
  Installing cargo-make v0.36.5
   Compiling proc-macro2 v1.0.51
   Compiling quote v1.0.23
   Compiling unicode-ident v1.0.6
   Compiling cfg-if v1.0.0
   Compiling syn v1.0.108
   Compiling winapi v0.3.9
   Compiling jobserver v0.1.25
   Compiling serde_derive v1.0.152
   Compiling serde v1.0.152
   Compiling cc v1.0.79
   Compiling memchr v2.5.0
   Compiling autocfg v1.1.0
   Compiling typenum v1.16.0
   Compiling version_check v0.9.4
   Compiling libc v0.2.139
   Compiling getrandom v0.2.8
   Compiling pkg-config v0.3.26
   Compiling rand_core v0.6.4
   Compiling generic-array v0.14.6
   Compiling ring v0.16.20
   Compiling log v0.4.17
   Compiling ppv-lite86 v0.2.17
   Compiling encoding_index_tests v0.1.4
   Compiling regex-syntax v0.6.28
   Compiling aho-corasick v0.7.20
   Compiling subtle v2.4.1
   Compiling rand_chacha v0.3.1
   Compiling zstd-sys v2.0.7+zstd.1.5.4
   Compiling indexmap v1.9.2
   Compiling block-buffer v0.10.3
   Compiling crypto-common v0.1.6
   Compiling semver v1.0.16
error: failed to run custom build command for `ring v0.16.20`

Caused by:
  process didn't exit successfully: `C:\Users\MELVIN~1\AppData\Local\Temp\cargo-installfNb60N\release\build\ring-d1e85219611b35cd\build-script-build` (exit code: 101)
  --- stdout
  OPT_LEVEL = Some("3")
  TARGET = Some("aarch64-pc-windows-msvc")
  HOST = Some("aarch64-pc-windows-msvc")
  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 = None
  cargo:rerun-if-env-changed=HOST_CC
  HOST_CC = None
  cargo:rerun-if-env-changed=CC
  CC = None
  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 = None
  cargo:rerun-if-env-changed=HOST_CFLAGS
  HOST_CFLAGS = None
  cargo:rerun-if-env-changed=CFLAGS
  CFLAGS = None
  cargo:rerun-if-env-changed=CRATE_CC_NO_DEFAULTS
  CRATE_CC_NO_DEFAULTS = None
  CARGO_CFG_TARGET_FEATURE = Some("neon")
  DEBUG = Some("false")
  aes_nohw.c
  OPT_LEVEL = Some("3")
  TARGET = Some("aarch64-pc-windows-msvc")
  HOST = Some("aarch64-pc-windows-msvc")
  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 = None
  cargo:rerun-if-env-changed=HOST_CC
  HOST_CC = None
  cargo:rerun-if-env-changed=CC
  CC = None
  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 = None
  cargo:rerun-if-env-changed=HOST_CFLAGS
  HOST_CFLAGS = None
  cargo:rerun-if-env-changed=CFLAGS
  CFLAGS = None
  cargo:rerun-if-env-changed=CRATE_CC_NO_DEFAULTS
  CRATE_CC_NO_DEFAULTS = None
  CARGO_CFG_TARGET_FEATURE = Some("neon")
  DEBUG = Some("false")
  montgomery.c
  C:\Users\melvinwang\.cargo\registry\src\github.com-1ecc6299db9ec823\ring-0.16.20\crypto\fipsmodule\bn\internal.h(191): error C2065: 'BN_ULLONG': undeclared identifier
  C:\Users\melvinwang\.cargo\registry\src\github.com-1ecc6299db9ec823\ring-0.16.20\crypto\fipsmodule\bn\internal.h(191): error C2146: syntax error: missing ';' before identifier 'result'
  C:\Users\melvinwang\.cargo\registry\src\github.com-1ecc6299db9ec823\ring-0.16.20\crypto\fipsmodule\bn\internal.h(191): warning C4555: result of expression not used
  C:\Users\melvinwang\.cargo\registry\src\github.com-1ecc6299db9ec823\ring-0.16.20\crypto\fipsmodule\bn\internal.h(191): error C2065: 'result': undeclared identifier
  C:\Users\melvinwang\.cargo\registry\src\github.com-1ecc6299db9ec823\ring-0.16.20\crypto\fipsmodule\bn\internal.h(191): error C2146: syntax error: missing ';' before identifier 'a'
  C:\Users\melvinwang\.cargo\registry\src\github.com-1ecc6299db9ec823\ring-0.16.20\crypto\fipsmodule\bn\internal.h(191): warning C4552: '*': result of expression not used
  C:\Users\melvinwang\.cargo\registry\src\github.com-1ecc6299db9ec823\ring-0.16.20\crypto\fipsmodule\bn\internal.h(192): error C2065: 'result': undeclared identifier
  C:\Users\melvinwang\.cargo\registry\src\github.com-1ecc6299db9ec823\ring-0.16.20\crypto\fipsmodule\bn\internal.h(193): error C2065: 'result': undeclared identifier
  C:\Users\melvinwang\.cargo\registry\src\github.com-1ecc6299db9ec823\ring-0.16.20\crypto\fipsmodule\bn\internal.h(193): warning C4293: '>>': shift count negative or too big, undefined behavior
  C:\Users\melvinwang\.cargo\registry\src\github.com-1ecc6299db9ec823\ring-0.16.20\crypto\fipsmodule\bn\../../limbs/limbs.inl(38): warning C4163: '_addcarry_u64': not available as an intrinsic function
  C:\Users\melvinwang\.cargo\registry\src\github.com-1ecc6299db9ec823\ring-0.16.20\crypto\fipsmodule\bn\../../limbs/limbs.inl(38): warning C4163: '_subborrow_u64': not available as an intrinsic function
  C:\Users\melvinwang\.cargo\registry\src\github.com-1ecc6299db9ec823\ring-0.16.20\crypto\fipsmodule\bn\../../limbs/limbs.inl(62): warning C4013: '_addcarry_u64' undefined; assuming extern returning int
  C:\Users\melvinwang\.cargo\registry\src\github.com-1ecc6299db9ec823\ring-0.16.20\crypto\fipsmodule\bn\../../limbs/limbs.inl(62): warning C4242: '=': conversion from 'int' to 'Carry', possible loss of data
  C:\Users\melvinwang\.cargo\registry\src\github.com-1ecc6299db9ec823\ring-0.16.20\crypto\fipsmodule\bn\../../limbs/limbs.inl(76): warning C4242: '=': conversion from 'int' to 'Carry', possible loss of data
  C:\Users\melvinwang\.cargo\registry\src\github.com-1ecc6299db9ec823\ring-0.16.20\crypto\fipsmodule\bn\../../limbs/limbs.inl(92): warning C4013: '_subborrow_u64' undefined; assuming extern returning int
  C:\Users\melvinwang\.cargo\registry\src\github.com-1ecc6299db9ec823\ring-0.16.20\crypto\fipsmodule\bn\../../limbs/limbs.inl(92): warning C4242: '=': conversion from 'int' to 'Carry', possible loss of data
  C:\Users\melvinwang\.cargo\registry\src\github.com-1ecc6299db9ec823\ring-0.16.20\crypto\fipsmodule\bn\../../limbs/limbs.inl(106): warning C4242: '=': conversion from 'int' to 'Carry', possible loss of data

  --- stderr
  running "C:\\Program Files\\Microsoft Visual Studio\\2022\\Enterprise\\VC\\Tools\\MSVC\\14.34.31933\\bin\\HostX86\\arm64\\cl.exe" "-nologo" "-MD" "-O2" "-Brepro" "-I" "include" "-W4" "/GS" "/Gy" "/EHsc" "/GR-" "/Zc:wchar_t" "/Zc:forScope" "/Zc:inline" "/Zc:rvalueCast" "/sdl" "/Wall" "/wd4127" "/wd4464" "/wd4514" "/wd4710" "/wd4711" "/wd4820" "/wd5045" "/Ox" "-DNDEBUG" "-c" "/FoC:\\Users\\MELVIN~1\\AppData\\Local\\Temp\\cargo-installfNb60N\\release\\build\\ring-8225ff8ac95707ac\\out\\aes_nohw.obj" "crypto/fipsmodule/aes/aes_nohw.c"
  running "C:\\Program Files\\Microsoft Visual Studio\\2022\\Enterprise\\VC\\Tools\\MSVC\\14.34.31933\\bin\\HostX86\\arm64\\cl.exe" "-nologo" "-MD" "-O2" "-Brepro" "-I" "include" "-W4" "/GS" "/Gy" "/EHsc" "/GR-" "/Zc:wchar_t" "/Zc:forScope" "/Zc:inline" "/Zc:rvalueCast" "/sdl" "/Wall" "/wd4127" "/wd4464" "/wd4514" "/wd4710" "/wd4711" "/wd4820" "/wd5045" "/Ox" "-DNDEBUG" "-c" "/FoC:\\Users\\MELVIN~1\\AppData\\Local\\Temp\\cargo-installfNb60N\\release\\build\\ring-8225ff8ac95707ac\\out\\montgomery.obj" "crypto/fipsmodule/bn/montgomery.c"
  thread 'main' panicked at 'execution failed', C:\Users\melvinwang\.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: failed to compile `cargo-make v0.36.5`, intermediate artifacts can be found at `C:\Users\MELVIN~1\AppData\Local\Temp\cargo-installfNb60N`
@sagiegurari
Copy link
Owner

thanks for the report. i dont have windows with arm64 available to try but i do see it fails to compile a crate named ring.
maybe worth opening an issue there and linking to this one as I don't own that (or use it directly).

@wmmc88
Copy link
Contributor Author

wmmc88 commented Aug 22, 2023

looking back on this, i believe installing with the tls-native feature (and --no-default-features) removes all dependencies on ring(will test it out later today confirmed).
@sagiegurari Given that attohttpc defaults to using tls-native, is there a reason why duckscript-sdk defaults to use rustls?

@jlfaucher
Copy link

jlfaucher commented Oct 10, 2023

The ticket #1167 has been closed with this comment:
briansmith/ring#1167 (comment)
Maybe cargo-make will work on Windows arm64 after updating to ring 0.17.0:
briansmith/ring#1551 (comment)

Update:
I think these are the dependencies to watch out for:
cargo tree -p ring -i

ring v0.16.20
├── rustls v0.21.7
│   └── attohttpc v0.26.1
│       └── duckscriptsdk v0.9.1
│           └── cargo-make v0.37.2
├── rustls-webpki v0.101.6
│   └── rustls v0.21.7 (*)
└── sct v0.7.0
    └── rustls v0.21.7 (*)

rustls, rustls-webpki and sct have been upgraded internally to ring 0.17 but no release yet.
attohttpc not yet upgraded to ring 0.17.

@jlfaucher
Copy link

Today I was able to build under Windows ARM64.
log_build_windows_arm64.txt

Prerequisite (for me):

  • install the clang component of Visual Studio 2022 because ring needs it under arm (see ring BUILDING.md)
  • run the command "cargo install cargo-make" from "ARM64 Native Tools Command Prompt for VS 2022" to have clang in the PATH.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants