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

Windows build fails in CI: blake3_sse41_x86-64_windows_msvc.o(2) : fatal error A1009:line too long #298

Closed
twitu opened this issue Apr 1, 2023 · 3 comments

Comments

@twitu
Copy link

twitu commented Apr 1, 2023

nautechsystems/nautilus_trader#997 introduces a blake3 dependency in nautilus_trader via datafusion. blake3 failes to compile for x86_64-pc-windows-msvc. Below are detailed logs.

The fatal error is because of an extra extra long line in the object file. I didn't find similar problems in issues. Do you have any suggestions on how to fix it?

 error: failed to run custom build command for `blake3 v1.3.3`

Caused by:
  process didn't exit successfully: `D:\a\nautilus_trader\nautilus_trader\nautilus_core\target\debug\build\blake3-b4598462dcc7d54b\build-script-build` (exit code: 1)
  --- stdout
  cargo:rerun-if-env-changed=CARGO_FEATURE_PURE
  cargo:rerun-if-env-changed=CARGO_FEATURE_NO_NEON
  TARGET = Some("x86_64-pc-windows-msvc")
  HOST = Some("x86_64-pc-windows-msvc")
  cargo:rerun-if-env-changed=CC_x86_64-pc-windows-msvc
  CC_x86_64-pc-windows-msvc = None
  cargo:rerun-if-env-changed=CC_x86_64_pc_windows_msvc
  CC_x86_64_pc_windows_msvc = None
  cargo:rerun-if-env-changed=HOST_CC
  HOST_CC = None
  cargo:rerun-if-env-changed=CC
  CC = Some("clang")
  cargo:rerun-if-env-changed=CFLAGS_x86_64-pc-windows-msvc
  CFLAGS_x86_64-pc-windows-msvc = None
  cargo:rerun-if-env-changed=CFLAGS_x86_64_pc_windows_msvc
  CFLAGS_x86_64_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
  OPT_LEVEL = Some("0")
  cargo:rerun-if-env-changed=CC_x86_64-pc-windows-msvc
  CC_x86_64-pc-windows-msvc = None
  cargo:rerun-if-env-changed=CC_x86_64_pc_windows_msvc
  CC_x86_64_pc_windows_msvc = None
  cargo:rerun-if-env-changed=HOST_CC
  HOST_CC = None
  cargo:rerun-if-env-changed=CC
  CC = Some("clang")
  cargo:rerun-if-env-changed=CFLAGS_x86_64-pc-windows-msvc
  CFLAGS_x86_64-pc-windows-msvc = None
  cargo:rerun-if-env-changed=CFLAGS_x86_64_pc_windows_msvc
  CFLAGS_x86_64_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
  DEBUG = Some("false")
  cargo:warning=The C compiler "clang" does not support /arch:AVX512.
  cargo:rerun-if-env-changed=BLAKE3_CI
  cargo:rerun-if-env-changed=CARGO_FEATURE_PREFER_INTRINSICS
  cargo:rerun-if-env-changed=CARGO_FEATURE_PURE
  cargo:rustc-cfg=blake3_sse2_ffi
  cargo:rustc-cfg=blake3_sse41_ffi
  cargo:rustc-cfg=blake3_avx2_ffi
  TARGET = Some("x86_64-pc-windows-msvc")
  OPT_LEVEL = Some("0")
  HOST = Some("x86_64-pc-windows-msvc")
  cargo:rerun-if-env-changed=CC_x86_64-pc-windows-msvc
  CC_x86_64-pc-windows-msvc = None
  cargo:rerun-if-env-changed=CC_x86_64_pc_windows_msvc
  CC_x86_64_pc_windows_msvc = None
  cargo:rerun-if-env-changed=HOST_CC
  HOST_CC = None
  cargo:rerun-if-env-changed=CC
  CC = Some("clang")
  cargo:rerun-if-env-changed=CFLAGS_x86_64-pc-windows-msvc
  CFLAGS_x86_64-pc-windows-msvc = None
  cargo:rerun-if-env-changed=CFLAGS_x86_64_pc_windows_msvc
  CFLAGS_x86_64_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
  DEBUG = Some("false")
  running: "C:\\Program Files\\Microsoft Visual Studio\\2022\\Enterprise\\VC\\Tools\\MSVC\\14.35.32215\\bin\\HostX64\\x64\\ml64.exe" "-nologo" "-o" "D:\\a\\nautilus_trader\\nautilus_trader\\nautilus_core\\target\\debug\\build\\blake3-cf014bd07e6a332a\\out\\c/blake3_sse2_x86-64_windows_msvc.o" "-c" "c/blake3_sse2_x86-64_windows_msvc.asm"
  MASM : warning A4018:invalid command-line option : -o
   Assembling: D:\a\nautilus_trader\nautilus_trader\nautilus_core\target\debug\build\blake3-cf014bd07e6a332a\out\c/blake3_sse2_x86-64_windows_msvc.o
  D:\a\nautilus_trader\nautilus_trader\nautilus_core\target\debug\build\blake3-cf014bd07e6a332a\out\c/blake3_sse2_x86-64_windows_msvc.o(1) : error A2044:invalid character in file
  D:\a\nautilus_trader\nautilus_trader\nautilus_core\target\debug\build\blake3-cf014bd07e6a332a\out\c/blake3_sse2_x86-64_windows_msvc.o(1) : fatal error A1009:line too long
  exit code: 1
  running: "C:\\Program Files\\Microsoft Visual Studio\\2022\\Enterprise\\VC\\Tools\\MSVC\\14.35.32215\\bin\\HostX64\\x64\\ml64.exe" "-nologo" "-o" "D:\\a\\nautilus_trader\\nautilus_trader\\nautilus_core\\target\\debug\\build\\blake3-cf014bd07e6a332a\\out\\c/blake3_sse41_x86-64_windows_msvc.o" "-c" "c/blake3_sse41_x86-64_windows_msvc.asm"
  MASM : warning A4018:invalid command-line option : -o
   Assembling: D:\a\nautilus_trader\nautilus_trader\nautilus_core\target\debug\build\blake3-cf014bd07e6a332a\out\c/blake3_sse41_x86-64_windows_msvc.o
  D:\a\nautilus_trader\nautilus_trader\nautilus_core\target\debug\build\blake3-cf014bd07e6a332a\out\c/blake3_sse41_x86-64_windows_msvc.o(1) : error A2044:invalid character in file
  D:\a\nautilus_trader\nautilus_trader\nautilus_core\target\debug\build\blake3-cf014bd07e6a332a\out\c/blake3_sse41_x86-64_windows_msvc.o(2) : error A2044:invalid character in file
  D:\a\nautilus_trader\nautilus_trader\nautilus_core\target\debug\build\blake3-cf014bd07e6a332a\out\c/blake3_sse41_x86-64_windows_msvc.o(2) : fatal error A1009:line too long
  exit code: 1

  --- stderr


  error occurred: Command "C:\\Program Files\\Microsoft Visual Studio\\2022\\Enterprise\\VC\\Tools\\MSVC\\14.35.32215\\bin\\HostX64\\x64\\ml64.exe" "-nologo" "-o" "D:\\a\\nautilus_trader\\nautilus_trader\\nautilus_core\\target\\debug\\build\\blake3-cf014bd07e6a332a\\out\\c/blake3_sse2_x86-64_windows_msvc.o" "-c" "c/blake3_sse2_x86-64_windows_msvc.asm" with args "ml64.exe" did not execute successfully (status code exit code: 1).
@sneves
Copy link
Collaborator

sneves commented Apr 1, 2023

It looks like whatever is calling MASM is using -o to specify the output file instead of /Fo. With -o going unrecognized, it attempts to parse the .o file instead.

@twitu
Copy link
Author

twitu commented Apr 2, 2023

Hmm nautilus isn't directly running a build script for blake3. It's introduced as a dependency in datafusion specifically the datafusion/physical-expr crate. I'll ask there. I'll keep this issue open for now and update it according to the reply.

@twitu
Copy link
Author

twitu commented Apr 26, 2023

For now we've worked around this issue by turning off feature flags that include blake3 in the build. So closing this issue.

@twitu twitu closed this as completed Apr 26, 2023
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

2 participants