-
Notifications
You must be signed in to change notification settings - Fork 943
rustup run
doesn't setup the dylib path on windows
#4246
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
Comments
@Nadrieril Thanks for your report. You might need to set |
Thanks for the link. Also related to these links: But I don't see why I indeed noticed the Update: after scanning |
@zjp-CN Thanks for your feedback! Let's continue the discussion over there in the main issue then. |
to add rust driver dll to PATH close AeneasVerif#588 cc rust-lang/rustup#3825 cc rust-lang/rustup#4246 cc rust-lang/rustup#4196
Oh amazing, I didn't expect this variable would work, glad it does. |
Verification
Problem
Hi! I am developping a rustc driver. I make sure to always call it as
rustup run my-driver
, which works on Mac and Linux: both the toolchain binaries and the rustc_driver.so are accessible so my program runs well. On Windows however, calling the driver fails with "rustc_driver.dll not found".And indeed, as far as I can tell
rustup run
only attempts to set up loader paths on macos and linux:rustup/src/toolchain.rs
Line 178 in 895a43a
I've seen related issues (#765, #932, #1152), but they're not exactly the same problem.
Steps
rustup component add --toolchain nightly rust-src rustc-dev llvm-tools-preview
;cargo +nightly build
rustup run nightly path\to\test-crate.exe
Possible Solution(s)
I can't test myself because I don't own a Windows machine, but a user reports that adding the lib path (e.g.
C:\Users\Administrator\.rustup\toolchains\nightly-2024-10-23-x86_64-pc-windows-msvc\lib\rustlib\x86_64-pc-windows-msvc\lib
), toPATH
(instead ofLD_LIBRARY_PATH
) works. This seems confirmed by a quick google search.Notes
The reproducing details (OS version etc) are not precise because I'm reporting on behalf of a user. If you can't reproduce on your Windows machine I'll ask for more details.
Rustup version
rustup 1.27.1
Installed toolchains
nightly
OS version
Windows ???
The text was updated successfully, but these errors were encountered: