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

[Bug]: fails to build ZLUDA on Windows 10, failed with exit code 101. #239

Open
VictoireWood opened this issue May 27, 2024 · 4 comments
Open

Comments

@VictoireWood
Copy link

VictoireWood commented May 27, 2024

I failed to build ZLUDA from source code on Windows 10.

Hardware

CPU: 13th Gen Intel(R) Core(TM) i7-13700KF 3.40 GHz

Graphics: AMD Radeon RX 6750 XT

Dependents

git version 2.44.0.windows.1

cmake version 3.29.3

Python 3.12.3

rustc 1.78.0 (9b00956e5 2024-04-29)

Visual Studio 2022

AMD Software: Adrenalin Edition version 24.5.1 (2024/5/8)

Ninja version 1.12.1

Debug Information

The original information in powershell:

(py312) PS D:\Environment\ZLUDA> cargo xtask
   Compiling proc-macro2 v1.0.70
   Compiling unicode-ident v1.0.12
   Compiling serde v1.0.193
   Compiling cc v1.0.83
   Compiling crc32fast v1.4.0
   Compiling semver v1.0.20
   Compiling cfg-if v1.0.0
   Compiling serde_json v1.0.108
   Compiling thiserror v1.0.51
   Compiling adler v1.0.2
   Compiling camino v1.1.6
   Compiling time-core v0.1.1
   Compiling ryu v1.0.16
   Compiling itoa v1.0.10
   Compiling byteorder v1.5.0
   Compiling time v0.3.23
   Compiling miniz_oxide v0.7.2
   Compiling cloudflare-zlib-sys v0.3.3
   Compiling quote v1.0.33
   Compiling syn v2.0.41
   Compiling serde_derive v1.0.193
   Compiling thiserror-impl v1.0.51
   Compiling flate2 v1.0.29
   Compiling zip v0.6.6
   Compiling argh_shared v0.1.12
   Compiling cargo-platform v0.1.5
   Compiling argh_derive v0.1.12
   Compiling cargo_metadata v0.17.0
   Compiling argh v0.1.12
   Compiling xtask v0.0.0 (D:\Environment\ZLUDA\xtask)
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 5.63s
     Running `target\debug\xtask.exe`
  Downloaded widestring v1.0.2
  Downloaded windows v0.48.0
  Downloaded 2 crates (11.9 MB) in 1.20s (largest was `windows` at 11.9 MB)
   Compiling jobserver v0.1.27
   Compiling version_check v0.9.4
   Compiling syn v1.0.109
   Compiling windows_x86_64_msvc v0.48.5
   Compiling pkg-config v0.3.29
   Compiling winapi v0.3.9
   Compiling vcpkg v0.2.15
   Compiling autocfg v1.1.0
   Compiling once_cell v1.19.0
   Compiling log v0.4.20
   Compiling libc v0.2.151
   Compiling zerocopy v0.7.32
   Compiling rustversion v1.0.14
   Compiling typenum v1.17.0
   Compiling allocator-api2 v0.2.16
   Compiling memchr v2.6.4
   Compiling bitflags v1.3.2
   Compiling smallvec v1.11.2
   Compiling unicode-xid v0.2.4
   Compiling either v1.9.0
   Compiling rustc-hash v1.1.0
   Compiling parking_lot_core v0.9.9
   Compiling hip_runtime-sys v0.0.0 (D:\Environment\ZLUDA\hip_runtime-sys)
   Compiling syn v2.0.41
   Compiling serde_json v1.0.108
   Compiling regex-syntax v0.8.2
   Compiling cc v1.0.83
   Compiling itertools v0.10.5
   Compiling scopeguard v1.2.0
   Compiling subtle v2.5.0
   Compiling crunchy v0.2.2
   Compiling tiny-keccak v2.0.2
   Compiling tinyvec_macros v0.1.1
   Compiling convert_case v0.5.0
   Compiling ahash v0.8.7
   Compiling generic-array v0.14.7
   Compiling proc-macro-error-attr v1.0.4
   Compiling lock_api v0.4.11
   Compiling proc-macro-error v1.0.4
   Compiling bit-vec v0.6.3
   Compiling windows-targets v0.48.5
   Compiling windows-sys v0.48.0
   Compiling aho-corasick v1.1.2
   Compiling equivalent v1.0.1
   Compiling siphasher v0.3.11
   Compiling tinyvec v1.6.0
   Compiling cmake v0.1.50
   Compiling phf_shared v0.10.0
   Compiling const_format_proc_macros v0.2.32
   Compiling precomputed-hash v0.1.1
   Compiling fallible-streaming-iterator v0.1.9
   Compiling libm v0.2.8
   Compiling fallible-iterator v0.2.0
   Compiling new_debug_unreachable v1.0.4
   Compiling plain v0.2.3
   Compiling anyhow v1.0.79
   Compiling fixedbitset v0.4.2
   Compiling cpufeatures v0.2.11
   Compiling unicode-normalization v0.1.22
   Compiling bit-set v0.5.3
   Compiling num-traits v0.2.17
   Compiling ena v0.14.2
   Compiling libloading v0.8.1
   Compiling is-terminal v0.4.9
   Compiling regex-syntax v0.7.5
   Compiling percent-encoding v2.3.1
   Compiling diff v0.1.13
   Compiling capnp v0.17.2
   Compiling regex-automata v0.4.3
   Compiling pico-args v0.5.0
   Compiling unicode-bidi v0.3.15
   Compiling time-core v0.1.1
   Compiling hashbrown v0.14.3
   Compiling paste v1.0.14
   Compiling time v0.3.23
   Compiling form_urlencoded v1.2.1
   Compiling cpp_demangle v0.3.5
   Compiling libsqlite3-sys v0.25.2
   Compiling libz-sys v1.1.15
   Compiling llvm-sys v150.1.2 (D:\Environment\ZLUDA\ext\llvm-sys.rs)
   Compiling libgit2-sys v0.14.2+1.5.1
   Compiling idna v0.5.0
   Compiling const_format v0.2.32
   Compiling parking_lot v0.12.1
   Compiling lz4-sys v1.9.4
   Compiling indexmap v2.1.0
   Compiling hashlink v0.8.4
   Compiling string_cache v0.8.7
   Compiling zluda_llvm v0.0.0 (D:\Environment\ZLUDA\zluda_llvm)
   Compiling cloudflare-zlib-sys v0.3.3
   Compiling detours-sys v0.1.2 (D:\Environment\ZLUDA\detours-sys)
   Compiling bitflags v2.4.1
   Compiling url v2.5.0
   Compiling proc-macro-hack v0.5.20+deprecated
   Compiling lazy_static v1.4.0
   Compiling petgraph v0.6.4
   Compiling blake3 v1.3.3
   Compiling memoffset v0.8.0
   Compiling serde_derive v1.0.193
   Compiling block-buffer v0.10.4
   Compiling crypto-common v0.1.6
   Compiling digest v0.10.7
   Compiling scroll_derive v0.11.1
   Compiling dirs-sys-next v0.1.2
   Compiling dirs-next v2.0.0
   Compiling thiserror-impl v1.0.51
   Compiling term v0.7.0
   Compiling regex v1.10.2
   Compiling sha2 v0.10.8
   Compiling vergen v7.5.1
   Compiling enum-iterator-derive v1.3.0
   Compiling lalrpop-util v0.20.0
   Compiling ascii-canvas v3.0.0
   Compiling thread-id v4.2.1
   Compiling lalrpop v0.20.0
   Compiling fastrand v2.0.1
   Compiling crossbeam-utils v0.8.17
   Compiling dirs-sys v0.3.7
   Compiling atiadlxx-sys v0.0.0 (D:\Environment\ZLUDA\atiadlxx-sys)
   Compiling half v1.8.2
   Compiling constant_time_eq v0.2.6
   Compiling tempfile v3.8.1
   Compiling embed-manifest v1.4.0
   Compiling arrayvec v0.7.4
   Compiling scroll v0.11.0
   Compiling arrayref v0.3.7
   Compiling dirs v4.0.0
   Compiling windows v0.48.0
   Compiling widestring v1.0.2
error: failed to run custom build command for `llvm-sys v150.1.2 (D:\Environment\ZLUDA\ext\llvm-sys.rs)`

Caused by:
  process didn't exit successfully: `D:\Environment\ZLUDA\target\debug\build\llvm-sys-1a7174db10c6a2fe\build-script-build` (exit code: 101)
  --- stdout
  cargo:rerun-if-changed=build.rs
  cargo:rerun-if-changed=D:\Environment\ZLUDA\ext\llvm-project\llvm
  cargo:rerun-if-changed=D:\Environment\ZLUDA\ext\llvm-sys.rs\build.cmake
  CMAKE_TOOLCHAIN_FILE_x86_64-pc-windows-msvc = None
  CMAKE_TOOLCHAIN_FILE_x86_64_pc_windows_msvc = None
  HOST_CMAKE_TOOLCHAIN_FILE = None
  CMAKE_TOOLCHAIN_FILE = None
  CMAKE_PREFIX_PATH_x86_64-pc-windows-msvc = None
  CMAKE_PREFIX_PATH_x86_64_pc_windows_msvc = None
  HOST_CMAKE_PREFIX_PATH = None
  CMAKE_PREFIX_PATH = None
  CMAKE_x86_64-pc-windows-msvc = None
  CMAKE_x86_64_pc_windows_msvc = None
  HOST_CMAKE = None
  CMAKE = None
  running: "cmake" "D:\\Environment\\ZLUDA\\ext\\llvm-project\\llvm" "-G" "Ninja" "-DLLVM_ENABLE_LIBXML2=OFF" "-DLLVM_ENABLE_ZLIB=OFF" "-DLLVM_ENABLE_ZSTD=OFF" "-DLLVM_ENABLE_CURL=OFF" "-DLLVM_ENABLE_HTTPLIB=OFF" "-DLLVM_ENABLE_LIBEDIT=OFF" "-DLLVM_ENABLE_TERMINFO=OFF" "-DLLVM_BUILD_TOOLS=OFF" "-DLLVM_TARGETS_TO_BUILD=" "-DLLVM_ENABLE_PROJECTS=" "-DCMAKE_PROJECT_INCLUDE_BEFORE=D:\\Environment\\ZLUDA\\ext\\llvm-sys.rs\\build.cmake" "-DCMAKE_INSTALL_PREFIX=D:\\Environment\\ZLUDA\\target\\debug\\build\\llvm-sys-3610a532cab24e0e\\out" "-DCMAKE_C_FLAGS= -nologo -MD -Brepro" "-DCMAKE_C_COMPILER=C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.40.33807/bin/HostX64/x64/cl.exe" "-DCMAKE_CXX_FLAGS= -nologo -MD -Brepro" "-DCMAKE_CXX_COMPILER=C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.40.33807/bin/HostX64/x64/cl.exe" "-DCMAKE_ASM_FLAGS= -nologo -MD -Brepro" "-DCMAKE_ASM_COMPILER=C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.40.33807/bin/HostX64/x64/cl.exe" "-DCMAKE_BUILD_TYPE=Debug"

  --- stderr
  CMake Error: The source directory "D:/Environment/ZLUDA/ext/llvm-project/llvm" does not exist.
  Specify --help for usage, or press the help button on the CMake GUI.
  thread 'main' panicked at C:\Users\stara\.cargo\registry\src\index.crates.io-6f17d22bba15001f\cmake-0.1.50\src\lib.rs:1098:5:

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

  build script failed, must exit now
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...
Error: "\"\\\\\\\\?\\\\C:\\\\Users\\\\stara\\\\.rustup\\\\toolchains\\\\stable-x86_64-pc-windows-msvc\\\\bin\\\\cargo.exe\" \"build\" \"--locked\" \"-p\" \"offline_compiler\" \"-p\" \"process_address_table\" \"-p\" \"zluda_api\" \"-p\" \"zluda_dump\" \"-p\" \"zluda_inject\" \"-p\" \"zluda_ml\" \"-p\" \"zluda_redirect\" \"-p\" \"zluda_lib\" failed with exit code 101"
error: process didn't exit successfully: `target\debug\xtask.exe` (exit code: 1)

Then I read Issue #76, I add .very_verbose(true) line below .always_configure(true) in zluda\ext\llvm-sys.rs\build.rs, then I use x64 Native Tools Command Prompt for VS 2022 to run the command cargo xtask. Sadly I don't have the zluda\target\release directory to find the cmake log file.

The debug information:


**********************************************************************
** Visual Studio 2022 Developer Command Prompt v17.10.0
** Copyright (c) 2022 Microsoft Corporation
**********************************************************************
[vcvarsall.bat] Environment initialized for: 'x64'

C:\Windows\System32>D:

D:\>cd D:\Environment\ZLUDA

D:\Environment\ZLUDA>cargo xtask
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.06s
     Running `target\debug\xtask.exe`
   Compiling llvm-sys v150.1.2 (D:\Environment\ZLUDA\ext\llvm-sys.rs)
   Compiling hip_common v0.0.0 (D:\Environment\ZLUDA\hip_common)
   Compiling argh v0.1.12
   Compiling num_enum v0.4.3
warning: `ID3D11Device` is ambiguous
   --> zluda_api\src\lib.rs:202:22
    |
202 |     _pDevice: *const ID3D11Device,
    |                      ^^^^^^^^^^^^ ambiguous name
    |
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
    = note: for more information, see issue #114095 <https://github.com/rust-lang/rust/issues/114095>
    = note: ambiguous because of multiple glob imports of a name in the same module
note: `ID3D11Device` could refer to the struct imported here
   --> zluda_api\src\lib.rs:11:5
    |
