Skip to content

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

Closed
@farcaller

Description

@farcaller

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions