{"action":"opened","issue":{"url":"https://api.github.com/repos/rust-lang/rust/issues/23667","labels_url":"https://api.github.com/repos/rust-lang/rust/issues/23667/labels{/name}","comments_url":"https://api.github.com/repos/rust-lang/rust/issues/23667/comments","events_url":"https://api.github.com/repos/rust-lang/rust/issues/23667/events","html_url":"https://github.com/rust-lang/rust/issues/23667","id":64094715,"number":23667,"title":"ICE; wrapping a library search path in quotes causes Rust to panic.","user":{"login":"dradtke","id":929204,"avatar_url":"https://avatars.githubusercontent.com/u/929204?v=3","gravatar_id":"","url":"https://api.github.com/users/dradtke","html_url":"https://github.com/dradtke","followers_url":"https://api.github.com/users/dradtke/followers","following_url":"https://api.github.com/users/dradtke/following{/other_user}","gists_url":"https://api.github.com/users/dradtke/gists{/gist_id}","starred_url":"https://api.github.com/users/dradtke/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dradtke/subscriptions","organizations_url":"https://api.github.com/users/dradtke/orgs","repos_url":"https://api.github.com/users/dradtke/repos","events_url":"https://api.github.com/users/dradtke/events{/privacy}","received_events_url":"https://api.github.com/users/dradtke/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-03-24T20:39:16Z","updated_at":"2015-03-24T20:39:16Z","closed_at":null,"body":"If I set up a Cargo project with a simple `build.rs` file like this:\r\n\r\n```rust\r\nfn main() {\r\n    println!(\"cargo:rustc-link-search=native=\\\".\\\"\");\r\n}\r\n```\r\n\r\nthen I get this compiler error when trying to build:\r\n\r\n```\r\n   Compiling ice-test v0.0.1 (file:///C:/Users/dradtke/carhole/rust/ice-test)\r\n     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=\".\"`\r\nerror: internal compiler error: unexpected panic\r\nnote: the compiler unexpectedly panicked. this is a bug.\r\nnote: we would appreciate a bug report: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports\r\nnote: run with `RUST_BACKTRACE=1` for a backtrace\r\nthread '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\r\n\r\nstack backtrace:\r\n   1: 0x6316dc46 - rt::unwind::register::h27ef7cd182e9296cKUI\r\n   2: 0x630c37dc - rt::unwind::begin_unwind_inner::hefe36366e50f3af8URI\r\n   3: 0x630c3b57 - rt::unwind::begin_unwind_fmt::h97d5284c0d9beb8cvQI\r\n   4: 0x6316d920 - rust_begin_unwind\r\n   5: 0x6318aaa8 - panicking::panic_fmt::h6bc794081905f967eXA\r\n   6: 0x6cd602c6 - driver::collect_crate_metadata::h58b83019adfc1339R1a\r\n   7: 0x6cd10f51 - driver::phase_2_configure_and_expand::hfb9ddf7f7541ae2dXsa\r\n   8: 0x6cd01842 - driver::compile_input::hb1aac2c29f5a3486Rba\r\n   9: 0x6cdc3c48 - run_compiler::he240a1462e2271ebv2b\r\n  10: 0x6cdc1aad - run::h34c87f0e8759e7f3b2b\r\n  11: 0x6cdc0e9b - run::h34c87f0e8759e7f3b2b\r\n  12: 0x631623a4 - sys::tcp::TcpListener::bind::hc51fae06b1861148xkH\r\n  13: 0x762e338a - BaseThreadInitThunk\r\n  14: 0x770a9f72 - RtlInitializeExceptionChain\r\n\r\nCould not compile `ice-test`.\r\n\r\nCaused by:\r\n  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)\r\n```\r\n\r\nTaking 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.\r\n\r\nRust version:\r\n\r\n```\r\nrustc 1.0.0-nightly (809a554fc 2015-03-23) (built 2015-03-24)\r\nbinary: rustc\r\ncommit-hash: 809a554fca2d0ebc2ba50077016fe282a4064752\r\ncommit-date: 2015-03-23\r\nbuild-date: 2015-03-24\r\nhost: i686-pc-windows-gnu\r\nrelease: 1.0.0-nightly\r\n```"}}