11  | use windows::Win32::Graphics::Direct3D11::*;
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    = help: consider adding an explicit import of `ID3D11Device` to disambiguate
note: `ID3D11Device` could also refer to the struct imported here
   --> zluda_api\src\lib.rs:8:5
    |
8   | use nvapi::*;
    |     ^^^^^^^^
    = help: consider adding an explicit import of `ID3D11Device` to disambiguate
    = note: `#[warn(ambiguous_glob_imports)]` on by default

warning: `ID3D11Device` is ambiguous
   --> zluda_api\src\lib.rs:211:22
    |
211 |     _pDevice: *const ID3D11Device,
    |                      ^^^^^^^^^^^^ ambiguous name
    |
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
    = note: for more information, see issue #114095 <https://github.com/rust-lang/rust/issues/114095>
    = note: ambiguous because of multiple glob imports of a name in the same module
note: `ID3D11Device` could refer to the struct imported here
   --> zluda_api\src\lib.rs:11:5
    |
11  | use windows::Win32::Graphics::Direct3D11::*;
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    = help: consider adding an explicit import of `ID3D11Device` to disambiguate
note: `ID3D11Device` could also refer to the struct imported here
   --> zluda_api\src\lib.rs:8:5
    |
8   | use nvapi::*;
    |     ^^^^^^^^
    = help: consider adding an explicit import of `ID3D11Device` to disambiguate

warning: `ID3D11DeviceContext` is ambiguous
   --> zluda_api\src\lib.rs:252:26
    |
252 |     pCommandList: *const ID3D11DeviceContext,
    |                          ^^^^^^^^^^^^^^^^^^^ ambiguous name
    |
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
    = note: for more information, see issue #114095 <https://github.com/rust-lang/rust/issues/114095>
    = note: ambiguous because of multiple glob imports of a name in the same module
note: `ID3D11DeviceContext` could refer to the struct imported here
   --> zluda_api\src\lib.rs:11:5
    |
11  | use windows::Win32::Graphics::Direct3D11::*;
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    = help: consider adding an explicit import of `ID3D11DeviceContext` to disambiguate
note: `ID3D11DeviceContext` could also refer to the struct imported here
   --> zluda_api\src\lib.rs:8:5
    |
8   | use nvapi::*;
    |     ^^^^^^^^
    = help: consider adding an explicit import of `ID3D11DeviceContext` to disambiguate

warning: `ID3D11Device` is ambiguous
   --> zluda_api\src\lib.rs:289:21
    |
289 |     pDevice: *const ID3D11Device,
    |                     ^^^^^^^^^^^^ ambiguous name
    |
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
    = note: for more information, see issue #114095 <https://github.com/rust-lang/rust/issues/114095>
    = note: ambiguous because of multiple glob imports of a name in the same module
note: `ID3D11Device` could refer to the struct imported here
   --> zluda_api\src\lib.rs:11:5
    |
11  | use windows::Win32::Graphics::Direct3D11::*;
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    = help: consider adding an explicit import of `ID3D11Device` to disambiguate
note: `ID3D11Device` could also refer to the struct imported here
   --> zluda_api\src\lib.rs:8:5
    |
8   | use nvapi::*;
    |     ^^^^^^^^
    = help: consider adding an explicit import of `ID3D11Device` to disambiguate

warning: `ID3D11SamplerState` is ambiguous
   --> zluda_api\src\lib.rs:291:33
    |
291 |     ppSamplerState: *mut *const ID3D11SamplerState,
    |                                 ^^^^^^^^^^^^^^^^^^ ambiguous name
    |
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
    = note: for more information, see issue #114095 <https://github.com/rust-lang/rust/issues/114095>
    = note: ambiguous because of multiple glob imports of a name in the same module
note: `ID3D11SamplerState` could refer to the struct imported here
   --> zluda_api\src\lib.rs:11:5
    |
11  | use windows::Win32::Graphics::Direct3D11::*;
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    = help: consider adding an explicit import of `ID3D11SamplerState` to disambiguate
note: `ID3D11SamplerState` could also refer to the struct imported here
   --> zluda_api\src\lib.rs:8:5
    |
8   | use nvapi::*;
    |     ^^^^^^^^
    = help: consider adding an explicit import of `ID3D11SamplerState` to disambiguate

warning: `ID3D12Device` is ambiguous
   --> zluda_api\src\lib.rs:139:22
    |
139 |     _pDevice: *const ID3D12Device,
    |                      ^^^^^^^^^^^^ ambiguous name
    |
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
    = note: for more information, see issue #114095 <https://github.com/rust-lang/rust/issues/114095>
    = note: ambiguous because of multiple glob imports of a name in the same module
note: `ID3D12Device` could refer to the struct imported here
   --> zluda_api\src\lib.rs:12:5
    |
12  | use windows::Win32::Graphics::Direct3D12::*;
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    = help: consider adding an explicit import of `ID3D12Device` to disambiguate
note: `ID3D12Device` could also refer to the struct imported here
   --> zluda_api\src\lib.rs:8:5
    |
8   | use nvapi::*;
    |     ^^^^^^^^
    = help: consider adding an explicit import of `ID3D12Device` to disambiguate

warning: `ID3D12Device` is ambiguous
   --> zluda_api\src\lib.rs:148:21
    |
148 |     pDevice: *const ID3D12Device,
    |                     ^^^^^^^^^^^^ ambiguous name
    |
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
    = note: for more information, see issue #114095 <https://github.com/rust-lang/rust/issues/114095>
    = note: ambiguous because of multiple glob imports of a name in the same module
note: `ID3D12Device` could refer to the struct imported here
   --> zluda_api\src\lib.rs:12:5
    |
12  | use windows::Win32::Graphics::Direct3D12::*;
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    = help: consider adding an explicit import of `ID3D12Device` to disambiguate
note: `ID3D12Device` could also refer to the struct imported here
   --> zluda_api\src\lib.rs:8:5
    |
8   | use nvapi::*;
    |     ^^^^^^^^
    = help: consider adding an explicit import of `ID3D12Device` to disambiguate

warning: unused variable: `pDevice`
   --> zluda_api\src\lib.rs:148:5
    |
148 |     pDevice: *const ID3D12Device,
    |     ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_pDevice`
    |
    = note: `#[warn(unused_variables)]` on by default

warning: unused variable: `size`
   --> zluda_api\src\lib.rs:150:5
    |
150 |     size: u32,
    |     ^^^^ help: if this is intentional, prefix it with an underscore: `_size`

warning: unused variable: `pCommandList`
   --> zluda_api\src\lib.rs:189:5
    |
189 |     pCommandList: *const ID3D12GraphicsCommandList,
    |     ^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_pCommandList`

warning: unused variable: `hShader`
   --> zluda_api\src\lib.rs:190:5
    |
190 |     hShader: NVDX_ObjectHandle,
    |     ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_hShader`

warning: unused variable: `gridX`
   --> zluda_api\src\lib.rs:191:5
    |
191 |     gridX: u32,
    |     ^^^^^ help: if this is intentional, prefix it with an underscore: `_gridX`

warning: unused variable: `gridY`
   --> zluda_api\src\lib.rs:192:5
    |
192 |     gridY: u32,
    |     ^^^^^ help: if this is intentional, prefix it with an underscore: `_gridY`

warning: unused variable: `gridZ`
   --> zluda_api\src\lib.rs:193:5
    |
193 |     gridZ: u32,
    |     ^^^^^ help: if this is intentional, prefix it with an underscore: `_gridZ`

warning: unused variable: `pParams`
   --> zluda_api\src\lib.rs:194:5
    |
194 |     pParams: *const c_void,
    |     ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_pParams`

warning: unused variable: `paramSize`
   --> zluda_api\src\lib.rs:195:5
    |
195 |     paramSize: u32,
    |     ^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_paramSize`

warning: unused variable: `pCommandList`
   --> zluda_api\src\lib.rs:252:5
    |
252 |     pCommandList: *const ID3D11DeviceContext,
    |     ^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_pCommandList`

warning: unused variable: `hShader`
   --> zluda_api\src\lib.rs:253:5
    |
253 |     hShader: NVDX_ObjectHandle,
    |     ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_hShader`

warning: unused variable: `gridX`
   --> zluda_api\src\lib.rs:254:5
    |
254 |     gridX: u32,
    |     ^^^^^ help: if this is intentional, prefix it with an underscore: `_gridX`

warning: unused variable: `gridY`
   --> zluda_api\src\lib.rs:255:5
    |
255 |     gridY: u32,
    |     ^^^^^ help: if this is intentional, prefix it with an underscore: `_gridY`

warning: unused variable: `gridZ`
   --> zluda_api\src\lib.rs:256:5
    |
256 |     gridZ: u32,
    |     ^^^^^ help: if this is intentional, prefix it with an underscore: `_gridZ`

warning: unused variable: `pParams`
   --> zluda_api\src\lib.rs:257:5
    |
257 |     pParams: *const c_void,
    |     ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_pParams`

warning: unused variable: `paramSize`
   --> zluda_api\src\lib.rs:258:5
    |
258 |     paramSize: u32,
    |     ^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_paramSize`

warning: unused variable: `pReadResources`
   --> zluda_api\src\lib.rs:259:5
    |
259 |     pReadResources: *const NVDX_ObjectHandle,
    |     ^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_pReadResources`

warning: unused variable: `numReadResources`
   --> zluda_api\src\lib.rs:260:5
    |
260 |     numReadResources: NvU32,
    |     ^^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_numReadResources`

warning: unused variable: `pWriteResources`
   --> zluda_api\src\lib.rs:261:5
    |
261 |     pWriteResources: *const NVDX_ObjectHandle,
    |     ^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_pWriteResources`

warning: unused variable: `numWriteResources`
   --> zluda_api\src\lib.rs:262:5
    |
262 |     numWriteResources: NvU32,
    |     ^^^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_numWriteResources`

warning: fields `function`, `block_x`, `block_y`, and `block_z` are never read
   --> zluda_api\src\lib.rs:131:5
    |
130 | struct Shader {
    |        ------ fields in this struct
131 |     function: CUfunction,
    |     ^^^^^^^^
132 |     block_x: u32,
    |     ^^^^^^^
133 |     block_y: u32,
    |     ^^^^^^^
134 |     block_z: u32,
    |     ^^^^^^^
    |
    = note: `#[warn(dead_code)]` on by default

warning: `zluda_api` (lib) generated 28 warnings
   Compiling zluda v0.0.0 (D:\Environment\ZLUDA\zluda)
warning: creating a shared reference to mutable static is discouraged
   --> zluda_redirect\src\lib.rs:309:34
    |
309 |     starts_with_ignore_case(lib, &DRIVERSTORE_UTF8, utf8_to_ascii_uppercase)
    |                                  ^^^^^^^^^^^^^^^^^ shared reference to mutable static
    |
    = note: for more information, see issue #114447 <https://github.com/rust-lang/rust/issues/114447>
    = note: this will be a hard error in the 2024 edition
    = note: this shared reference has lifetime `'static`, but if the static ever gets mutated, or a mutable reference is created, then any further use of this shared reference is Undefined Behavior
    = note: `#[warn(static_mut_refs)]` on by default
help: use `addr_of!` instead to create a raw pointer
    |
309 |     starts_with_ignore_case(lib, addr_of!(DRIVERSTORE_UTF8), utf8_to_ascii_uppercase)
    |                                  ~~~~~~~~~~~~~~~~~~~~~~~~~~

warning: creating a shared reference to mutable static is discouraged
   --> zluda_redirect\src\lib.rs:313:34
    |
313 |     starts_with_ignore_case(lib, &DRIVERSTORE_UTF16, utf16_to_ascii_uppercase)
    |                                  ^^^^^^^^^^^^^^^^^^ shared reference to mutable static
    |
    = note: for more information, see issue #114447 <https://github.com/rust-lang/rust/issues/114447>
    = note: this will be a hard error in the 2024 edition
    = note: this shared reference has lifetime `'static`, but if the static ever gets mutated, or a mutable reference is created, then any further use of this shared reference is Undefined Behavior
help: use `addr_of!` instead to create a raw pointer
    |
313 |     starts_with_ignore_case(lib, addr_of!(DRIVERSTORE_UTF16), utf16_to_ascii_uppercase)
    |                                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~

warning: creating a mutable reference to mutable static is discouraged
   --> zluda_redirect\src\lib.rs:581:17
    |
581 |                 &mut LOAD_LIBRARY_A as *mut _ as *mut *mut c_void,
    |                 ^^^^^^^^^^^^^^^^^^^ mutable reference to mutable static
    |
    = note: for more information, see issue #114447 <https://github.com/rust-lang/rust/issues/114447>
    = note: this will be a hard error in the 2024 edition
    = note: this mutable reference has lifetime `'static`, but if the static gets accessed (read or written) by any other means, or any other reference is created, then any further use of this mutable reference is Undefined Behavior
help: use `addr_of_mut!` instead to create a raw pointer
    |
581 |                 addr_of_mut!(LOAD_LIBRARY_A) as *mut _ as *mut *mut c_void,
    |                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~

warning: creating a mutable reference to mutable static is discouraged
   --> zluda_redirect\src\lib.rs:584:14
    |
584 |             (&mut LOAD_LIBRARY_W as *mut _ as _, ZludaLoadLibraryW as _),
    |              ^^^^^^^^^^^^^^^^^^^ mutable reference to mutable static
    |
    = note: for more information, see issue #114447 <https://github.com/rust-lang/rust/issues/114447>
    = note: this will be a hard error in the 2024 edition
    = note: this mutable reference has lifetime `'static`, but if the static gets accessed (read or written) by any other means, or any other reference is created, then any further use of this mutable reference is Undefined Behavior
help: use `addr_of_mut!` instead to create a raw pointer
    |
584 |             (addr_of_mut!(LOAD_LIBRARY_W) as *mut _ as _, ZludaLoadLibraryW as _),
    |              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~

warning: creating a mutable reference to mutable static is discouraged
   --> zluda_redirect\src\lib.rs:586:17
    |
586 |                 &mut LOAD_LIBRARY_EX_A as *mut _ as _,
    |                 ^^^^^^^^^^^^^^^^^^^^^^ mutable reference to mutable static
    |
    = note: for more information, see issue #114447 <https://github.com/rust-lang/rust/issues/114447>
    = note: this will be a hard error in the 2024 edition
    = note: this mutable reference has lifetime `'static`, but if the static gets accessed (read or written) by any other means, or any other reference is created, then any further use of this mutable reference is Undefined Behavior
help: use `addr_of_mut!` instead to create a raw pointer
    |
586 |                 addr_of_mut!(LOAD_LIBRARY_EX_A) as *mut _ as _,
    |                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

warning: creating a mutable reference to mutable static is discouraged
   --> zluda_redirect\src\lib.rs:590:17
    |
590 |                 &mut LOAD_LIBRARY_EX_W as *mut _ as _,
    |                 ^^^^^^^^^^^^^^^^^^^^^^ mutable reference to mutable static
    |
    = note: for more information, see issue #114447 <https://github.com/rust-lang/rust/issues/114447>
    = note: this will be a hard error in the 2024 edition
    = note: this mutable reference has lifetime `'static`, but if the static gets accessed (read or written) by any other means, or any other reference is created, then any further use of this mutable reference is Undefined Behavior
help: use `addr_of_mut!` instead to create a raw pointer
    |
590 |                 addr_of_mut!(LOAD_LIBRARY_EX_W) as *mut _ as _,
    |                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

warning: creating a mutable reference to mutable static is discouraged
   --> zluda_redirect\src\lib.rs:594:17
    |
594 |                 &mut CREATE_PROCESS_A as *mut _ as _,
    |                 ^^^^^^^^^^^^^^^^^^^^^ mutable reference to mutable static
    |
    = note: for more information, see issue #114447 <https://github.com/rust-lang/rust/issues/114447>
    = note: this will be a hard error in the 2024 edition
    = note: this mutable reference has lifetime `'static`, but if the static gets accessed (read or written) by any other means, or any other reference is created, then any further use of this mutable reference is Undefined Behavior
help: use `addr_of_mut!` instead to create a raw pointer
    |
594 |                 addr_of_mut!(CREATE_PROCESS_A) as *mut _ as _,
    |                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

warning: creating a mutable reference to mutable static is discouraged
   --> zluda_redirect\src\lib.rs:598:17
    |
598 |                 &mut CREATE_PROCESS_W as *mut _ as _,
    |                 ^^^^^^^^^^^^^^^^^^^^^ mutable reference to mutable static
    |
    = note: for more information, see issue #114447 <https://github.com/rust-lang/rust/issues/114447>
    = note: this will be a hard error in the 2024 edition
    = note: this mutable reference has lifetime `'static`, but if the static gets accessed (read or written) by any other means, or any other reference is created, then any further use of this mutable reference is Undefined Behavior
help: use `addr_of_mut!` instead to create a raw pointer
    |
598 |                 addr_of_mut!(CREATE_PROCESS_W) as *mut _ as _,
    |                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

warning: creating a mutable reference to mutable static is discouraged
   --> zluda_redirect\src\lib.rs:602:17
    |
602 |                 &mut CREATE_PROCESS_AS_USER_W as *mut _ as _,
    |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ mutable reference to mutable static
    |
    = note: for more information, see issue #114447 <https://github.com/rust-lang/rust/issues/114447>
    = note: this will be a hard error in the 2024 edition
    = note: this mutable reference has lifetime `'static`, but if the static gets accessed (read or written) by any other means, or any other reference is created, then any further use of this mutable reference is Undefined Behavior
help: use `addr_of_mut!` instead to create a raw pointer
    |
602 |                 addr_of_mut!(CREATE_PROCESS_AS_USER_W) as *mut _ as _,
    |                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

warning: creating a mutable reference to mutable static is discouraged
   --> zluda_redirect\src\lib.rs:606:17
    |
606 |                 &mut CREATE_PROCESS_WITH_LOGON_W as *mut _ as _,
    |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ mutable reference to mutable static
    |
    = note: for more information, see issue #114447 <https://github.com/rust-lang/rust/issues/114447>
    = note: this will be a hard error in the 2024 edition
    = note: this mutable reference has lifetime `'static`, but if the static gets accessed (read or written) by any other means, or any other reference is created, then any further use of this mutable reference is Undefined Behavior
help: use `addr_of_mut!` instead to create a raw pointer
    |
606 |                 addr_of_mut!(CREATE_PROCESS_WITH_LOGON_W) as *mut _ as _,
    |                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

warning: creating a mutable reference to mutable static is discouraged
   --> zluda_redirect\src\lib.rs:610:17
    |
610 |                 &mut CREATE_PROCESS_WITH_TOKEN_W as *mut _ as _,
    |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ mutable reference to mutable static
    |
    = note: for more information, see issue #114447 <https://github.com/rust-lang/rust/issues/114447>
    = note: this will be a hard error in the 2024 edition
    = note: this mutable reference has lifetime `'static`, but if the static gets accessed (read or written) by any other means, or any other reference is created, then any further use of this mutable reference is Undefined Behavior
help: use `addr_of_mut!` instead to create a raw pointer
    |
610 |                 addr_of_mut!(CREATE_PROCESS_WITH_TOKEN_W) as *mut _ as _,
    |                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

warning: creating a mutable reference to mutable static is discouraged
   --> zluda_redirect\src\lib.rs:848:50
    |
848 |     if !load_global_string(&PAYLOAD_NVCUDA_GUID, &mut ZLUDA_PATH_UTF8, || {
    |                                                  ^^^^^^^^^^^^^^^^^^^^ mutable reference to mutable static
    |
    = note: for more information, see issue #114447 <https://github.com/rust-lang/rust/issues/114447>
    = note: this will be a hard error in the 2024 edition
    = note: this mutable reference has lifetime `'static`, but if the static gets accessed (read or written) by any other means, or any other reference is created, then any further use of this mutable reference is Undefined Behavior
help: use `addr_of_mut!` instead to create a raw pointer
    |
848 |     if !load_global_string(&PAYLOAD_NVCUDA_GUID, addr_of_mut!(ZLUDA_PATH_UTF8), || {
    |                                                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

warning: creating a mutable reference to mutable static is discouraged
   --> zluda_redirect\src\lib.rs:849:9
    |
849 |         &mut ZLUDA_PATH_UTF16
    |         ^^^^^^^^^^^^^^^^^^^^^ mutable reference to mutable static
    |
    = note: for more information, see issue #114447 <https://github.com/rust-lang/rust/issues/114447>
    = note: this will be a hard error in the 2024 edition
    = note: this mutable reference has lifetime `'static`, but if the static gets accessed (read or written) by any other means, or any other reference is created, then any further use of this mutable reference is Undefined Behavior
help: use `addr_of_mut!` instead to create a raw pointer
    |
849 |         addr_of_mut!(ZLUDA_PATH_UTF16)
    |

warning: creating a mutable reference to mutable static is discouraged
   --> zluda_redirect\src\lib.rs:853:48
    |
853 |     if !load_global_string(&PAYLOAD_NVML_GUID, &mut ZLUDA_ML_PATH_UTF8, || {
    |                                                ^^^^^^^^^^^^^^^^^^^^^^^ mutable reference to mutable static
    |
    = note: for more information, see issue #114447 <https://github.com/rust-lang/rust/issues/114447>
    = note: this will be a hard error in the 2024 edition
    = note: this mutable reference has lifetime `'static`, but if the static gets accessed (read or written) by any other means, or any other reference is created, then any further use of this mutable reference is Undefined Behavior
help: use `addr_of_mut!` instead to create a raw pointer
    |
853 |     if !load_global_string(&PAYLOAD_NVML_GUID, addr_of_mut!(ZLUDA_ML_PATH_UTF8), || {
    |                                                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

warning: creating a mutable reference to mutable static is discouraged
   --> zluda_redirect\src\lib.rs:854:9
    |
854 |         &mut ZLUDA_ML_PATH_UTF16
    |         ^^^^^^^^^^^^^^^^^^^^^^^^ mutable reference to mutable static
    |
    = note: for more information, see issue #114447 <https://github.com/rust-lang/rust/issues/114447>
    = note: this will be a hard error in the 2024 edition
    = note: this mutable reference has lifetime `'static`, but if the static gets accessed (read or written) by any other means, or any other reference is created, then any further use of this mutable reference is Undefined Behavior
help: use `addr_of_mut!` instead to create a raw pointer
    |
854 |         addr_of_mut!(ZLUDA_ML_PATH_UTF16)
    |

warning: creating a mutable reference to mutable static is discouraged
   --> zluda_redirect\src\lib.rs:858:45
    |
858 |     load_global_string(&PAYLOAD_NVAPI_GUID, &mut ZLUDA_API_PATH_UTF8, || {
    |                                             ^^^^^^^^^^^^^^^^^^^^^^^^ mutable reference to mutable static
    |
    = note: for more information, see issue #114447 <https://github.com/rust-lang/rust/issues/114447>
    = note: this will be a hard error in the 2024 edition
    = note: this mutable reference has lifetime `'static`, but if the static gets accessed (read or written) by any other means, or any other reference is created, then any further use of this mutable reference is Undefined Behavior
help: use `addr_of_mut!` instead to create a raw pointer
    |
858 |     load_global_string(&PAYLOAD_NVAPI_GUID, addr_of_mut!(ZLUDA_API_PATH_UTF8), || {
    |                                             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

warning: creating a mutable reference to mutable static is discouraged
   --> zluda_redirect\src\lib.rs:861:47
    |
861 |     load_global_string(&PAYLOAD_NVOPTIX_GUID, &mut ZLUDA_OPTIX_PATH_UTF8, || {
    |                                               ^^^^^^^^^^^^^^^^^^^^^^^^^^ mutable reference to mutable static
    |
    = note: for more information, see issue #114447 <https://github.com/rust-lang/rust/issues/114447>
    = note: this will be a hard error in the 2024 edition
    = note: this mutable reference has lifetime `'static`, but if the static gets accessed (read or written) by any other means, or any other reference is created, then any further use of this mutable reference is Undefined Behavior
help: use `addr_of_mut!` instead to create a raw pointer
    |
861 |     load_global_string(&PAYLOAD_NVOPTIX_GUID, addr_of_mut!(ZLUDA_OPTIX_PATH_UTF8), || {
    |                                               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

warning: `zluda_redirect` (lib) generated 17 warnings
warning: struct `CountingWriter` is never constructed
   --> zluda_ml\src\windows.rs:140:8
    |
140 | struct CountingWriter<T: std::io::Write> {
    |        ^^^^^^^^^^^^^^
    |
    = note: `#[warn(dead_code)]` on by default

warning: `zluda_ml` (lib) generated 1 warning
error: failed to run custom build command for `llvm-sys v150.1.2 (D:\Environment\ZLUDA\ext\llvm-sys.rs)`

Caused by:
  process didn't exit successfully: `D:\Environment\ZLUDA\target\debug\build\llvm-sys-1a7174db10c6a2fe\build-script-build` (exit code: 101)
  --- stdout
  cargo:rerun-if-changed=build.rs
  cargo:rerun-if-changed=D:\Environment\ZLUDA\ext\llvm-project\llvm
  cargo:rerun-if-changed=D:\Environment\ZLUDA\ext\llvm-sys.rs\build.cmake
  CMAKE_TOOLCHAIN_FILE_x86_64-pc-windows-msvc = None
  CMAKE_TOOLCHAIN_FILE_x86_64_pc_windows_msvc = None
  HOST_CMAKE_TOOLCHAIN_FILE = None
  CMAKE_TOOLCHAIN_FILE = None
  CMAKE_PREFIX_PATH_x86_64-pc-windows-msvc = None
  CMAKE_PREFIX_PATH_x86_64_pc_windows_msvc = None
  HOST_CMAKE_PREFIX_PATH = None
  CMAKE_PREFIX_PATH = None
  CMAKE_x86_64-pc-windows-msvc = None
  CMAKE_x86_64_pc_windows_msvc = None
  HOST_CMAKE = None
  CMAKE = None
  running: "cmake" "-Wdev" "--debug-output" "D:\\Environment\\ZLUDA\\ext\\llvm-project\\llvm" "-G" "Ninja" "-DLLVM_ENABLE_LIBXML2=OFF" "-DLLVM_ENABLE_ZLIB=OFF" "-DLLVM_ENABLE_ZSTD=OFF" "-DLLVM_ENABLE_CURL=OFF" "-DLLVM_ENABLE_HTTPLIB=OFF" "-DLLVM_ENABLE_LIBEDIT=OFF" "-DLLVM_ENABLE_TERMINFO=OFF" "-DLLVM_BUILD_TOOLS=OFF" "-DLLVM_TARGETS_TO_BUILD=" "-DLLVM_ENABLE_PROJECTS=" "-DCMAKE_PROJECT_INCLUDE_BEFORE=D:\\Environment\\ZLUDA\\ext\\llvm-sys.rs\\build.cmake" "-DCMAKE_INSTALL_PREFIX=D:\\Environment\\ZLUDA\\target\\debug\\build\\llvm-sys-3610a532cab24e0e\\out" "-DCMAKE_C_FLAGS= -nologo -MD -Brepro" "-DCMAKE_C_COMPILER=C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.40.33807/bin/HostX64/x64/cl.exe" "-DCMAKE_CXX_FLAGS= -nologo -MD -Brepro" "-DCMAKE_CXX_COMPILER=C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.40.33807/bin/HostX64/x64/cl.exe" "-DCMAKE_ASM_FLAGS= -nologo -MD -Brepro" "-DCMAKE_ASM_COMPILER=C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.40.33807/bin/HostX64/x64/cl.exe" "-DCMAKE_BUILD_TYPE=Debug" "-DCMAKE_VERBOSE_MAKEFILE:BOOL=ON"
  Running with debug output on.

  --- stderr
  CMake Error: The source directory "D:/Environment/ZLUDA/ext/llvm-project/llvm" does not exist.
  Specify --help for usage, or press the help button on the CMake GUI.
  thread 'main' panicked at C:\Users\stara\.cargo\registry\src\index.crates.io-6f17d22bba15001f\cmake-0.1.50\src\lib.rs:1098:5:

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

  build script failed, must exit now
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...
Error: "\"\\\\\\\\?\\\\C:\\\\Users\\\\stara\\\\.rustup\\\\toolchains\\\\stable-x86_64-pc-windows-msvc\\\\bin\\\\cargo.exe\" \"build\" \"--locked\" \"-p\" \"offline_compiler\" \"-p\" \"process_address_table\" \"-p\" \"zluda_api\" \"-p\" \"zluda_dump\" \"-p\" \"zluda_inject\" \"-p\" \"zluda_ml\" \"-p\" \"zluda_redirect\" \"-p\" \"zluda_lib\" failed with exit code 101"
error: process didn't exit successfully: `target\debug\xtask.exe` (exit code: 1)

Error message extract

I extract the error part from the debug information:

   --> zluda_ml\src\windows.rs:140:8
    |
140 | struct CountingWriter<T: std::io::Write> {
    |        ^^^^^^^^^^^^^^
    |
    = note: `#[warn(dead_code)]` on by default

warning: `zluda_ml` (lib) generated 1 warning
error: failed to run custom build command for `llvm-sys v150.1.2 (D:\Environment\ZLUDA\ext\llvm-sys.rs)`

Caused by:
  process didn't exit successfully: `D:\Environment\ZLUDA\target\debug\build\llvm-sys-1a7174db10c6a2fe\build-script-build` (exit code: 101)
  --- stdout
  cargo:rerun-if-changed=build.rs
  cargo:rerun-if-changed=D:\Environment\ZLUDA\ext\llvm-project\llvm
  cargo:rerun-if-changed=D:\Environment\ZLUDA\ext\llvm-sys.rs\build.cmake
  CMAKE_TOOLCHAIN_FILE_x86_64-pc-windows-msvc = None
  CMAKE_TOOLCHAIN_FILE_x86_64_pc_windows_msvc = None
  HOST_CMAKE_TOOLCHAIN_FILE = None
  CMAKE_TOOLCHAIN_FILE = None
  CMAKE_PREFIX_PATH_x86_64-pc-windows-msvc = None
  CMAKE_PREFIX_PATH_x86_64_pc_windows_msvc = None
  HOST_CMAKE_PREFIX_PATH = None
  CMAKE_PREFIX_PATH = None
  CMAKE_x86_64-pc-windows-msvc = None
  CMAKE_x86_64_pc_windows_msvc = None
  HOST_CMAKE = None
  CMAKE = None
  running: "cmake" "-Wdev" "--debug-output" "D:\\Environment\\ZLUDA\\ext\\llvm-project\\llvm" "-G" "Ninja" "-DLLVM_ENABLE_LIBXML2=OFF" "-DLLVM_ENABLE_ZLIB=OFF" "-DLLVM_ENABLE_ZSTD=OFF" "-DLLVM_ENABLE_CURL=OFF" "-DLLVM_ENABLE_HTTPLIB=OFF" "-DLLVM_ENABLE_LIBEDIT=OFF" "-DLLVM_ENABLE_TERMINFO=OFF" "-DLLVM_BUILD_TOOLS=OFF" "-DLLVM_TARGETS_TO_BUILD=" "-DLLVM_ENABLE_PROJECTS=" "-DCMAKE_PROJECT_INCLUDE_BEFORE=D:\\Environment\\ZLUDA\\ext\\llvm-sys.rs\\build.cmake" "-DCMAKE_INSTALL_PREFIX=D:\\Environment\\ZLUDA\\target\\debug\\build\\llvm-sys-3610a532cab24e0e\\out" "-DCMAKE_C_FLAGS= -nologo -MD -Brepro" "-DCMAKE_C_COMPILER=C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.40.33807/bin/HostX64/x64/cl.exe" "-DCMAKE_CXX_FLAGS= -nologo -MD -Brepro" "-DCMAKE_CXX_COMPILER=C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.40.33807/bin/HostX64/x64/cl.exe" "-DCMAKE_ASM_FLAGS= -nologo -MD -Brepro" "-DCMAKE_ASM_COMPILER=C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.40.33807/bin/HostX64/x64/cl.exe" "-DCMAKE_BUILD_TYPE=Debug" "-DCMAKE_VERBOSE_MAKEFILE:BOOL=ON"
  Running with debug output on.

  --- stderr
  CMake Error: The source directory "D:/Environment/ZLUDA/ext/llvm-project/llvm" does not exist.
  Specify --help for usage, or press the help button on the CMake GUI.
  thread 'main' panicked at C:\Users\stara\.cargo\registry\src\index.crates.io-6f17d22bba15001f\cmake-0.1.50\src\lib.rs:1098:5:

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

  build script failed, must exit now
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...
Error: "\"\\\\\\\\?\\\\C:\\\\Users\\\\stara\\\\.rustup\\\\toolchains\\\\stable-x86_64-pc-windows-msvc\\\\bin\\\\cargo.exe\" \"build\" \"--locked\" \"-p\" \"offline_compiler\" \"-p\" \"process_address_table\" \"-p\" \"zluda_api\" \"-p\" \"zluda_dump\" \"-p\" \"zluda_inject\" \"-p\" \"zluda_ml\" \"-p\" \"zluda_redirect\" \"-p\" \"zluda_lib\" failed with exit code 101"
error: process didn't exit successfully: `target\debug\xtask.exe` (exit code: 1)

How can I fix this? Thank you.

@VictoireWood
Copy link
Author

image

Logfile.CSV

@vosen
Copy link
Owner

vosen commented May 27, 2024

You probably checkout out git repo without submodules.
Use git clone --recurse-submodules https://github.com/vosen/zluda.git on initial checkout.
I think the command for an already checked out repo is git submodule update --init --recursive

@VictoireWood
Copy link
Author

VictoireWood commented May 28, 2024

You probably checkout out git repo without submodules. Use git clone --recurse-submodules https://github.com/vosen/zluda.git on initial checkout. I think the command for an already checked out repo is git submodule update --init --recursive

Thanks @vosen

I used the git submodule update --init --recursive then it shows in the command prompt Failed to connect to github.com port 443: Timed out.. So I edited the ZLUDA\.gitmodules to use the SSH link.

[submodule "ext/llvm-project"]
	path = ext/llvm-project
	url = [email protected]:llvm/llvm-project.git
	branch = release/15.x
	shallow = true

Then I built ZLUDA in x64 Native Tools Command Prompt for VS 2022 with the command cargo xtask, the process failed again with new problems.

The prompt's massage is too long so I put it in a txt file:

initial prompt message.txt

Then I add set RUST_BACKTRACE=full command before cargo xtask to get full cargo's backtrace.

The backtrace is:

  thread 'main' panicked at C:\Users\stara\.cargo\registry\src\index.crates.io-6f17d22bba15001f\cmake-0.1.50\src\lib.rs:1098:5:

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

  build script failed, must exit now
  stack backtrace:
     0:     0x7ff6e2eeecda - std::backtrace_rs::backtrace::dbghelp64::trace
                                 at /rustc/9b00956e56009bab2aa15d7bff10916599e3d6d6/library\std\src\..\..\backtrace\src\backtrace\dbghelp64.rs:99
     1:     0x7ff6e2eeecda - std::backtrace_rs::backtrace::trace_unsynchronized
                                 at /rustc/9b00956e56009bab2aa15d7bff10916599e3d6d6/library\std\src\..\..\backtrace\src\backtrace\mod.rs:66
     2:     0x7ff6e2eeecda - std::sys_common::backtrace::_print_fmt
                                 at /rustc/9b00956e56009bab2aa15d7bff10916599e3d6d6/library\std\src\sys_common\backtrace.rs:68
     3:     0x7ff6e2eeecda - std::sys_common::backtrace::_print::impl$0::fmt
                                 at /rustc/9b00956e56009bab2aa15d7bff10916599e3d6d6/library\std\src\sys_common\backtrace.rs:44
     4:     0x7ff6e2f0bf8b - core::fmt::rt::Argument::fmt
                                 at /rustc/9b00956e56009bab2aa15d7bff10916599e3d6d6/library\core\src\fmt\rt.rs:142
     5:     0x7ff6e2f0bf8b - core::fmt::write
                                 at /rustc/9b00956e56009bab2aa15d7bff10916599e3d6d6/library\core\src\fmt\mod.rs:1153
     6:     0x7ff6e2eea901 - std::io::Write::write_fmt<std::sys::pal::windows::stdio::Stderr>
                                 at /rustc/9b00956e56009bab2aa15d7bff10916599e3d6d6/library\std\src\io\mod.rs:1843
     7:     0x7ff6e2eeeac6 - std::sys_common::backtrace::print
                                 at /rustc/9b00956e56009bab2aa15d7bff10916599e3d6d6/library\std\src\sys_common\backtrace.rs:34
     8:     0x7ff6e2ef119f - std::panicking::default_hook::closure$1
                                 at /rustc/9b00956e56009bab2aa15d7bff10916599e3d6d6/library\std\src\panicking.rs:272
     9:     0x7ff6e2ef0e37 - std::panicking::default_hook
                                 at /rustc/9b00956e56009bab2aa15d7bff10916599e3d6d6/library\std\src\panicking.rs:292
    10:     0x7ff6e2ef16dd - std::panicking::rust_panic_with_hook
                                 at /rustc/9b00956e56009bab2aa15d7bff10916599e3d6d6/library\std\src\panicking.rs:779
    11:     0x7ff6e2ef1599 - std::panicking::begin_panic_handler::closure$0
                                 at /rustc/9b00956e56009bab2aa15d7bff10916599e3d6d6/library\std\src\panicking.rs:657
    12:     0x7ff6e2eef5e9 - std::sys_common::backtrace::__rust_end_short_backtrace<std::panicking::begin_panic_handler::closure_env$0,never$>
                                 at /rustc/9b00956e56009bab2aa15d7bff10916599e3d6d6/library\std\src\sys_common\backtrace.rs:171
    13:     0x7ff6e2ef1256 - std::panicking::begin_panic_handler
                                 at /rustc/9b00956e56009bab2aa15d7bff10916599e3d6d6/library\std\src\panicking.rs:645
    14:     0x7ff6e2f11dc7 - core::panicking::panic_fmt
                                 at /rustc/9b00956e56009bab2aa15d7bff10916599e3d6d6/library\core\src\panicking.rs:72
    15:     0x7ff6e2e718c7 - cmake::find_exe::{{closure}}::heb534a8149495d3c
    16:     0x7ff6e2e7112b - <cmake::Version as core::default::Default>::default::h778730ec58de4982
    17:     0x7ff6e2e6d7f1 - cmake::Config::build::h31b5c3a39cbea5f8
    18:     0x7ff6e2e50c65 - build_script_build::build_cmake_targets::h7b5e5c1e29a0d6d2
    19:     0x7ff6e2e46092 - core::result::Result<T,E>::or_else::h1e7e57f2e1968224
    20:     0x7ff6e2e42286 - core::ops::function::FnOnce::call_once::h1da5e1830cb76f1f
    21:     0x7ff6e2e4a529 - std::sys_common::backtrace::__rust_begin_short_backtrace::h11aad778c993cfe7
    22:     0x7ff6e2e4a75c - std::rt::lang_start::{{closure}}::h8f133e602535f3fd
    23:     0x7ff6e2ee6dd2 - std::rt::lang_start_internal
                                 at /rustc/9b00956e56009bab2aa15d7bff10916599e3d6d6/library\std\src\rt.rs:148
    24:     0x7ff6e2e4a737 - std::rt::lang_start::h6c910e22edd8f538
    25:     0x7ff6e2e469a9 - main
    26:     0x7ff6e2f10278 - invoke_main
                                 at D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:78
    27:     0x7ff6e2f10278 - __scrt_common_main_seh
                                 at D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:288
    28:     0x7ff8c18a7344 - BaseThreadInitThunk
    29:     0x7ff8c33c26b1 - RtlUserThreadStart
Error: "\"\\\\\\\\?\\\\C:\\\\Users\\\\stara\\\\.rustup\\\\toolchains\\\\stable-x86_64-pc-windows-msvc\\\\bin\\\\cargo.exe\" \"build\" \"--locked\" \"-p\" \"offline_compiler\" \"-p\" \"process_address_table\" \"-p\" \"zluda_api\" \"-p\" \"zluda_dump\" \"-p\" \"zluda_inject\" \"-p\" \"zluda_ml\" \"-p\" \"zluda_redirect\" \"-p\" \"zluda_lib\" failed with exit code 101"
error: process didn't exit successfully: `target\debug\xtask.exe` (exit code: 1)

I don't know how to solve this new problem.

@vosen
Copy link
Owner

vosen commented May 28, 2024

Me neither :), but let's try some debugging.
The code fails during build in a third-party crate in a completely innocent code that tries to parse PATH env var.

  • Try building with cargo xtask (without --release). This will try build unoptimized version for debugging and hopefully will fail with stack trace that shows exact line number
  • If possible, please post the content of your PATH env var (echo %PATH% in Windows cmd)

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