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

Build failure when targeting x86_64-pc-windows-gnu and path contains spaces #616

Open
justsmth opened this issue Nov 25, 2024 · 1 comment
Labels
build problem Build failure

Comments

@justsmth
Copy link
Contributor

justsmth commented Nov 25, 2024

Problem:

When using the prebuilt NASM binaries and the path contains spaces, builds targeting x86_64-pc-windows-gnu fail.

Reported by @s-mayrh here.

Relevant details

AWS-LC for Rust versions or commit: [email protected]

System information:

  • CPU architecture: x86-64
  • CPU name: Intel Atom
  • OS: Windows 10
  • CMake: 3.31.0
  • Toolchain: stable-x86_64-pc-windows-gnu with MSYS2

Build log:

 Copying platform assembly files from C:/Users/User Name/.cargo/registry/src/index.crates.io-6f17d22bba15001f/aws-lc-sys-0.23.1/aws-lc/generated-src/win-x86_64/crypto/ to C:/Users/User Name/AppData/Local/Temp/cargo-installuzDzUy/release/build/aws-lc-sys-14bf4d230e867451/out/build/aws-lc/crypto
  Der Befehl "C:\Users\User" ist entweder falsch geschrieben oder
  konnte nicht gefunden werden. (Command misspelled or not found)
  make[2]: *** [aws-lc/crypto/fipsmodule/CMakeFiles/fipsmodule.dir/build.make:123: aws-lc/crypto/fipsmodule/CMakeFiles/fipsmodule.dir/aesni-gcm-avx512.asm.obj] Error 1
  make[2]: *** Waiting for unfinished jobs....
  Der Befehl "C:\Users\User" ist entweder falsch geschrieben oder
  konnte nicht gefunden werden. (Command misspelled or not found)
  make[2]: *** [aws-lc/crypto/fipsmodule/CMakeFiles/fipsmodule.dir/build.make:128: aws-lc/crypto/fipsmodule/CMakeFiles/fipsmodule.dir/aesni-gcm-x86_64.asm.obj] Error 1
  make[1]: *** [CMakeFiles/Makefile2:301: aws-lc/crypto/fipsmodule/CMakeFiles/fipsmodule.dir/all] Error 2
  make[1]: *** Waiting for unfinished jobs....
  Der Befehl "C:\Users\User" ist entweder falsch geschrieben oder
  konnte nicht gefunden werden. (Command misspelled or not found)
  make[2]: *** [aws-lc/crypto/CMakeFiles/crypto_objects.dir/build.make:3708: aws-lc/crypto/CMakeFiles/crypto_objects.dir/chacha/chacha-x86_64.asm.obj] Error 1
  make[2]: *** Waiting for unfinished jobs....
  Der Befehl "C:\Users\User" ist entweder falsch geschrieben oder
  konnte nicht gefunden werden. (Command misspelled or not found)
  make[2]: *** [aws-lc/crypto/CMakeFiles/crypto_objects.dir/build.make:3713: aws-lc/crypto/CMakeFiles/crypto_objects.dir/cipher_extra/chacha20_poly1305_x86_64.asm.obj] Error 1
  Der Befehl "C:\Users\User" ist entweder falsch geschrieben oder
  konnte nicht gefunden werden. (Command misspelled or not found)
  make[2]: *** [aws-lc/crypto/CMakeFiles/crypto_objects.dir/build.make:3718: aws-lc/crypto/CMakeFiles/crypto_objects.dir/cipher_extra/aes128gcmsiv-x86_64.asm.obj] Error 1
  make[1]: *** [CMakeFiles/Makefile2:237: aws-lc/crypto/CMakeFiles/crypto_objects.dir/all] Error 2
  make: *** [Makefile:136: all] Error 2
  thread 'main' panicked at C:\Users\User Name\.cargo\registry\src\index.crates.io-6f17d22bba15001f\cmake-0.1.51\src/lib.rs:1100:5:

  command did not execute successfully, got: exit code: 2

  build script failed, must exit now
@justsmth
Copy link
Contributor Author

I've dug into this some more. The failure only occurs when using the prebuilt NASM objects. This type of build invokes a batch script to retrieve the prebuilt objects. However, I think the build fails just before the script gets executed.

Here's the command and some output:

% AWS_LC_SYS_PREBUILT_NASM=1 cargo build --target x86_64-pc-windows-gnu
...
  Copying platform assembly files from C:/Users/Administrator/tmp/has some spaces/aws-lc-rs/aws-lc-sys/aws-lc/generated-src/win-x86_64/crypto/ to C:/Users/Administrator/tmp/has some spaces/aws-lc-rs/target/x86_64-pc-windows-gnu/debug/build/aws-lc-sys-3bcdfcf12c78d2e3/out/build/aws-lc/crypto
  'C:\Users\Administrator\tmp\has' is not recognized as an internal or external command,
  operable program or batch file.
  make[2]: *** [aws-lc/crypto/fipsmodule/CMakeFiles/fipsmodule.dir/build.make:117: aws-lc/crypto/fipsmodule/CMakeFiles/fipsmodule.dir/aesni-gcm-avx512.asm.obj] Error 1
  make[2]: *** Waiting for unfinished jobs....
...

Unless I'm reading this wrong, Make is choking on line 117 of build.make (the last line listed below):

aws-lc/crypto/fipsmodule/CMakeFiles/fipsmodule.dir/aesni-gcm-avx512.asm.obj: aws-lc/crypto/fipsmodule/aesni-gcm-avx512.asm
        @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green --progress-dir="/C/Users/Administrator/tmp/has some spaces/aws-lc-rs/target/x86_64-pc-windows-gnu/debug/build/aws-lc-sys-3bcdfcf12c78d2e3/out/build/CMakeFiles" --progress-num=$(CMAKE_PROGRESS_4) "Building ASM_NASM object aws-lc/crypto/fipsmodule/CMakeFiles/fipsmodule.dir/aesni-gcm-avx512.asm.obj"
        cd "/C/Users/Administrator/tmp/has some spaces/aws-lc-rs/target/x86_64-pc-windows-gnu/debug/build/aws-lc-sys-3bcdfcf12c78d2e3/out/build/aws-lc/crypto/fipsmodule" && "/C/Users/Administrator/tmp/has some spaces/aws-lc-rs/aws-lc-sys/builder/prebuilt-nasm.bat" $(ASM_NASM_DEFINES) $(ASM_NASM_INCLUDES) $(ASM_NASM_FLAGS) -f win64 -o CMakeFiles/fipsmodule.dir/aesni-gcm-avx512.asm.obj "/C/Users/Administrator/tmp/has some spaces/aws-lc-rs/target/x86_64-pc-windows-gnu/debug/build/aws-lc-sys-3bcdfcf12c78d2e3/out/build/aws-lc/crypto/fipsmodule/aesni-gcm-avx512.asm"

@justsmth justsmth added the build problem Build failure label Dec 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build problem Build failure
Projects
None yet
Development

No branches or pull requests

1 participant