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

ICE when building the compiler with RUSTFLAGS=-g #15027

Closed
rpjohnst opened this issue Jun 19, 2014 · 5 comments
Closed

ICE when building the compiler with RUSTFLAGS=-g #15027

rpjohnst opened this issue Jun 19, 2014 · 5 comments
Labels
A-debuginfo Area: Debugging information in compiled programs (DWARF, PDB, etc.)

Comments

@rpjohnst
Copy link
Contributor

I'm on Arch Linux x86_64, I configured the compiler with plain ./configure, on commit 6d8342f5e9f7093694548e761ee7df4f55243f3f. While the build is on this step:

rustc: x86_64-unknown-linux-gnu/stage0/lib/rustlib/x86_64-unknown-linux-gnu/bin/rustc

I get this error:

error: internal compiler error: Type metadata for unique id '{&{&[]{struct dbb1b1faf5a54dab/2157e}}}' is already in the TypeMap!`

With this backtrace:

stack backtrace:
   1:     0x7f4f637f4030 - rt::backtrace::imp::write::hd68321808750660aVJp::v0.11.0.pre
   2:     0x7f4f637face0 - failure::on_fail::h154edd018f1bf2ddb5p::v0.11.0.pre
   3:     0x7f4f63f94990 - unwind::begin_unwind_inner::hd705cb6b794f80b52Sd::v0.11.0.pre
   4:     0x7f4f628f9900 - unwind::begin_unwind::h9854036616545136218::v0.11.0.pre
   5:     0x7f4f628fa380 - diagnostic::Handler::bug::hf4942befc9aaa08ae4b::v0.11.0.pre
   6:     0x7f4f6466b9b0 - driver::session::Session::bug::h62d28c74abdced97a9w::v0.11.0.pre
   7:     0x7f4f647bce50 - middle::trans::debuginfo::TypeMap::register_unique_id_with_metadata::ha322802a27d8506auxB::v0.11.0.pre
   8:     0x7f4f647c85e0 - middle::trans::debuginfo::type_metadata::ha6587b278ab9472c87D::v0.11.0.pre
   9:     0x7f4f647d1db0 - middle::trans::debuginfo::MemberDescriptionFactory::create_member_descriptions::hbb82ea95bc203ed8S2C::v0.11.0.pre
  10:     0x7f4f647d4770 - middle::trans::debuginfo::RecursiveTypeDescription::finalize::h172a9c81d3fa73fb14C::v0.11.0.pre
  11:     0x7f4f647c85e0 - middle::trans::debuginfo::type_metadata::ha6587b278ab9472c87D::v0.11.0.pre
  12:     0x7f4f647c85e0 - middle::trans::debuginfo::type_metadata::ha6587b278ab9472c87D::v0.11.0.pre
  13:     0x7f4f647dd760 - middle::trans::debuginfo::subroutine_type_metadata::hab304051bb4931acO3D::v0.11.0.pre
  14:     0x7f4f647c85e0 - middle::trans::debuginfo::type_metadata::ha6587b278ab9472c87D::v0.11.0.pre
  15:     0x7f4f64756650 - middle::trans::debuginfo::create_function_debug_context::h551395b1c8ceede8BmC::v0.11.0.pre
  16:     0x7f4f646bd4f0 - middle::trans::base::new_fn_ctxt::h14929bd3a73789b8Naq::v0.11.0.pre
  17:     0x7f4f6475b340 - middle::trans::base::trans_closure::h65a687f94d00498fSoq::v0.11.0.pre
  18:     0x7f4f6466cd40 - middle::trans::base::trans_fn::hdc8f7c61ccd79580Vwq::v0.11.0.pre
  19:     0x7f4f64666010 - middle::trans::base::trans_item::h0d2beb0c7408fa1fnNq::v0.11.0.pre
  20:     0x7f4f646a1500 - visit::Visitor::visit_block::h10191743604182817780::v0.11.0.pre
  21:     0x7f4f646a1500 - visit::Visitor::visit_block::h10191743604182817780::v0.11.0.pre
  22:     0x7f4f646a0460 - visit::walk_expr::h17947220027483757976::v0.11.0.pre
  23:     0x7f4f646a1500 - visit::Visitor::visit_block::h10191743604182817780::v0.11.0.pre
  24:     0x7f4f646a1fe0 - visit::Visitor::visit_fn::h2285760730414270531::v0.11.0.pre
  25:     0x7f4f647610f0 - middle::trans::meth::trans_impl::h6256bcdcefe94055Rtw::v0.11.0.pre
  26:     0x7f4f64666010 - middle::trans::base::trans_item::h0d2beb0c7408fa1fnNq::v0.11.0.pre
  27:     0x7f4f64666010 - middle::trans::base::trans_item::h0d2beb0c7408fa1fnNq::v0.11.0.pre
  28:     0x7f4f64666010 - middle::trans::base::trans_item::h0d2beb0c7408fa1fnNq::v0.11.0.pre
  29:     0x7f4f6476b520 - middle::trans::base::trans_crate::ha8449dece161a4f80Gr::v0.11.0.pre
  30:     0x7f4f64f650f0 - driver::driver::phase_4_translate_to_llvm::h3205c42d1e774d83Hjw::v0.11.0.pre
  31:     0x7f4f64f59d70 - driver::driver::compile_input::h9565f67bca8cc63dLYv::v0.11.0.pre
  32:     0x7f4f65019ef0 - driver::run_compiler::h3c56844536e03c3cLGy::v0.11.0.pre
  33:     0x7f4f65019df0 - driver::main_args::closure.117369
  34:     0x7f4f65033d30 - driver::monitor::closure.118564
  35:     0x7f4f6502eef0 - task::TaskBuilder::try::closure.118289
  36:     0x7f4f6700dff0 - task::spawn_opts::closure.7590
  37:     0x7f4f63f914f0 - task::Task::run::closure.5350
  38:     0x7f4f64004cc0 - rust_try
  39:     0x7f4f63f93f20 - unwind::try::he7a8528ce77e1217oHd::v0.11.0.pre
  40:     0x7f4f63f91350 - task::Task::run::hb15978d9de89989eHWc::v0.11.0.pre
  41:     0x7f4f6700ddb0 - task::spawn_opts::closure.7561
  42:     0x7f4f63f93580 - thread::thread_start::h3040a1afbabdead5bed::v0.11.0.pre
  43:     0x7f4f63276060 - start_thread
  44:     0x7f4f63c68489 - __clone
  45:                0x0 - <unknown>
@sfackler
Copy link
Member

cc @michaelwoerister

@michaelwoerister
Copy link
Member

Thanks for the report. This is a duplicate of #14871. The issue has hopefully been fixed already but the fix is not yet part of the latest stage0 snapshot. You can get a rustc version with debuginfo by running RUSTFLAGS_STAGE2=-g make rustc-stage2. This way the stage1 compiler will already contain the fix and won't crash when building stage2 with debuginfo.

@luqmana
Copy link
Member

luqmana commented Jun 19, 2014

@michaelwoerister A new snapshot has landed so just RUSTFLAGS should work now.

@michaelwoerister
Copy link
Member

@luqmana Yep, for me it works. Do you still get the crash?

@rpjohnst
Copy link
Contributor Author

@michaelwoerister It works now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-debuginfo Area: Debugging information in compiled programs (DWARF, PDB, etc.)
Projects
None yet
Development

No branches or pull requests

4 participants