avalanche-types-rs icon indicating copy to clipboard operation
avalanche-types-rs copied to clipboard

The crate doesn't build on Windows ARM64

Open ssg opened this issue 3 years ago • 1 comments

The build fails on Windows ARM64 because of ring package (possibly, it won't build on x86 either):

error: failed to run custom build command for `ring v0.16.20`

  --- stdout
  OPT_LEVEL = Some("0")
  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("true")
  montgomery.c
  $HOME\.cargo\registry\src\github.com-1ecc6299db9ec823\ring-0.16.20\crypto\fipsmodule\bn\internal.h(191): error C2065: 'BN_ULLONG': undeclared identifier
  $HOME\.cargo\registry\src\github.com-1ecc6299db9ec823\ring-0.16.20\crypto\fipsmodule\bn\internal.h(191): error C2146: syntax error: missing ';' before identifier 'result'
  $HOME\.cargo\registry\src\github.com-1ecc6299db9ec823\ring-0.16.20\crypto\fipsmodule\bn\internal.h(191): warning C4555: result of expression not used
  $HOME\.cargo\registry\src\github.com-1ecc6299db9ec823\ring-0.16.20\crypto\fipsmodule\bn\internal.h(191): error C2065: 'result': undeclared identifier
  $HOME\.cargo\registry\src\github.com-1ecc6299db9ec823\ring-0.16.20\crypto\fipsmodule\bn\internal.h(191): error C2146: syntax error: missing ';' before identifier 'a'
  $HOME\.cargo\registry\src\github.com-1ecc6299db9ec823\ring-0.16.20\crypto\fipsmodule\bn\internal.h(191): warning C4552: '*': result of expression not used
  $HOME\.cargo\registry\src\github.com-1ecc6299db9ec823\ring-0.16.20\crypto\fipsmodule\bn\internal.h(192): error C2065: 'result': undeclared identifier
  $HOME\.cargo\registry\src\github.com-1ecc6299db9ec823\ring-0.16.20\crypto\fipsmodule\bn\internal.h(193): error C2065: 'result': undeclared identifier
  $HOME\.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
  $HOME\.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
  $HOME\.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
  $HOME\.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
  $HOME\.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
  $HOME\.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
  $HOME\.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
  $HOME\.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
  $HOME\.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

ssg avatar Nov 10 '22 19:11 ssg

I do not have Window machine but we will look for an alternative crypto crate (e.g., similar to ring) to support Window builds. Thanks for the report.

gyuho avatar Nov 10 '22 21:11 gyuho