Skip to content

error: internal compiler error: unexpected failure if -o filename is used #13317

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

Closed
farcaller opened this issue Apr 4, 2014 · 2 comments
Closed
Labels
I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️

Comments

@farcaller
Copy link
Contributor

Running rustc from 286b62e.

If I compile rust-core with --out-dir dir everything works:

rustc -g --opt-level 0 --target thumbv7m-linux-eabi -Ctarget-cpu=cortex-m3 -Z no-landing-pads   -L ./build --out-dir ./build ./rust-core/core/lib.rs
rustc -g --opt-level 0 --target thumbv7m-linux-eabi -Ctarget-cpu=cortex-m3 -Z no-landing-pads -Z lto --emit obj -L ./build -o ./build/intermediate/main.o ./src/main.rs

If I use -o file, compilation breaks with internal compiler error:

rustc -g --opt-level 0 --target thumbv7m-linux-eabi -Ctarget-cpu=cortex-m3 -Z no-landing-pads   -L ./build -o ./build/libcore-caef0f5f-0.0.rlib ./rust-core/core/lib.rs
rustc -g --opt-level 0 --target thumbv7m-linux-eabi -Ctarget-cpu=cortex-m3 -Z no-landing-pads -Z lto --emit obj -L ./build -o ./build/intermediate/main.o ./src/main.rs
error: internal compiler error: unexpected failure

Backtrace:

task 'rustc' failed at 'missing compressed bytecode in archive!', /private/tmp/rust-7IAC/src/libstd/option.rs:245
stack backtrace:
   1:        0x110ffcce4 - rt::backtrace::imp::write::hd10102b8c011e5c0a8b::v0.11.pre
   2:        0x110f60716 - rt::unwind::begin_unwind_inner::h2aba2baaa74b26e6EIb::v0.11.pre
   3:        0x10e6e9568 - rt::unwind::begin_unwind::h4a49daf87e2d595eSLp::v0.11.pre
   4:        0x10edb2723 - back::lto::run::hf3251f90d5b27d3d7V1::v0.11.pre
   5:        0x10edb0ec2 - back::link::write::run_passes::closure.83343
   6:        0x10ea9e03f - util::common::time::h8a9a37f5ab167269hpg::v0.11.pre
   7:        0x10edae864 - back::link::write::run_passes::h9411612d2651cf8bKe0::v0.11.pre
   8:        0x10eeb2281 - driver::driver::phase_5_run_llvm_passes::closure.89780
   9:        0x10ea9e03f - util::common::time::h8a9a37f5ab167269hpg::v0.11.pre
  10:        0x10eeb211d - driver::driver::phase_5_run_llvm_passes::h158ab363a68c6900Poe::v0.11.pre
  11:        0x10eeb4c92 - driver::driver::compile_input::hf4855bb3e4401cfdODe::v0.11.pre
  12:        0x10eed84ce - run_compiler::hc72c45483cbf8cefC5l::v0.11.pre
  13:        0x10eeec0fd - main_args::closure.91691
  14:        0x10eeea912 - monitor::closure.91576
  15:        0x10eee64bb - task::TaskBuilder::try::closure.91351
  16:        0x10e6ae78c - task::spawn_opts::closure.7923
  17:        0x110ff8108 - rt::task::Task::run::closure.41788
  18:        0x1110029fc - rust_try
  19:        0x110ff7f87 - rt::task::Task::run::h83564328e5810a07HB9::v0.11.pre
  20:        0x10e6ae60f - task::spawn_opts::closure.7895
  21:        0x110ffb6c6 - rt::thread::thread_start::h66f4963f837dbe56oga::v0.11.pre
  22:     0x7fff8f91f899 - _pthread_body
  23:     0x7fff8f91f72a - _pthread_struct_init

libcore-caef0f5f-0.0.rlib contents:

% ar -t libcore-caef0f5f-0.0.rlib
__.SYMDEF SORTED
libcore-caef0f5f-0.o
rust.metadata.bin
libcore-caef0f5f-0.bc.deflate
alexcrichton added a commit to alexcrichton/rust that referenced this issue Apr 4, 2014
When performing LTO, bytecode is loaded from an archive by using the crate id's
name. If the -o flag was specified when building the original library, it
previously also mangled the name of the bytecode.

This switches to always using the crate id's name when naming the bytecode file,
ensuring that it can always be loaded at a later date, regardless of -o.

Closes rust-lang#13317
@huonw huonw added the I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ label Sep 10, 2014
@steveklabnik
Copy link
Member

Hey @farcaller , is this ICE still happening? It's been quite a while, and rust-core isn't a project anymore, so I'm not sure how best to reproduce.

@farcaller
Copy link
Contributor Author

Haven't seen it in a while and can't reproduce now. I think it's safe to close.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants