You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
then I get this compiler error when trying to build:
Compiling ice-test v0.0.1 (file:///C:/Users/dradtke/carhole/rust/ice-test)
Running `rustc src\main.rs --crate-name ice-test --crate-type bin -g --out-dir C:\Users\dradtke\carhole\rust\ice-test\target\debug --emit=dep-info,link -L dependency=C:\Users\dradtke\carhole\rust\ice-test\target\debug -L dependency=C:\Users\dradtke\carhole\rust\ice-test\target\debug\deps -L native="."`
error: internal compiler error: unexpected panic
note: the compiler unexpectedly panicked. this is a bug.
note: we would appreciate a bug report: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports
note: run with `RUST_BACKTRACE=1` for a backtrace
thread 'rustc' panicked at 'called `Result::unwrap()` on an `Err` value: JoinPathsError { inner: JoinPathsError }', C:/bot/slave/nightly-dist-rustc-win-32/build/src/libcore\result.rs:751
stack backtrace:
1: 0x6316dc46 - rt::unwind::register::h27ef7cd182e9296cKUI
2: 0x630c37dc - rt::unwind::begin_unwind_inner::hefe36366e50f3af8URI
3: 0x630c3b57 - rt::unwind::begin_unwind_fmt::h97d5284c0d9beb8cvQI
4: 0x6316d920 - rust_begin_unwind
5: 0x6318aaa8 - panicking::panic_fmt::h6bc794081905f967eXA
6: 0x6cd602c6 - driver::collect_crate_metadata::h58b83019adfc1339R1a
7: 0x6cd10f51 - driver::phase_2_configure_and_expand::hfb9ddf7f7541ae2dXsa
8: 0x6cd01842 - driver::compile_input::hb1aac2c29f5a3486Rba
9: 0x6cdc3c48 - run_compiler::he240a1462e2271ebv2b
10: 0x6cdc1aad - run::h34c87f0e8759e7f3b2b
11: 0x6cdc0e9b - run::h34c87f0e8759e7f3b2b
12: 0x631623a4 - sys::tcp::TcpListener::bind::hc51fae06b1861148xkH
13: 0x762e338a - BaseThreadInitThunk
14: 0x770a9f72 - RtlInitializeExceptionChain
Could not compile `ice-test`.
Caused by:
Process didn't exit successfully: `rustc src\main.rs --crate-name ice-test --crate-type bin -g --out-dir C:\Users\dradtke\carhole\rust\ice-test\target\debug --emit=dep-info,link -L dependency=C:\Users\dradtke\carhole\rust\ice-test\target\debug -L dependency=C:\Users\dradtke\carhole\rust\ice-test\target\debug\deps -L native="."` (exit code: 101)
Taking out the quotes around the search path fixes the issue and it compiles fine. The example above is contrived, but when I ran into this error, I added the quotes to avoid any possible issues with spaces in the file name, as I'm developing on Windows and that's a common problem.
I added the quotes to avoid any possible issues with spaces in the file name, as I'm developing on Windows and that's a common problem
Note that Cargo doesn't interpret quotes this way, the value of a rustc-link-search directive is all remaining bytes up to the \n (newline). So you don't have to worry about escapes or quotes or anything.
That's handy to know, but it would be a good idea to make Cargo output that suggestion or some other error rather than crash. Wrapping library paths in quotes is a common practice on Windows, given the prevalence of folder names like "Program Files" and "Documents and Settings".
Cannot reproduce it. I created a new crate and added build.rs with contents like in description. Builds fine. It probably make sense to check it on Windows.
If I set up a Cargo project with a simple
build.rs
file like this:then I get this compiler error when trying to build:
Taking out the quotes around the search path fixes the issue and it compiles fine. The example above is contrived, but when I ran into this error, I added the quotes to avoid any possible issues with spaces in the file name, as I'm developing on Windows and that's a common problem.
Rust version:
The text was updated successfully, but these errors were encountered: