Windows: rustc_codegen_nvvm fails to load due to missing nvvm64_40_0.dll in PATH
まだ誰も着手していません。
評価
調査の方向性
examples/cuda/vecadd から cargo build を実行して失敗を再現し、その build.rs による rustc_codegen_nvvm の呼び出しを調査してください。Windows プロセスが nvvm64_40_0.dll の場所をどのように特定するか、また nvvm/bin PATH workaround が想定されているかを確認してください。Windows ビルドが、文書化されていない手動の環境変更なしにバックエンドを確実に読み込めれば完了です。
索引モデルが issue の本文から書いたものです。
説明
I noticed rustc_codegen_nvvm is yapping on Windows:
error: failed to run custom build command for `vecadd v0.1.0 (F:\Git\github.com\rust-gpu\Rust-CUDA\examples\cuda\vecadd)`
Caused by:
process didn't exit successfully: `F:\Git\github.com\rust-gpu\Rust-CUDA\target\debug\build\vecadd-06fc7e2d750a3fd2\build-script-build` (exit code: 101)
--- stdout
cargo::rerun-if-changed=build.rs
cargo::rerun-if-changed=kernels
cargo:rerun-if-changed=F:\Git\github.com\rust-gpu\Rust-CUDA\examples\cuda\vecadd\kernels
--- stderr
error: failed to run `rustc` to learn about target-specific information
Caused by:
process didn't exit successfully: `sccache C:\Users\steve\scoop\persist\rustup\.rustup\toolchains\nightly-2025-03-02-x86_64-pc-windows-msvc\bin\rustc.exe - --crate-name ___ --print=file-names -Zcodegen-backend=F:\Git\github.com\rust-gpu\Rust-CUDA\target\debug\deps\rustc_codegen_nvvm.dll -Zcrate-attr=feature(register_tool) -Zcrate-attr=register_tool(nvvm_internal) -Zcrate-attr=no_std -Zsaturating_float_casts=false "-Cllvm-args=-arch=compute_61 --override-libm" --target nvptx64-nvidia-cuda --crate-type bin --crate-type rlib --crate-type dylib --crate-type cdylib --crate-type staticlib --crate-type proc-macro --print=sysroot --print=split-debuginfo --print=crate-name --print=cfg -Wwarnings` (exit code: 1)
--- stderr
error: couldn't load codegen backend \\?\F:\Git\github.com\rust-gpu\Rust-CUDA\target\debug\deps\rustc_codegen_nvvm.dll: LoadLibraryExW failed: The specified module could not be found. (os error 126) (The specified module could not be found. (os error 126)) (retried 5 times)
Then I noticed nvvm64_40_0.dll maybe missing:
Indeed, adding nvvm folder to the PATH env fixed it:
$env:PATH += ";C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.9\nvvm\bin"
PS> cargo build
// just works
- 主要言語
- Rust
- スター
- 5.4k
- フォーク
- 251
- 平均マージ
- 4日 15時間
- マージ済み PR(30日)
- 4
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
Rust-GPU/rust-cuda のほかの issue
-
Default NvvmArch::Compute75 silently produces InvalidPtx on pre-Turing GPUs (Pascal/Maxwell/Volta)オープン
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
-
難易度 5/5 1週間以上 初心者へのやさしさ 30/100
-
Array parameters lose alignment metadata and ICE on >16 byte alignments対応中かも @Snehal-Reddy が 162 日前に担当しました。 オープン
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
-
難易度 5/5 1週間以上 初心者へのやさしさ 38/100
Rust-GPU/rust-cuda の issue をすべて見る
似ている issue
-
C-bug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
rust-lang/rust-analyzer#23501 ·
メンテナーはふだん 1 日以内に返信
-
Streamable HTTP client: a 401 or 403 with a JSON-RPC error body and no WWW-Authenticate loses its HTTP status対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープンbug P2 ready for work T-security T-transport
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
modelcontextprotocol/rust-sdk#1339 ·
メンテナーはふだん 3 日以内に返信
-
scripts/gen-gallery.py:118: a ready session now reports in_progress, so SESSION_READY_OLD can goオープンnightly-audit
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
antithesishq/snouty#396 ·
メンテナーはふだん 1 日以内に返信
-
French BIP39 wordlist starts with a UTF-8 BOM, so generated French mnemonics carry U+FEFF and derive a non-canonical seed対応中かも @Kshot3000 が今日担当しました。 オープン
難易度 1/5 1時間未満 初心者へのやさしさ 91/100
ergoplatform/sigma-rust#976 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 1 日以内に返信