Skip to content
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

task 'rustc' failed at 'No triple in crate' #13730

Closed
Bastacyclop opened this issue Apr 24, 2014 · 12 comments
Closed

task 'rustc' failed at 'No triple in crate' #13730

Bastacyclop opened this issue Apr 24, 2014 · 12 comments

Comments

@Bastacyclop
Copy link

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.

@alexcrichton
Copy link
Member

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
Copy link
Author

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:

extern crate collections;

fn main () {
    println!("This is a test");
}

@Bastacyclop
Copy link
Author

I repulled and recompiled rust and the problem is gone, maybe it has been fixed during the day ?

@conradkleinespel
Copy link
Contributor

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:

shell $> RUST_BACKTRACE=1 rustc test.rs
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', /Users/rustbuild/src/rust-buildbot/slave/nightly-mac/build/src/libstd/option.rs:245
stack backtrace:
   1:        0x102e24844 - rt::backtrace::imp::write::h254d0a6dd1fae24biCa::v0.11.pre
   2:        0x102d868de - rt::unwind::begin_unwind_inner::h6e474448729455a4oca::v0.11.pre
   3:        0x1000f5d58 - rt::unwind::begin_unwind::h11500859575803473188::v0.11.pre
   4:        0x100845b87 - metadata::decoder::get_crate_triple::h55d8343241d15157rQb::v0.11.pre
   5:        0x10085ed0a - metadata::loader::Context<'a>::extract_one::hed57ece8b2ef4096nbe::v0.11.pre
   6:        0x10085836a - metadata::loader::Context<'a>::find_library_crate::h1f72c6a1abaf2bedGEd::v0.11.pre
   7:        0x100853e0f - metadata::loader::Context<'a>::load_library_crate::h5e7923cd92f974214qd::v0.11.pre
   8:        0x10084fd64 - metadata::creader::resolve_crate::h611b40168b787d362rc::v0.11.pre
   9:        0x100848d7b - metadata::creader::Env<'a>.visit..Visitor<(*>::visit_view_item::h65cca42091d33f2fj1b::v0.11.pre
  10:        0x1008480bd - metadata::creader::read_crates::h7532ce1f7c6177deq0b::v0.11.pre
  11:        0x1004c279f - util::common::time::h14699901310049870540::v0.11.pre
  12:        0x1008dcd6d - driver::driver::phase_3_run_analysis_passes::h8e28097da6e59f487Df::v0.11.pre
  13:        0x1008e3f62 - driver::driver::compile_input::h5c1c854541bd3a7eU3f::v0.11.pre
  14:        0x100909dd2 - run_compiler::h62e9fe55eaa01b0dLAn::v0.11.pre
  15:        0x10091dc4d - main_args::closure.91516
  16:        0x10091bfe2 - monitor::closure.91391
  17:        0x100917b2b - task::TaskBuilder::try::closure.91157
  18:        0x102a7347c - task::spawn_opts::closure.7105
  19:        0x102e1f948 - rt::task::Task::run::closure.40126
  20:        0x102e296bc - rust_try
  21:        0x102e1f7c7 - rt::task::Task::run::h67dcf35100df5a07Y27::v0.11.pre
  22:        0x102a732ff - task::spawn_opts::closure.7077
  23:        0x102e23216 - rt::thread::thread_start::he31c712e1f859f82bI8::v0.11.pre
  24:     0x7fff96a42899 - _pthread_body
  25:     0x7fff96a4272a - _pthread_struct_init

@AngryLawyer
Copy link

I just ran a fresh build of Rust from Master, on OSX, and I'm getting a similar error:

rustc 0.11-pre (7a19a82 2014-04-27 23:06:41 -0700)
host: x86_64-apple-darwin

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', /Users/tony/Projects/rust/src/libstd/option.rs:245
stack backtrace:
   1:        0x10579ab54 - rt::backtrace::imp::write::h5284f6f000f6ae7bWEa::v0.11.pre
   2:        0x1056fca6e - rt::unwind::begin_unwind_inner::hc5e220aa52d760b32ea::v0.11.pre
   3:        0x102adad88 - rt::unwind::begin_unwind::h6977348054022664160::v0.11.pre
   4:        0x103228217 - metadata::decoder::get_crate_triple::hae33c85ffcba99a6dPb::v0.11.pre
   5:        0x10324126a - metadata::loader::Context<'a>::extract_one::hbae40514abfb3cb199d::v0.11.pre
   6:        0x10323a90e - metadata::loader::Context<'a>::find_library_crate::h1d5c45db7d0b039esDd::v0.11.pre
   7:        0x10323639f - metadata::loader::Context<'a>::load_library_crate::h92462d1eea86e631Qpd::v0.11.pre
   8:        0x1032322f4 - metadata::creader::resolve_crate::hb4385703dd61ea90Oqc::v0.11.pre
   9:        0x10322b40b - metadata::creader::Env<'a>.visit..Visitor<(*>::visit_view_item::hc9a02c7fe0c35bff5Zb::v0.11.pre
  10:        0x10322a74d - metadata::creader::read_crates::hed35785f57159931cZb::v0.11.pre
  11:        0x102ea73ff - util::common::time::h11798269188829317611::v0.11.pre
  12:        0x1032beead - driver::driver::phase_3_run_analysis_passes::h2d57781201399e76TCf::v0.11.pre
  13:        0x1032c60a2 - driver::driver::compile_input::h180868b11ee2bee3G2f::v0.11.pre
  14:        0x1032ebec2 - run_compiler::hea20b259c2288aeaxzn::v0.11.pre
  15:        0x1032ffd3d - main_args::closure.91451
  16:        0x1032fe0d2 - monitor::closure.91326
  17:        0x1032f9c1b - task::TaskBuilder::try::closure.91092
  18:        0x1053da77c - task::spawn_opts::closure.7106
  19:        0x105795c58 - rt::task::Task::run::closure.40156
  20:        0x10579f9fc - rust_try
  21:        0x105795ad7 - rt::task::Task::run::h4f0d7c454c92123fC57::v0.11.pre
  22:        0x1053da5ff - task::spawn_opts::closure.7078
  23:        0x105799526 - rt::thread::thread_start::h8daeca6a5e3b3ec6PK8::v0.11.pre
  24:     0x7fff8ae67899 - _pthread_body
  25:     0x7fff8ae6772a - _pthread_struct_init

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
Copy link
Member

Is there example code that you are compiling that I could test as well? (or example build scripts)

@AngryLawyer
Copy link

Not easily, the stuff I'm currently on is closed source :(
I'll see if I can knock something together though.

@conradkleinespel
Copy link
Contributor

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
Copy link

Manually killing off all of the rust libraries on my system before doing a build seems to have fixed this for me

@schuster
Copy link

schuster commented 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
Copy link

mboeh commented 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
Copy link
Contributor

passcod commented 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

arcnmx pushed a commit to arcnmx/rust that referenced this issue Dec 17, 2022
…r=Veykril

Support builtin derive macro helper attributes

Closes rust-lang#13244

It's a bit wasteful for `Macro2Data` to have `helpers` field currently just for `Default` derive macro, but I tend to think it's okay for the time being given how rare macro2's are used.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants