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

Linkage error when building for aarch64-pc-windows-msvc #101

Closed
rami3l opened this issue Jun 24, 2024 · 9 comments
Closed

Linkage error when building for aarch64-pc-windows-msvc #101

rami3l opened this issue Jun 24, 2024 · 9 comments

Comments

@rami3l
Copy link
Contributor

rami3l commented Jun 24, 2024

As a part of rust-lang/rustup#3898, we (the Rustup team) have tried to introduce rustls-platform-verifier to Rustup by adding the following into our Cargo.toml:

rustls-platform-verifier = { version = "0.3", optional = true }

... which, at the time of writing, points to rustls-platform-verifier 0.3.1 released 2 months ago.

When cross-compiling for aarch64-pc-windows-msvc however, the following error was generated:

Error log
Compiling rustls-platform-verifier v0.3.1
error: linking with `link.exe` failed: exit code: 1120
  |
  = note: "C:\\Program Files\\Microsoft Visual Studio\\2022\\Enterprise\\VC\\Tools\\MSVC\\14.40.33807\\bin\\HostX64\\arm64\\link.exe" "/DEF:C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\rustcjxMRYi\\lib.def" "/NOLOGO" "C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\rustcjxMRYi\\symbols.o" "D:\\a\\rustup\\rustup\\target\\aarch64-pc-windows-msvc\\debug\\deps\\rustls_platform_verifier-824047c6ba53f86f.rustls_platform_verifier.d3754e06d5d23fde-cgu.0.rcgu.o" "D:\\a\\rustup\\rustup\\target\\aarch64-pc-windows-msvc\\debug\\deps\\rustls_platform_verifier-824047c6ba53f86f.2kbvfqg2xu4cad5i.rcgu.o" "/LIBPATH:D:\\a\\rustup\\rustup\\target\\aarch64-pc-windows-msvc\\debug\\deps" "/LIBPATH:D:\\a\\rustup\\rustup\\target\\debug\\deps" "/LIBPATH:D:\\a\\rustup\\rustup\\target\\aarch64-pc-windows-msvc\\debug\\build\\aws-lc-sys-62247e93288e9cb7\\out\\build\\artifacts\\" "/LIBPATH:C:\\Users\\runneradmin\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\aarch64-pc-windows-msvc\\lib" "D:\\a\\rustup\\rustup\\target\\aarch64
  = note:    Creating library D:\a\rustup\rustup\target\aarch64-pc-windows-msvc\debug\deps\rustls_platform_verifier-824047c6ba53f86f.dll.lib and object D:\a\rustup\rustup\target\aarch64-pc-windows-msvc\debug\deps\rustls_platform_verifier-824047c6ba53f86f.dll.exp
          LINK : warning LNK4098: defaultlib 'msvcrtd.lib' conflicts with use of other libs; use /NODEFAULTLIB:library
          LINK : warning LNK4286: symbol 'abort' defined in 'libucrt.lib(abort.obj)' is imported by 'libaws_lc_sys-2799e0ca1159a8ce.rlib(obj.c.obj)'
          LINK : warning LNK4286: symbol 'abort' defined in 'libucrt.lib(abort.obj)' is imported by 'libaws_lc_sys-2799e0ca1159a8ce.rlib(refcount_c11.c.obj)'
          LINK : warning LNK4286: symbol 'abort' defined in 'libucrt.lib(abort.obj)' is imported by 'libaws_lc_sys-2799e0ca1159a8ce.rlib(ex_data.c.obj)'
          LINK : warning LNK4217: symbol 'abort' defined in 'libucrt.lib(abort.obj)' is imported by 'libaws_lc_sys-2799e0ca1159a8ce.rlib(bcm.c.obj)' in function 'aws_lc_0_18_0_bn_mod_exp_mont_small'
          LINK : warning LNK4286: symbol 'abort' defined in 'libucrt.lib(abort.obj)' is imported by 'libaws_lc_sys-2799e0ca1159a8ce.rlib(err.c.obj)'
          LINK : warning LNK4286: symbol 'abort' defined in 'libucrt.lib(abort.obj)' is imported by 'libaws_lc_sys-2799e0ca1159a8ce.rlib(thread_win.c.obj)'
          LINK : warning LNK4286: symbol 'abort' defined in 'libucrt.lib(abort.obj)' is imported by 'libaws_lc_sys-2799e0ca1159a8ce.rlib(windows.c.obj)'
          LINK : warning LNK4217: symbol 'malloc' defined in 'libucrt.lib(malloc.obj)' is imported by 'libaws_lc_sys-2799e0ca1159a8ce.rlib(bcm.c.obj)' in function 'bn_less_than_word_mask'
          LINK : warning LNK4286: symbol 'malloc' defined in 'libucrt.lib(malloc.obj)' is imported by 'libaws_lc_sys-2799e0ca1159a8ce.rlib(mem.c.obj)'
          LINK : warning LNK4286: symbol 'malloc' defined in 'libucrt.lib(malloc.obj)' is imported by 'libaws_lc_sys-2799e0ca1159a8ce.rlib(err.c.obj)'
          LINK : warning LNK4286: symbol 'malloc' defined in 'libucrt.lib(malloc.obj)' is imported by 'libaws_lc_sys-2799e0ca1159a8ce.rlib(thread_win.c.obj)'
          LINK : warning LNK4217: symbol '__acrt_iob_func' defined in 'libucrt.lib(_file.obj)' is imported by 'libaws_lc_sys-2799e0ca1159a8ce.rlib(bcm.c.obj)' in function 'aws_lc_0_18_0_handle_cpu_env'
          LINK : warning LNK4217: symbol 'free' defined in 'libucrt.lib(free.obj)' is imported by 'libaws_lc_sys-2799e0ca1159a8ce.rlib(bcm.c.obj)' in function 'ctr32_add'
          LINK : warning LNK4286: symbol 'free' defined in 'libucrt.lib(free.obj)' is imported by 'libaws_lc_sys-2799e0ca1159a8ce.rlib(mem.c.obj)'
          LINK : warning LNK4286: symbol 'free' defined in 'libucrt.lib(free.obj)' is imported by 'libaws_lc_sys-2799e0ca1159a8ce.rlib(err.c.obj)'
          LINK : warning LNK4286: symbol 'free' defined in 'libucrt.lib(free.obj)' is imported by 'libaws_lc_sys-2799e0ca1159a8ce.rlib(thread_win.c.obj)'
          LINK : warning LNK4217: symbol 'fflush' defined in 'libucrt.lib(fflush.obj)' is imported by 'libaws_lc_sys-2799e0ca1159a8ce.rlib(bcm.c.obj)' in function 'check_test'
          LINK : warning LNK4286: symbol 'fflush' defined in 'libucrt.lib(fflush.obj)' is imported by 'libaws_lc_sys-2799e0ca1159a8ce.rlib(file.c.obj)'
          LINK : warning LNK4286: symbol '__stdio_common_vsprintf' defined in 'libucrt.lib(output.obj)' is imported by 'libaws_lc_sys-2799e0ca1159a8ce.rlib(pq_custom_randombytes.c.obj)'
          LINK : warning LNK4286: symbol '__stdio_common_vsprintf' defined in 'libucrt.lib(output.obj)' is imported by 'libaws_lc_sys-2799e0ca1159a8ce.rlib(kyber512r3_ref.c.obj)'
          LINK : warning LNK4286: symbol '__stdio_common_vsprintf' defined in 'libucrt.lib(output.obj)' is imported by 'libaws_lc_sys-2799e0ca1159a8ce.rlib(kyber768r3_ref.c.obj)'
          LINK : warning LNK4286: symbol '__stdio_common_vsprintf' defined in 'libucrt.lib(output.obj)' is imported by 'libaws_lc_sys-2799e0ca1159a8ce.rlib(kyber1024r3_ref.c.obj)'
          LINK : warning LNK4286: symbol '__stdio_common_vsprintf' defined in 'libucrt.lib(output.obj)' is imported by 'libaws_lc_sys-2799e0ca1159a8ce.rlib(ml_kem_512_ipd.c.obj)'
          LINK : warning LNK4286: symbol '__stdio_common_vsprintf' defined in 'libucrt.lib(output.obj)' is imported by 'libaws_lc_sys-2799e0ca1159a8ce.rlib(kem.c.obj)'
          LINK : warning LNK4286: symbol '__stdio_common_vsprintf' defined in 'libucrt.lib(output.obj)' is imported by 'libaws_lc_sys-2799e0ca1159a8ce.rlib(printf.c.obj)'
          LINK : warning LNK4286: symbol '__stdio_common_vsprintf' defined in 'libucrt.lib(output.obj)' is imported by 'libaws_lc_sys-2799e0ca1159a8ce.rlib(kem_methods.c.obj)'
          LINK : warning LNK4286: symbol '__stdio_common_vsprintf' defined in 'libucrt.lib(output.obj)' is imported by 'libaws_lc_sys-2799e0ca1159a8ce.rlib(kem_kyber.c.obj)'
          LINK : warning LNK4286: symbol '__stdio_common_vsprintf' defined in 'libucrt.lib(output.obj)' is imported by 'libaws_lc_sys-2799e0ca1159a8ce.rlib(p_hmac_asn1.c.obj)'
          LINK : warning LNK4286: symbol '__stdio_common_vsprintf' defined in 'libucrt.lib(output.obj)' is imported by 'libaws_lc_sys-2799e0ca1159a8ce.rlib(print.c.obj)'
          LINK : warning LNK4286: symbol '__stdio_common_vsprintf' defined in 'libucrt.lib(output.obj)' is imported by 'libaws_lc_sys-2799e0ca1159a8ce.rlib(file.c.obj)'
          LINK : warning LNK4286: symbol '__stdio_common_vsprintf' defined in 'libucrt.lib(output.obj)' is imported by 'libaws_lc_sys-2799e0ca1159a8ce.rlib(bio.c.obj)'
          LINK : warning LNK4286: symbol '__stdio_common_vsprintf' defined in 'libucrt.lib(output.obj)' is imported by 'libaws_lc_sys-2799e0ca1159a8ce.rlib(p_dsa_asn1.c.obj)'
          LINK : warning LNK4286: symbol '__stdio_common_vsprintf' defined in 'libucrt.lib(output.obj)' is imported by 'libaws_lc_sys-2799e0ca1159a8ce.rlib(p_ed25519_asn1.c.obj)'
          LINK : warning LNK4286: symbol '__stdio_common_vsprintf' defined in 'libucrt.lib(output.obj)' is imported by 'libaws_lc_sys-2799e0ca1159a8ce.rlib(p_x25519_asn1.c.obj)'
          LINK : warning LNK4286: symbol '__stdio_common_vsprintf' defined in 'libucrt.lib(output.obj)' is imported by 'libaws_lc_sys-2799e0ca1159a8ce.rlib(p_kem_asn1.c.obj)'
          LINK : warning LNK4286: symbol '__stdio_common_vsprintf' defined in 'libucrt.lib(output.obj)' is imported by 'libaws_lc_sys-2799e0ca1159a8ce.rlib(p_x25519.c.obj)'
          LINK : warning LNK4286: symbol '__stdio_common_vsprintf' defined in 'libucrt.lib(output.obj)' is imported by 'libaws_lc_sys-2799e0ca1159a8ce.rlib(p_kem.c.obj)'
          LINK : warning LNK4286: symbol '__stdio_common_vsprintf' defined in 'libucrt.lib(output.obj)' is imported by 'libaws_lc_sys-2799e0ca1159a8ce.rlib(p_rsa_asn1.c.obj)'
          LINK : warning LNK4286: symbol '__stdio_common_vsprintf' defined in 'libucrt.lib(output.obj)' is imported by 'libaws_lc_sys-2799e0ca1159a8ce.rlib(p_ec_asn1.c.obj)'
          LINK : warning LNK4286: symbol '__stdio_common_vsprintf' defined in 'libucrt.lib(output.obj)' is imported by 'libaws_lc_sys-2799e0ca1159a8ce.rlib(err_data.c.obj)'
          LINK : warning LNK4286: symbol '__stdio_common_vsprintf' defined in 'libucrt.lib(output.obj)' is imported by 'libaws_lc_sys-2799e0ca1159a8ce.rlib(a_object.c.obj)'
          LINK : warning LNK4286: symbol '__stdio_common_vsprintf' defined in 'libucrt.lib(output.obj)' is imported by 'libaws_lc_sys-2799e0ca1159a8ce.rlib(lhash.c.obj)'
          LINK : warning LNK4286: symbol '__stdio_common_vsprintf' defined in 'libucrt.lib(output.obj)' is imported by 'libaws_lc_sys-2799e0ca1159a8ce.rlib(p_ed25519.c.obj)'
          LINK : warning LNK4286: symbol '__stdio_common_vsprintf' defined in 'libucrt.lib(output.obj)' is imported by 'libaws_lc_sys-2799e0ca1159a8ce.rlib(convert.c.obj)'
          LINK : warning LNK4286: symbol '__stdio_common_vsprintf' defined in 'libucrt.lib(output.obj)' is imported by 'libaws_lc_sys-2799e0ca1159a8ce.rlib(dsa_asn1.c.obj)'
          LINK : warning LNK4286: symbol '__stdio_common_vsprintf' defined in 'libucrt.lib(output.obj)' is imported by 'libaws_lc_sys-2799e0ca1159a8ce.rlib(posix_time.c.obj)'
          LINK : warning LNK4286: symbol '__stdio_common_vsprintf' defined in 'libucrt.lib(output.obj)' is imported by 'libaws_lc_sys-2799e0ca1159a8ce.rlib(poly1305.c.obj)'
          LINK : warning LNK4286: symbol '__stdio_common_vsprintf' defined in 'libucrt.lib(output.obj)' is imported by 'libaws_lc_sys-2799e0ca1159a8ce.rlib(rsa_crypt.c.obj)'
          LINK : warning LNK4286: symbol '__stdio_common_vsprintf' defined in 'libucrt.lib(output.obj)' is imported by 'libaws_lc_sys-2799e0ca1159a8ce.rlib(curve25519_nohw.c.obj)'
          LINK : warning LNK4286: symbol '__stdio_common_vsprintf' defined in 'libucrt.lib(output.obj)' is imported by 'libaws_lc_sys-2799e0ca1159a8ce.rlib(bn_asn1.c.obj)'
          LINK : warning LNK4286: symbol '__stdio_common_vsprintf' defined in 'libucrt.lib(output.obj)' is imported by 'libaws_lc_sys-2799e0ca1159a8ce.rlib(asn1_compat.c.obj)'
          LINK : warning LNK4286: symbol '__stdio_common_vsprintf' defined in 'libucrt.lib(output.obj)' is imported by 'libaws_lc_sys-2799e0ca1159a8ce.rlib(p_methods.c.obj)'
          LINK : warning LNK4286: symbol '__stdio_common_vsprintf' defined in 'libucrt.lib(output.obj)' is imported by 'libaws_lc_sys-2799e0ca1159a8ce.rlib(dsa.c.obj)'
          LINK : warning LNK4286: symbol '__stdio_common_vsprintf' defined in 'libucrt.lib(output.obj)' is imported by 'libaws_lc_sys-2799e0ca1159a8ce.rlib(rsassa_pss_asn1.c.obj)'
          LINK : warning LNK4286: symbol '__stdio_common_vsprintf' defined in 'libucrt.lib(output.obj)' is imported by 'libaws_lc_sys-2799e0ca1159a8ce.rlib(ripemd.c.obj)'
          LINK : warning LNK4286: symbol '__stdio_common_vsprintf' defined in 'libucrt.lib(output.obj)' is imported by 'libaws_lc_sys-2799e0ca1159a8ce.rlib(refcount_c11.c.obj)'
          LINK : warning LNK4286: symbol '__stdio_common_vsprintf' defined in 'libucrt.lib(output.obj)' is imported by 'libaws_lc_sys-2799e0ca1159a8ce.rlib(engine.c.obj)'
          LINK : warning LNK4286: symbol '__stdio_common_vsprintf' defined in 'libucrt.lib(output.obj)' is imported by 'libaws_lc_sys-2799e0ca1159a8ce.rlib(ex_data.c.obj)'
          LINK : warning LNK4286: symbol '__stdio_common_vsprintf' defined in 'libucrt.lib(output.obj)' is imported by 'libaws_lc_sys-2799e0ca1159a8ce.rlib(obj_xref.c.obj)'
          LINK : warning LNK4286: symbol '__stdio_common_vsprintf' defined in 'libucrt.lib(output.obj)' is imported by 'libaws_lc_sys-2799e0ca1159a8ce.rlib(forkunsafe.c.obj)'
          LINK : warning LNK4286: symbol '__stdio_common_vsprintf' defined in 'libucrt.lib(output.obj)' is imported by 'libaws_lc_sys-2799e0ca1159a8ce.rlib(windows.c.obj)'
          LINK : warning LNK4286: symbol '__stdio_common_vsprintf' defined in 'libucrt.lib(output.obj)' is imported by 'libaws_lc_sys-2799e0ca1159a8ce.rlib(obj.c.obj)'
          LINK : warning LNK4286: symbol '__stdio_common_vsprintf' defined in 'libucrt.lib(output.obj)' is imported by 'libaws_lc_sys-2799e0ca1159a8ce.rlib(cpucap.c.obj)'
          LINK : warning LNK4286: symbol '__stdio_common_vsprintf' defined in 'libucrt.lib(output.obj)' is imported by 'libaws_lc_sys-2799e0ca1159a8ce.rlib(e_chacha20poly1305.c.obj)'
          LINK : warning LNK4286: symbol '__stdio_common_vsprintf' defined in 'libucrt.lib(output.obj)' is imported by 'libaws_lc_sys-2799e0ca1159a8ce.rlib(err.c.obj)'
          LINK : warning LNK4286: symbol '__stdio_common_vsprintf' defined in 'libucrt.lib(output.obj)' is imported by 'libaws_lc_sys-2799e0ca1159a8ce.rlib(thread_win.c.obj)'
          LINK : warning LNK4286: symbol '__stdio_common_vsprintf' defined in 'libucrt.lib(output.obj)' is imported by 'libaws_lc_sys-2799e0ca1159a8ce.rlib(stack.c.obj)'
          LINK : warning LNK4286: symbol '__stdio_common_vsprintf' defined in 'libucrt.lib(output.obj)' is imported by 'libaws_lc_sys-2799e0ca1159a8ce.rlib(rsa_asn1.c.obj)'
          LINK : warning LNK4286: symbol '__stdio_common_vsprintf' defined in 'libucrt.lib(output.obj)' is imported by 'libaws_lc_sys-2799e0ca1159a8ce.rlib(mem.c.obj)'
          LINK : warning LNK4286: symbol '__stdio_common_vsprintf' defined in 'libucrt.lib(output.obj)' is imported by 'libaws_lc_sys-2799e0ca1159a8ce.rlib(cbs.c.obj)'
          LINK : warning LNK4286: symbol '__stdio_common_vsprintf' defined in 'libucrt.lib(output.obj)' is imported by 'libaws_lc_sys-2799e0ca1159a8ce.rlib(e_aesgcmsiv.c.obj)'
          LINK : warning LNK4286: symbol '__stdio_common_vsprintf' defined in 'libucrt.lib(output.obj)' is imported by 'libaws_lc_sys-2799e0ca1159a8ce.rlib(cbb.c.obj)'
          LINK : warning LNK4286: symbol '__stdio_common_vsprintf' defined in 'libucrt.lib(output.obj)' is imported by 'libaws_lc_sys-2799e0ca1159a8ce.rlib(ec_asn1.c.obj)'
          LINK : warning LNK4286: symbol '__stdio_common_vsprintf' defined in 'libucrt.lib(output.obj)' is imported by 'libaws_lc_sys-2799e0ca1159a8ce.rlib(evp_asn1.c.obj)'
          LINK : warning LNK4286: symbol '__stdio_common_vsprintf' defined in 'libucrt.lib(output.obj)' is imported by 'libaws_lc_sys-2799e0ca1159a8ce.rlib(crypto.c.obj)'
          LINK : warning LNK4217: symbol '__stdio_common_vsprintf' defined in 'libucrt.lib(output.obj)' is imported by 'libaws_lc_sys-2799e0ca1159a8ce.rlib(bcm.c.obj)' in function '_vsnprintf_l'
          LINK : warning LNK4286: symbol '__stdio_common_vsprintf' defined in 'libucrt.lib(output.obj)' is imported by 'libaws_lc_sys-2799e0ca1159a8ce.rlib(chacha.c.obj)'
          LINK : warning LNK4286: symbol '__stdio_common_vsprintf' defined in 'libucrt.lib(output.obj)' is imported by 'libaws_lc_sys-2799e0ca1159a8ce.rlib(curve25519.c.obj)'
          LINK : warning LNK4286: symbol '__stdio_common_vsprintf' defined in 'libucrt.lib(output.obj)' is imported by 'libaws_lc_sys-2799e0ca1159a8ce.rlib(ecdsa_asn1.c.obj)'
          LINK : warning LNK4217: symbol '__stdio_common_vfprintf' defined in 'libucrt.lib(output.obj)' is imported by 'libaws_lc_sys-2799e0ca1159a8ce.rlib(bcm.c.obj)' in function '_vfprintf_l'
          LINK : warning LNK4217: symbol 'qsort' defined in 'libucrt.lib(qsort.obj)' is imported by 'libaws_lc_sys-2799e0ca1159a8ce.rlib(cbb.c.obj)' in function 'aws_lc_0_18_0_CBB_flush_asn1_set_of'
          LINK : warning LNK4217: symbol '_errno' defined in 'libucrt.lib(errno.obj)' is imported by 'libaws_lc_sys-2799e0ca1159a8ce.rlib(mem.c.obj)' in function 'aws_lc_0_18_0_OPENSSL_vasprintf_internal'
          LINK : warning LNK4286: symbol '_errno' defined in 'libucrt.lib(errno.obj)' is imported by 'libaws_lc_sys-2799e0ca1159a8ce.rlib(err.c.obj)'
          LINK : warning LNK4286: symbol '_errno' defined in 'libucrt.lib(errno.obj)' is imported by 'libaws_lc_sys-2799e0ca1159a8ce.rlib(file.c.obj)'
          LINK : warning LNK4217: symbol 'fclose' defined in 'libucrt.lib(fclose.obj)' is imported by 'libaws_lc_sys-2799e0ca1159a8ce.rlib(file.c.obj)' in function 'aws_lc_0_18_0_BIO_new_file'
          LINK : warning LNK4217: symbol '_fileno' defined in 'libucrt.lib(fileno.obj)' is imported by 'libaws_lc_sys-2799e0ca1159a8ce.rlib(file.c.obj)' in function 'file_ctrl'
          libaws_lc_sys-2799e0ca1159a8ce.rlib(bio.c.obj) : error LNK2001: unresolved external symbol __imp__wassert
          libaws_lc_sys-2799e0ca1159a8ce.rlib(printf.c.obj) : error LNK2001: unresolved external symbol __imp__wassert
          libaws_lc_sys-2799e0ca1159a8ce.rlib(posix_time.c.obj) : error LNK2001: unresolved external symbol __imp__wassert
          libaws_lc_sys-2799e0ca1159a8ce.rlib(poly1305.c.obj) : error LNK2001: unresolved external symbol __imp__wassert
          libaws_lc_sys-2799e0ca1159a8ce.rlib(a_object.c.obj) : error LNK2001: unresolved external symbol __imp__wassert
          libaws_lc_sys-2799e0ca1159a8ce.rlib(lhash.c.obj) : error LNK2001: unresolved external symbol __imp__wassert
          libaws_lc_sys-2799e0ca1159a8ce.rlib(curve25519_nohw.c.obj) : error LNK2001: unresolved external symbol __imp__wassert
          libaws_lc_sys-2799e0ca1159a8ce.rlib(asn1_compat.c.obj) : error LNK2001: unresolved external symbol __imp__wassert
          libaws_lc_sys-2799e0ca1159a8ce.rlib(convert.c.obj) : error LNK2001: unresolved external symbol __imp__wassert
          libaws_lc_sys-2799e0ca1159a8ce.rlib(dsa_asn1.c.obj) : error LNK2001: unresolved external symbol __imp__wassert
          libaws_lc_sys-2799e0ca1159a8ce.rlib(stack.c.obj) : error LNK2001: unresolved external symbol __imp__wassert
          libaws_lc_sys-2799e0ca1159a8ce.rlib(engine.c.obj) : error LNK2001: unresolved external symbol __imp__wassert
          libaws_lc_sys-2799e0ca1159a8ce.rlib(ex_data.c.obj) : error LNK2001: unresolved external symbol __imp__wassert
          libaws_lc_sys-2799e0ca1159a8ce.rlib(ripemd.c.obj) : error LNK2001: unresolved external symbol __imp__wassert
          libaws_lc_sys-2799e0ca1159a8ce.rlib(mem.c.obj) : error LNK2001: unresolved external symbol __imp__wassert
          libaws_lc_sys-2799e0ca1159a8ce.rlib(cbs.c.obj) : error LNK2001: unresolved external symbol __imp__wassert
          libaws_lc_sys-2799e0ca1159a8ce.rlib(e_chacha20poly1305.c.obj) : error LNK2001: unresolved external symbol __imp__wassert
          libaws_lc_sys-2799e0ca1159a8ce.rlib(err.c.obj) : error LNK2001: unresolved external symbol __imp__wassert
          libaws_lc_sys-2799e0ca1159a8ce.rlib(bcm.c.obj) : error LNK2001: unresolved external symbol __imp__wassert
          libaws_lc_sys-2799e0ca1159a8ce.rlib(chacha.c.obj) : error LNK2001: unresolved external symbol __imp__wassert
          libaws_lc_sys-2799e0ca1159a8ce.rlib(cbb.c.obj) : error LNK2001: unresolved external symbol __imp__wassert
          libaws_lc_sys-2799e0ca1159a8ce.rlib(rsa_asn1.c.obj) : error LNK2001: unresolved external symbol __imp__wassert
          libaws_lc_sys-2799e0ca1159a8ce.rlib(bcm.c.obj) : error LNK2019: unresolved external symbol __imp___stdio_common_vsscanf referenced in function _vsscanf_l
          libaws_lc_sys-2799e0ca1159a8ce.rlib(mem.c.obj) : error LNK2019: unresolved external symbol __imp_realloc referenced in function aws_lc_0_18_0_OPENSSL_vasprintf_internal
          libaws_lc_sys-2799e0ca1159a8ce.rlib(err.c.obj) : error LNK2019: unresolved external symbol __imp_strerror referenced in function err_reason_error_string
          libaws_lc_sys-2799e0ca1159a8ce.rlib(err.c.obj) : error LNK2019: unresolved external symbol __imp_fputs referenced in function print_errors_to_file
          libaws_lc_sys-2799e0ca1159a8ce.rlib(err.c.obj) : error LNK2019: unresolved external symbol __imp_strdup referenced in function aws_lc_0_18_0_ERR_set_error_data
          oldnames.lib(strdup.obi) : error LNK2001: unresolved external symbol __imp_strdup
          libaws_lc_sys-2799e0ca1159a8ce.rlib(err.c.obj) : error LNK2019: unresolved external symbol __imp_bsearch referenced in function aws_lc_0_18_0_ERR_restore_state
          libaws_lc_sys-2799e0ca1159a8ce.rlib(obj.c.obj) : error LNK2001: unresolved external symbol __imp_bsearch
          libaws_lc_sys-2799e0ca1159a8ce.rlib(stack.c.obj) : error LNK2019: unresolved external symbol __imp_qsort_s referenced in function aws_lc_0_18_0_OPENSSL_sk_sort
          libaws_lc_sys-2799e0ca1159a8ce.rlib(file.c.obj) : error LNK2019: unresolved external symbol __imp_fopen referenced in function aws_lc_0_18_0_BIO_new_file
          libaws_lc_sys-2799e0ca1159a8ce.rlib(file.c.obj) : error LNK2019: unresolved external symbol __imp_fwrite referenced in function file_write
          libaws_lc_sys-2799e0ca1159a8ce.rlib(file.c.obj) : error LNK2019: unresolved external symbol __imp_fread referenced in function file_read
          libaws_lc_sys-2799e0ca1159a8ce.rlib(file.c.obj) : error LNK2019: unresolved external symbol __imp_ferror referenced in function file_read
          libaws_lc_sys-2799e0ca1159a8ce.rlib(file.c.obj) : error LNK2019: unresolved external symbol __imp_fgets referenced in function file_gets
          libaws_lc_sys-2799e0ca1159a8ce.rlib(file.c.obj) : error LNK2019: unresolved external symbol __imp_fseek referenced in function file_ctrl
          libaws_lc_sys-2799e0ca1159a8ce.rlib(file.c.obj) : error LNK2019: unresolved external symbol __imp_feof referenced in function file_ctrl
          libaws_lc_sys-2799e0ca1159a8ce.rlib(file.c.obj) : error LNK2019: unresolved external symbol __imp_ftell referenced in function file_ctrl
          libaws_lc_sys-2799e0ca1159a8ce.rlib(file.c.obj) : error LNK2019: unresolved external symbol __imp__setmode referenced in function file_ctrl
          oldnames.lib(strdup.obi) : error LNK2001: unresolved external symbol __imp__strdup
          D:\a\rustup\rustup\target\aarch64-pc-windows-msvc\debug\deps\rustls_platform_verifier-824047c6ba53f86f.dll : fatal error LNK1120: 18 unresolved externals
          
error: could not compile `rustls-platform-verifier` (lib) due to 1 previous error

You can also go to https://github.com/rust-lang/rustup/actions/runs/9624188283/job/26547561849 for the full CI log.

@complexspaces
Copy link
Collaborator

Hi there @rami3l. This looks like an error with aws-lc-rs, which is the default cryptography provider for rustls in the most recent versions but not rustls-platform-verifier. My thought process here is the following:

  • The logs you linked are full of undefined C symbol errors coming from the libaws_lc_sys-2799e0ca1159a8ce.rlib static library.
  • 1Password, within the last month, has successfully built rustls-platform-verifer for aarch64-pc-windows-msvc using the ring cryptography backend. It was shipped as part of an ARM64 Windows alpha release.

It may be worth trying to activate the ring backend feature of rustls in rustup's dependency tree to see if the issue goes away.

@ctz
Copy link
Member

ctz commented Jun 24, 2024

Does this happen with just rustls+aws-lc-rs, or is rustls-platform-verifier also required to reproduce the failure?

@complexspaces
Copy link
Collaborator

complexspaces commented Jun 24, 2024

I was able to compile and run the tests for rustls-platform-verifier in an ARM64 Windows 11 VM with the aws_lc_rs backend earlier today. The steps I took to setup the environment were:

  • Installed the latest CMake from their website
  • Installed the latest Ninja from GitHub releases
  • Download the latest Visual Studio 2022 Tools installer
  • Installed these components:
    • Windows 11 SDK
    • MSVC v143 C++ ARM64 build tools

I then:

  • Edited rustls-platform-verifier's main branch to use aws_lc_rs everywhere ring currently is
  • Ran cargo test.

With this setup, I don't get the errors you reported FWIW. @ctz mentioned this in the project Discord but it looks like there isn't a compatible ucrt available to your build since all the missing symbols should be coming from it. I saw the VS installer install a ARM64 ucrt implementation, so maybe that's part of what's missing?

@rami3l
Copy link
Contributor Author

rami3l commented Jun 25, 2024

I saw the VS installer install a ARM64 ucrt implementation, so maybe that's part of what's missing?

@complexspaces Thanks! We're doing cross compilation (since we don't have access to the ARM64 Windows runners yet) so that could very possibly be the case. I will definitely investigate further into this one.

If I use the ring backend then the problem is indeed gone, see rust-lang/rustup#3903. However we are inclined to using aws-lc for the moment due to rust-lang/rustup#3820 even if that means a whole lot more CI config 😢

@djc
Copy link
Member

djc commented Jun 25, 2024

Also looks like #102 might be relevant here.

@cpu
Copy link
Member

cpu commented Jun 26, 2024

Does this happen with just rustls+aws-lc-rs, or is rustls-platform-verifier also required to reproduce the failure?

@rami3l Can you weigh in on this aspect w.r.t your cross compilation experience? Is it specific to adding rustls-platform-verifier into the mix?

@rami3l
Copy link
Contributor Author

rami3l commented Jun 26, 2024

Does this happen with just rustls+aws-lc-rs, or is rustls-platform-verifier also required to reproduce the failure?

@rami3l Can you weigh in on this aspect w.r.t your cross compilation experience? Is it specific to adding rustls-platform-verifier into the mix?

@cpu I'm not sure... Now that rustls-platform-verifier has been included into Rustup the only way to know would be temporarily reverting it in another branch and trigger the CI, however I'm a bit tired handling all this regarding rustls right now... I'll ping you back when I'm ready to give this another try. Sorry 🙇‍♀️

@cpu
Copy link
Member

cpu commented Jun 26, 2024

Understood! Thanks for your help :-)

If myself or someone else has time to set up a similar cross-compilation environment it would be helpful to separate whether it's an issue with this repo, or rustls+aws-lc-rs generally. If it's the latter I think working with the aws-lc-rs upstream would be the next step (IME they seem quite responsive w.r.t build issues). If it's the former we should do more investigation here.

@rami3l
Copy link
Contributor Author

rami3l commented Jun 28, 2024

Understood! Thanks for your help :-)

If myself or someone else has time to set up a similar cross-compilation environment it would be helpful to separate whether it's an issue with this repo, or rustls+aws-lc-rs generally. If it's the latter I think working with the aws-lc-rs upstream would be the next step (IME they seem quite responsive w.r.t build issues). If it's the former we should do more investigation here.

@complexspaces @cpu Just made another test PR at rust-lang/rustup#3917. Looks like aws-lc is the origin of this issue this time. I think it's reasonable to transfer the issue to aws/aws-lc-rs#453.

Thanks anyway everyone, and especially for your test in #101 (comment)!

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

No branches or pull requests

5 participants