-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
dll load failure running a cargo test on msvc 64 bit #3989
Comments
Here is the error from the DLL not found popup. foo-a0c0f1[..].exe System Error target/cit contains :-
|
other tests that fail: plugins, and bench_dylib. The machine is a pretty new install of Windows 10 1703, with Visual Studio 2015.3, Visual Studio 2017 and the Windows 10 SDK. It does not seem sensitive to the version of Rust but I tried the version that the CI server is using which is nightly 2017-03-03. I blew away ~/.cargo, ~/.multirust and ~/.rustup before installing with rustup-init-exe (1.2.0) rustup-init 1.2.0 (70faf07 2017-04-08) |
The test-xxxx.dll that it can't find is the one in rustlib\x86_64-pc-windows-msvc\lib. This is the test generated by cargo's It works for me if I add C:\Users\jim.rustup\toolchains\nightly-x86_64-pc-windows-msvc\lib\rustlib\x86_64-pc-windows-msvc\lib to my path, but fails otherwise. |
I believe this error is fixed on Unix via this code although I have no idea how it's working elsewhere today... Can you gist the output with |
That code (tests/cargotest) is just for cargo testing cargo, right? Because this is a cargo testing anything issue too. (It seems like that foo example above should work standalone, not just as part of the cargo testsuite?) Does something already know the rustlib dir inside cargo itself? The dylib search path is getting set here. Should it include the rustlib dir too? |
Ok so As I typed this out I remembered that we pin to an old version of rustup due to #3394. So given that I think we should (a) fix Cargo, probably through those lines of code that I linked above (I had forgotten about before) and (b) not worry about Cargo in the ecosystem. In general it's up to developers to manage library lookup paths wrt local toolchains. Would you be interested in patching up the code mentioned previously? |
I'm pretty busy and this is all a major digression from what I am actually trying to get done so I'm not sure. That said - can you clarify something for me? It looks like the unixoids all get the On Windows, to the best of my knowledge you need the exact directory to look in, so you need the correct triple in order to generate the right path. Do you know where I can get the triple? Thanks |
Oh that's fine, no worries! Nah on Unix there's no rpath entries into the rustlib dir, instead it's intended that code is run against the libraries the compiler runs with, those in The correct triple can be extracted from |
Thanks for helping me work through this. Closing as a dupe of #3394 |
This is against commit 7cfeec1 which is a bors commit that succeeded in appveyor.
The text was updated successfully, but these errors were encountered: