Closed
Description
This is happening on all my calls to rustc (on old code) since I updated my rust installation (from approximately rustc 0.10-pre). I have no idea what's the origin of the problem.
I'm using:
Linux 3.10.32-2-MANJARO x86_64
rustc 0.11-pre (e01e78f 2014-04-24 03:21:28 -0700)
Here is the problem:
$ RUST_BACKTRACE=1 rustc src/lib.rs --crate-type dylib --out-dir lib -L lib -L extlib
error: internal compiler error: unexpected failure
note: the compiler hit an unexpected failure path. this is a bug.
note: we would appreciate a bug report: http://static.rust-lang.org/doc/master/complement-bugreport.html
note: run with `RUST_BACKTRACE=1` for a backtrace
task 'rustc' failed at 'No triple in crate', /[...]/rust/src/libstd/option.rs:245
stack backtrace:
1: 0x7f8eee524730 - rt::backtrace::imp::write::hc86ba04aed6ac33aTva::v0.11.pre
2: 0x7f8eee4841a0 - rt::unwind::begin_unwind_inner::h0cc55cf2fa478ddbY59::v0.11.pre
3: 0x7f8eeeecff10 - rt::unwind::begin_unwind::h3288594639969284230::v0.11.pre
4: 0x7f8eef65b3b0 - metadata::decoder::get_crate_triple::h6a949d6eff0be550e5b::v0.11.pre
5: 0x7f8eef674bd0 - metadata::loader::Context<'a>::extract_one::hbe9b35dad4445b1eipe::v0.11.pre
6: 0x7f8eef66db00 - metadata::loader::Context<'a>::find_library_crate::hfc96b2d38ef39aefBSd::v0.11.pre
7: 0x7f8eef669d70 - metadata::loader::Context<'a>::load_library_crate::hdcc203df51d4d408ZEd::v0.11.pre
8: 0x7f8eef6656d0 - metadata::creader::resolve_crate::h4bd8e1cb627f7c28PGc::v0.11.pre
9: 0x7f8eef65e8c0 - metadata::creader::Env<'a>.visit..Visitor<(*>::visit_view_item::h8c5d2564889c01986fc::v0.11.pre
10: 0x7f8eef65dae0 - metadata::creader::read_crates::hfda7e8030c276a23dfc::v0.11.pre
11: 0x7f8eef2ba6a0 - util::common::time::h13269125970760904882::v0.11.pre
12: 0x7f8eef6f7ea0 - driver::driver::phase_3_run_analysis_passes::h6e37642aa8826fc12Rf::v0.11.pre
13: 0x7f8eef6fe3e0 - driver::driver::compile_input::hcb3c3488391803230hg::v0.11.pre
14: 0x7f8eef7230c0 - run_compiler::hd77164d8a65f1492ROn::v0.11.pre
15: 0x7f8eef73af40 - main_args::closure.91672
16: 0x7f8eef739440 - monitor::closure.91547
17: 0x7f8eef734d30 - task::TaskBuilder::try::closure.91313
18: 0x7f8ef14ddff0 - task::spawn_opts::closure.7137
19: 0x7f8eee51f770 - rt::task::Task::run::closure.40104
20: 0x7f8eee52a670 - rust_try
21: 0x7f8eee51f5b0 - rt::task::Task::run::h8f837b74e7c2ff5ciW7::v0.11.pre
22: 0x7f8ef14dddc0 - task::spawn_opts::closure.7110
23: 0x7f8eee523270 - rt::thread::thread_start::h074637b95d62dca2eB8::v0.11.pre
24: 0x7f8eede5dfe0 - start_thread
25: 0x7f8eee158ce9 - clone
26: 0x0 - <unknown>
This is my first bug report, I hope it is useful.
Activity
alexcrichton commentedon Apr 24, 2014
This was recently added, so it probably means that you need to recompile some upstream crates. If you do so, does the ICE go away for you?
Bastacyclop commentedon Apr 24, 2014
When I try to compile rust-sfml, the library outputs no error but the pong example outputs this ICE.
(https://github.com/jeremyletang/rust-sfml)
When I try to compile something without extern crates, it works.
I just tried this code and I got the error:
Bastacyclop commentedon Apr 24, 2014
I repulled and recompiled rust and the problem is gone, maybe it has been fixed during the day ?
conradkleinespel commentedon Apr 25, 2014
I don't know if comments are seen on closed issues. However, I'm having this problem too. Just downloaded the nightly version of Rust from http://www.rust-lang.org.
rustc 0.11-pre-nightly (eea4909 2014-04-24 23:41:15 -0700)
host: x86_64-apple-darwin OSX 10.9.2
I note that I don't have this issue with the same file, when using rustc 0.10 installed via Homebrew.
Let me know if I can help somehow (with more information about my system or other things).
Here's the backtrace of the command I ran:
AngryLawyer commentedon Apr 28, 2014
I just ran a fresh build of Rust from Master, on OSX, and I'm getting a similar error:
My build script builds all my dependencies from scratch, so I don't believe it's due to one of them being an older version :(
alexcrichton commentedon Apr 28, 2014
Is there example code that you are compiling that I could test as well? (or example build scripts)
AngryLawyer commentedon Apr 29, 2014
Not easily, the stuff I'm currently on is closed source :(
I'll see if I can knock something together though.
conradkleinespel commentedon Apr 29, 2014
I'll test this again tonight and try to find the piece of code that triggered the error for me.
Edit: Can't seem to find the piece of code that was causing the bug for me. However, @schuster 's example with the create
time
does cause this on my side too.AngryLawyer commentedon Apr 29, 2014
Manually killing off all of the rust libraries on my system before doing a build seems to have fixed this for me
schuster commentedon May 2, 2014
I'm running into this myself. Like the others, I had a previous version of Rust (0.8, I believe) and tried to install a nightly (rustc 0.11-pre-nightly (f77784b 2014-04-29 19:46:44 -0700)) last night. I narrowed it down to this program:
extern crate time;
fn main() {}
Notably, "time" causes this problem, but "std" doesn't. It might be because when I had compiled a larger version of this program before with "time", but had possibly never compiled "std". So perhaps the nightly isn't noticing that some compiled versions of libraries were compiled under and old, incompatible version of Rust?
I'm happy to run tests if that helps narrow down the problem, since it sounds like this is an environment-specific issue. If it helps, here's my output of uname -a:
Linux atlantis 3.14.0-4-ARCH #1 SMP PREEMPT Wed Apr 9 21:11:25 CEST 2014 x86_64 GNU/Linux
mboeh commentedon May 2, 2014
I encountered this when installing a nightly over a previously installed version. Manually removing all Rust-related files from the install prefix (/usr/local in this case) and reinstalling the nightly fixed the problem.
find /usr/local -iname '*rust*'
helped track down all the relevant files.passcod commentedon May 15, 2014
Getting this too, after switching from v0.10 to Nightly on Arch Linux. Using passcod/rast. Gist: https://gist.github.com/passcod/23f905be1beaf3e88063
Auto merge of rust-lang#13730 - lowr:feat/builtin-macro-helper-attr, …
unnecessary_map_or: fix version for lint addition (rust-lang#13733)