(Cross-posting from awslabs/aws-sdk-rust#1298 as requested.)
Describe the bug
Compiling a minimal Rust CLI on Windows 10 using the GNU chain, no actual AWS calls, but only a dependency to aws-config, results in:
*** No rule to make target 'aws-lc/crypto/CMakeFiles/crypto_objects.dir/chacha/chacha-x86_64.asm.obj', needed by 'artifacts/libaws_lc_0_29_0_crypto.a'.
I have a simple Rust CLI on Windows 10 using the GNU toolchain. I have installed MSYS2 (UCRT64) and installed the toolchain:
pacman -S --needed base-devel mingw-w64-ucrt-x86_64-toolchain
I added the appropriate MSYS2 bin folder to my PATH.
I added the following to my Cargo.toml file:
[dependencies]
aws-config = { version = "1.6.3", features = ["behavior-version-latest"] }
Regression Issue
Expected Behavior
When I run cargo build, I expect the build to be successful.
Current Behavior
…
CMAKE = Some("cmake")
running: "cmake" "…\\.cargo\\registry\\src\\index.crates.io-1949cf8c6b5b557f\\aws-lc-sys-0.29.0" "-G" "MinGW Makefiles" "-DBUILD_SHARED_LIBS=0" "-DBORINGSSL_PREFIX=aws_lc_0_29_0_" "-DBORINGSSL_PREFIX_HEADERS=C:\\Users\\garret\\.cargo\\registry\\src\\index.crates.io-1949cf8c6b5b557f\\aws-lc-sys-0.29.0\\generated-include" "-DBUILD_TESTING=OFF" "-DBUILD_TOOL=OFF" "-DBUILD_LIBSSL=OFF"
"-DDISABLE_PERL=ON" "-DDISABLE_GO=ON" "-DCMAKE_C_STANDARD=11" "-DCMAKE_ASM_NASM_COMPILER=…/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/aws-lc-sys-0.29.0/builder/prebuilt-nasm.bat" "-DCMAKE_ASM_NASM_COMPILE_OPTIONS_MSVC_RUNTIME_LIBRARY_MultiThreaded=" "-DCMAKE_ASM_NASM_COMPILE_OPTIONS_MSVC_RUNTIME_LIBRARY_MultiThreadedDLL=" "-DCMAKE_ASM_NASM_COMPILE_OPTIONS_MSVC_RUNTIME_LIBRARY_MultiThreadedDebug=" "-DCMAKE_ASM_NASM_COMPILE_OPTIONS_MSVC_RUNTIME_LIBRARY_MultiThreadedDebugDLL=" "-DCMAKE_ASM_NASM_COMPILE_OPTIONS_MSVC_DEBUG_INFORMATION_FORMAT_ProgramDatabase=" "-DCMAKE_INSTALL_PREFIX=…\\target\\debug\\build\\aws-lc-sys-abca60e72c229f16\\out" "-DCMAKE_C_FLAGS= -ffunction-sections -fdata-sections -m64" "-DCMAKE_CXX_FLAGS= -ffunction-sections -fdata-sections -m64" "-DCMAKE_ASM_FLAGS= -ffunction-sections -fdata-sections -m64" "-DCMAKE_BUILD_TYPE=Debug" "--no-warn-unused-cli"
Not searching for unused variables given on the command line.
-- Go not found. Disabling some code generation and using pre-generated code in generated-src/
-- Perl not found. Disabling some code generation and using pre-generated code in generated-src/
-- Prefix build configured: performing build using prefix "aws_lc_0_29_0_" and headers path "…\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\aws-lc-sys-0.29.0\generated-include"
-- Setting CMAKE_C_STANDARD=11
-- stdalign_check.c probe is positive, enabling AWS_LC_STDALIGN_AVAILABLE
-- builtin_swap_check.c probe is positive, enabling AWS_LC_BUILTIN_SWAP_SUPPORTED
-- Configuring done (1.2s)
-- Generating done (0.3s)
-- Build files have been written to: …/target/debug/build/aws-lc-sys-abca60e72c229f16/out/build running: "cmake" "--build" "…\\target\\debug\\build\\aws-lc-sys-abca60e72c229f16\\out\\build" "--target" "install" "--config" "Debug" "--parallel" "8"
[ 0%] Built target boringssl_prefix_symbols
[ 1%] Building ASM_NASM object aws-lc/crypto/fipsmodule/CMakeFiles/fipsmodule.dir/aesni-gcm-avx512.asm.obj
[ 1%] Building ASM_NASM object aws-lc/crypto/fipsmodule/CMakeFiles/fipsmodule.dir/aesni-gcm-x86_64.asm.obj
[ 1%] Building ASM_NASM object aws-lc/crypto/fipsmodule/CMakeFiles/fipsmodule.dir/ghash-ssse3-x86_64.asm.obj
[ 2%] Building ASM_NASM object aws-lc/crypto/fipsmodule/CMakeFiles/fipsmodule.dir/aesni-xts-avx512.asm.obj
[ 1%] Building ASM_NASM object aws-lc/crypto/fipsmodule/CMakeFiles/fipsmodule.dir/aesni-x86_64.asm.obj
[ 2%] Building ASM_NASM object aws-lc/crypto/fipsmodule/CMakeFiles/fipsmodule.dir/md5-x86_64.asm.obj
[ 3%] Building ASM_NASM object aws-lc/crypto/fipsmodule/CMakeFiles/fipsmodule.dir/ghash-x86_64.asm.obj
The system cannot find the file specified.
The system cannot find the file specified.
The system cannot find the file specified.
The system cannot find the file specified.
[ 3%] Building ASM_NASM object aws-lc/crypto/CMakeFiles/crypto_objects.dir/chacha/chacha-x86_64.asm.obj
The system cannot find the file specified.
The system cannot find the file specified.
The system cannot find the file specified.
[ 4%] Building ASM_NASM object aws-lc/crypto/CMakeFiles/crypto_objects.dir/cipher_extra/chacha20_poly1305_x86_64.asm.obj
[ 5%] Building ASM_NASM object aws-lc/crypto/fipsmodule/CMakeFiles/fipsmodule.dir/p256_beeu-x86_64-asm.asm.obj
[ 5%] Building ASM_NASM object aws-lc/crypto/fipsmodule/CMakeFiles/fipsmodule.dir/p256-x86_64-asm.asm.obj
[ 5%] Building ASM_NASM object aws-lc/crypto/fipsmodule/CMakeFiles/fipsmodule.dir/rdrand-x86_64.asm.obj
[ 5%] Building ASM_NASM object aws-lc/crypto/fipsmodule/CMakeFiles/fipsmodule.dir/rsaz-avx2.asm.obj
[ 6%] Building ASM_NASM object aws-lc/crypto/fipsmodule/CMakeFiles/fipsmodule.dir/rsaz-2k-avx512.asm.obj
[ 6%] Building ASM_NASM object aws-lc/crypto/fipsmodule/CMakeFiles/fipsmodule.dir/rsaz-3k-avx512.asm.obj
The system cannot find the file specified.
The system cannot find the file specified.
[ 6%] Building ASM_NASM object aws-lc/crypto/CMakeFiles/crypto_objects.dir/cipher_extra/aes128gcmsiv-x86_64.asm.obj
[ 7%] Building ASM_NASM object aws-lc/crypto/CMakeFiles/crypto_objects.dir/cipher_extra/aesni-sha1-x86_64.asm.obj
The system cannot find the file specified.
The system cannot find the file specified.
The system cannot find the file specified.
[ 7%] Building ASM_NASM object aws-lc/crypto/CMakeFiles/crypto_objects.dir/cipher_extra/aesni-sha256-x86_64.asm.obj
The system cannot find the file specified.
The system cannot find the file specified.
The system cannot find the file specified.
[ 7%] Building ASM_NASM object aws-lc/crypto/CMakeFiles/crypto_objects.dir/test/trampoline-x86_64.asm.obj
The system cannot find the file specified.
The system cannot find the file specified.
The system cannot find the file specified.
[ 8%] Building ASM_NASM object aws-lc/crypto/fipsmodule/CMakeFiles/fipsmodule.dir/rsaz-4k-avx512.asm.obj
[ 7%] Building ASM_NASM object aws-lc/crypto/fipsmodule/CMakeFiles/fipsmodule.dir/sha1-x86_64.asm.obj
The system cannot find the file specified.
[ 8%] Building ASM_NASM object aws-lc/crypto/fipsmodule/CMakeFiles/fipsmodule.dir/sha256-x86_64.asm.obj
[ 9%] Building ASM_NASM object aws-lc/crypto/fipsmodule/CMakeFiles/fipsmodule.dir/vpaes-x86_64.asm.obj
[ 9%] Building ASM_NASM object aws-lc/crypto/fipsmodule/CMakeFiles/fipsmodule.dir/sha512-x86_64.asm.obj
[ 9%] Building ASM_NASM object aws-lc/crypto/fipsmodule/CMakeFiles/fipsmodule.dir/x86_64-mont5.asm.obj
[ 97%] Built target crypto_objects
The system cannot find the file specified.
The system cannot find the file specified.
The system cannot find the file specified.
The system cannot find the file specified.
The system cannot find the file specified.
[ 98%] Building ASM_NASM object aws-lc/crypto/fipsmodule/CMakeFiles/fipsmodule.dir/x86_64-mont.asm.obj
The system cannot find the file specified.
The system cannot find the file specified.
[ 99%] Built target fipsmodule
--- stderr
CMake Deprecation Warning at CMakeLists.txt:10 (cmake_policy):
The OLD behavior for policy CMP0091 will be removed from a future version
of CMake.
The cmake-policies(7) manual explains that the OLD behaviors of all
policies are deprecated and that a policy should be set to OLD only under
specific short-term circumstances. Projects should be ported to the NEW
behavior and not rely on setting a policy to OLD.
CMake Deprecation Warning at aws-lc/CMakeLists.txt:1 (cmake_minimum_required):
Compatibility with CMake < 3.10 will be removed from a future version of
CMake.
Update the VERSION argument <min> value. Or, use the <min>...<max> syntax
to tell CMake that the project requires at least <min> but has been updated
to work with policies introduced by <max> or earlier.
Copying platform assembly files from …/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/aws-lc-sys-0.29.0/aws-lc/generated-src/win-x86_64/crypto/ to …/target/debug/build/aws-lc-sys-abca60e72c229f16/out/build/aws-lc/crypto
mingw32-make[2]: *** No rule to make target 'aws-lc/crypto/CMakeFiles/crypto_objects.dir/chacha/chacha-x86_64.asm.obj', needed by 'artifacts/libaws_lc_0_29_0_crypto.a'. Stop.
mingw32-make[1]: *** [CMakeFiles\Makefile2:272: aws-lc/crypto/CMakeFiles/crypto.dir/all] Error 2
mingw32-make: *** [Makefile:135: all] Error 2
thread 'main' panicked at …\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\cmake-0.1.54\src\lib.rs:1119:5:
command did not execute successfully, got: exit code: 2
build script failed, must exit now
stack backtrace:
0: 0x7ff72669f339 - <std::sys::backtrace::BacktraceLock::print::DisplayBacktrace as core::fmt::Display>::fmt::h13cebbf0a822bea5
at /rustc/17067e9ac6d7ecb70e50f92c1944e545188d2359/library\std\src\..\..\backtrace\src\backtrace/win64.rs:85:14
1: 0x7ff7266ecc1b - core::fmt::write::h94940042d5c7da6d
at /rustc/17067e9ac6d7ecb70e50f92c1944e545188d2359/library\core\src\fmt/rt.rs:184:76
2: 0x7ff7266956a2 - std::io::Write::write_fmt::h93705b8c9f23b90a
at /rustc/17067e9ac6d7ecb70e50f92c1944e545188d2359/library\std\src\io/mod.rs:639:11
3: 0x7ff72669f1c5 - std::sys::backtrace::BacktraceLock::print::h2b38bc5fd4b77434
at /rustc/17067e9ac6d7ecb70e50f92c1944e545188d2359/library\std\src\sys/backtrace.rs:42:9
4: 0x7ff7266a2e9f - std::panicking::default_hook::{{closure}}::ha2d4ce74f3f26367
at /rustc/17067e9ac6d7ecb70e50f92c1944e545188d2359/library\std\src/panicking.rs:300:22
5: 0x7ff7266a2cb6 - std::panicking::default_hook::hb9221f120aee5781
at /rustc/17067e9ac6d7ecb70e50f92c1944e545188d2359/library\std\src/panicking.rs:327:9
6: 0x7ff7266a3d27 - std::panicking::rust_panic_with_hook::h7fda7456ed81e463
at /rustc/17067e9ac6d7ecb70e50f92c1944e545188d2359/library\std\src/panicking.rs:833:13
7: 0x7ff7266a3ab2 - std::panicking::begin_panic_handler::{{closure}}::hfebdd5474cadd278
at /rustc/17067e9ac6d7ecb70e50f92c1944e545188d2359/library\std\src/panicking.rs:706:13
8: 0x7ff72669fd3f - std::sys::backtrace::__rust_end_short_backtrace::hf838306289a81c4b
at /rustc/17067e9ac6d7ecb70e50f92c1944e545188d2359/library\std\src\sys/backtrace.rs:168:18
9: 0x7ff7266a372e - __rustc[95feac21a9532783]::rust_begin_unwind
at /rustc/17067e9ac6d7ecb70e50f92c1944e545188d2359/library\std\src/panicking.rs:697:5
10: 0x7ff7266e8d71 - core::panicking::panic_fmt::hd84b33945305a096
at /rustc/17067e9ac6d7ecb70e50f92c1944e545188d2359/library\core\src/panicking.rs:75:14
11: 0x7ff726598b6e - cmake::fail::h5c05e50f20234e64
12: 0x7ff7265983cd - cmake::run::ha56080b5833e878c
13: 0x7ff726594eca - cmake::Config::build::hdc74fb2716889163
14: 0x7ff726568b8f - build_script_main::cmake_builder::CmakeBuilder::build_rust_wrapper::h7d9baf9fab0f6227
15: 0x7ff7265690a8 - <build_script_main::cmake_builder::CmakeBuilder as build_script_main::Builder>::build::h36846b4046c67cce
16: 0x7ff726585501 - build_script_main::main::h33ed12f081101590
17: 0x7ff72656b846 - core::ops::function::FnOnce::call_once::h6292e004b6ee300d
18: 0x7ff726571f79 - std::sys::backtrace::__rust_begin_short_backtrace::h30c38e3511afd134
19: 0x7ff72657118c - std::rt::lang_start::{{closure}}::hf061af3f9770b880
20: 0x7ff726686442 - std::rt::lang_start_internal::h085a0f3f6b34170b
at /rustc/17067e9ac6d7ecb70e50f92c1944e545188d2359/library\core\src\ops/function.rs:284:13
21: 0x7ff726571177 - std::rt::lang_start::hcd3e792c41a25206
22: 0x7ff72658871f - main
23: 0x7ff726561319 - __tmainCRTStartup
at C:\M\B\src\build-UCRT64\C:/M/B/src/mingw-w64/mingw-w64-crt/crt\crtexe.c:266:15
24: 0x7ff726561426 - mainCRTStartup
at C:\M\B\src\build-UCRT64\C:/M/B/src/mingw-w64/mingw-w64-crt/crt\crtexe.c:186:9
25: 0x7ffe9ae27374 - <unknown>
26: 0x7ffe9c5bcc91 - <unknown>
Reproduction Steps
- Install Rust on Windows.
- Switch to the GNU toolchain.
- Download and install MSYS2, e.g. to
C:\msys64.
- Install the MSYS toolchain:
pacman -S --needed base-devel mingw-w64-ucrt-x86_64-toolchain
- Add the
aws-config = { version = "1.6.3", features = ["behavior-version-latest"] } dependency to the Cargo.toml of an existing Rust project.
- Run
cargo build.
Possible Solution
No response
Additional Information/Context
No response
Version
├── aws-config v1.6.3
│ ├── aws-credential-types v1.2.3
│ │ ├── aws-smithy-async v1.2.5
│ │ ├── aws-smithy-runtime-api v1.8.0
│ │ │ ├── aws-smithy-async v1.2.5 (*)
│ │ │ ├── aws-smithy-types v1.3.1
│ │ ├── aws-smithy-types v1.3.1 (*)
│ ├── aws-runtime v1.5.7
│ │ ├── aws-credential-types v1.2.3 (*)
│ │ ├── aws-sigv4 v1.3.2
│ │ │ ├── aws-credential-types v1.2.3 (*)
│ │ │ ├── aws-smithy-http v0.62.1
│ │ │ │ ├── aws-smithy-runtime-api v1.8.0 (*)
│ │ │ │ ├── aws-smithy-types v1.3.1 (*)
│ │ │ ├── aws-smithy-runtime-api v1.8.0 (*)
│ │ │ ├── aws-smithy-types v1.3.1 (*)
│ │ ├── aws-smithy-async v1.2.5 (*)
│ │ ├── aws-smithy-http v0.62.1 (*)
│ │ ├── aws-smithy-runtime v1.8.3
│ │ │ ├── aws-smithy-async v1.2.5 (*)
│ │ │ ├── aws-smithy-http v0.62.1 (*)
│ │ │ ├── aws-smithy-http-client v1.0.2
│ │ │ │ ├── aws-smithy-async v1.2.5 (*)
│ │ │ │ ├── aws-smithy-runtime-api v1.8.0 (*)
│ │ │ │ ├── aws-smithy-types v1.3.1 (*)
│ │ │ │ │ │ ├── aws-lc-rs v1.13.1
│ │ │ │ │ │ │ ├── aws-lc-sys v0.29.0
│ │ │ │ │ │ │ ├── aws-lc-rs v1.13.1 (*)
│ │ │ ├── aws-smithy-observability v0.1.3
│ │ │ │ └── aws-smithy-runtime-api v1.8.0 (*)
│ │ │ ├── aws-smithy-runtime-api v1.8.0 (*)
│ │ │ ├── aws-smithy-types v1.3.1 (*)
│ │ ├── aws-smithy-runtime-api v1.8.0 (*)
│ │ ├── aws-smithy-types v1.3.1 (*)
│ │ ├── aws-types v1.3.7
│ │ │ ├── aws-credential-types v1.2.3 (*)
│ │ │ ├── aws-smithy-async v1.2.5 (*)
│ │ │ ├── aws-smithy-runtime-api v1.8.0 (*)
│ │ │ ├── aws-smithy-types v1.3.1 (*)
│ ├── aws-sdk-sso v1.70.0
│ │ ├── aws-credential-types v1.2.3 (*)
│ │ ├── aws-runtime v1.5.7 (*)
│ │ ├── aws-smithy-async v1.2.5 (*)
│ │ ├── aws-smithy-http v0.62.1 (*)
│ │ ├── aws-smithy-json v0.61.3
│ │ │ └── aws-smithy-types v1.3.1 (*)
│ │ ├── aws-smithy-runtime v1.8.3 (*)
│ │ ├── aws-smithy-runtime-api v1.8.0 (*)
│ │ ├── aws-smithy-types v1.3.1 (*)
│ │ ├── aws-types v1.3.7 (*)
│ ├── aws-sdk-ssooidc v1.71.0
│ │ ├── aws-credential-types v1.2.3 (*)
│ │ ├── aws-runtime v1.5.7 (*)
│ │ ├── aws-smithy-async v1.2.5 (*)
│ │ ├── aws-smithy-http v0.62.1 (*)
│ │ ├── aws-smithy-json v0.61.3 (*)
│ │ ├── aws-smithy-runtime v1.8.3 (*)
│ │ ├── aws-smithy-runtime-api v1.8.0 (*)
│ │ ├── aws-smithy-types v1.3.1 (*)
│ │ ├── aws-types v1.3.7 (*)
│ ├── aws-sdk-sts v1.71.0
│ │ ├── aws-credential-types v1.2.3 (*)
│ │ ├── aws-runtime v1.5.7 (*)
│ │ ├── aws-smithy-async v1.2.5 (*)
│ │ ├── aws-smithy-http v0.62.1 (*)
│ │ ├── aws-smithy-json v0.61.3 (*)
│ │ ├── aws-smithy-query v0.60.7
│ │ │ ├── aws-smithy-types v1.3.1 (*)
│ │ ├── aws-smithy-runtime v1.8.3 (*)
│ │ ├── aws-smithy-runtime-api v1.8.0 (*)
│ │ ├── aws-smithy-types v1.3.1 (*)
│ │ ├── aws-smithy-xml v0.60.9
│ │ ├── aws-types v1.3.7 (*)
│ ├── aws-smithy-async v1.2.5 (*)
│ ├── aws-smithy-http v0.62.1 (*)
│ ├── aws-smithy-json v0.61.3 (*)
│ ├── aws-smithy-runtime v1.8.3 (*)
│ ├── aws-smithy-runtime-api v1.8.0 (*)
│ ├── aws-smithy-types v1.3.1 (*)
│ ├── aws-types v1.3.7 (*)
Environment details (OS name and version, etc.)
Windows 10
Logs
No response
(Cross-posting from awslabs/aws-sdk-rust#1298 as requested.)
Describe the bug
Compiling a minimal Rust CLI on Windows 10 using the GNU chain, no actual AWS calls, but only a dependency to
aws-config, results in:I have a simple Rust CLI on Windows 10 using the GNU toolchain. I have installed MSYS2 (UCRT64) and installed the toolchain:
I added the appropriate MSYS2
binfolder to myPATH.I added the following to my
Cargo.tomlfile:Regression Issue
Expected Behavior
When I run
cargo build, I expect the build to be successful.Current Behavior
Reproduction Steps
C:\msys64.aws-config = { version = "1.6.3", features = ["behavior-version-latest"] }dependency to theCargo.tomlof an existing Rust project.cargo build.Possible Solution
No response
Additional Information/Context
No response
Version
Environment details (OS name and version, etc.)
Windows 10
Logs
No response