Skip to content

Cross compiling to 32-bit x86 macOS stable 1.15.1 causes compiler panic #40519

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
johnthagen opened this issue Mar 14, 2017 · 5 comments
Closed
Labels
I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@johnthagen
Copy link
Contributor

Tried to cross compile my project rust-belt to 32-bit x86. On rust-belt commit johnthagen/rust-belt@55898ea.

OSX 10.11.6.

rustup show
Default host: x86_64-apple-darwin

installed toolchains
--------------------

stable-x86_64-apple-darwin (default)
nightly-x86_64-apple-darwin

installed targets for active toolchain
--------------------------------------

i686-apple-darwin
x86_64-apple-darwin

active toolchain
----------------

stable-x86_64-apple-darwin (default)
rustc 1.15.1 (021bd294c 2017-02-08)
RUST_BACKTRACE=1 cargo build --target=i686-apple-darwin
   Compiling bitflags v0.7.0
   Compiling bitflags v0.6.0
   Compiling adler32 v0.3.0
   Compiling num-traits v0.1.36
   Compiling interpolation v0.1.0
   Compiling color_quant v1.0.0
   Compiling read_color v0.1.0
   Compiling linked-hash-map v0.0.10
   Compiling glob v0.2.11
   Compiling piston-float v0.3.0
   Compiling byteorder v1.0.0
   Compiling log v0.3.6
   Compiling fnv v1.0.5
   Compiling sdl2-sys v0.27.2
   Compiling piston-texture v0.5.0
   Compiling odds v0.2.25
   Compiling scoped_threadpool v0.1.7
   Compiling pkg-config v0.3.9
   Compiling rustc-serialize v0.3.22
   Compiling lazy_static v0.2.2
   Compiling draw_state v0.6.0
   Compiling enum_primitive v0.1.1
   Compiling serde v0.8.23
   Compiling nodrop v0.1.8
   Compiling num-integer v0.1.32
   Compiling piston-viewport v0.3.0
   Compiling block v0.1.6
   Compiling xml-rs v0.3.5
   Compiling piston-shaders_graphics2d v0.3.1
   Compiling gfx_core v0.6.0
   Compiling khronos_api v1.0.0
   Compiling shader_version v0.2.1
   Compiling num-iter v0.1.32
   Compiling num-rational v0.1.35
   Compiling serde v0.7.15
   Compiling core-foundation-sys v0.2.3
   Compiling num v0.1.36
   Compiling inflate v0.1.1
   Compiling vecmath v0.3.0
   Compiling lzw v0.10.0
   Compiling piston2d-graphics v0.21.1
   Compiling gif v0.9.0
   Compiling bitflags v0.3.3
   Compiling gl_generator v0.5.2
   Compiling deflate v0.7.2
   Compiling byteorder v0.4.2
   Compiling stb_truetype v0.2.0
   Compiling arrayvec v0.3.20
   Compiling pistoncore-input v0.17.0
   Compiling libc v0.2.20
   Compiling rusttype v0.2.1
   Compiling current v0.1.2
   Compiling gl v0.6.1
   Compiling gleam v0.2.32
   Compiling gfx_gl v0.3.1
   Compiling malloc_buf v0.0.6
   Compiling objc v0.2.2
   Compiling shared_library v0.1.5
   Compiling pistoncore-window v0.26.0
   Compiling core-foundation v0.2.3
   Compiling rand v0.3.15
   Compiling png v0.6.2
   Compiling core-graphics v0.3.2
   Compiling core-graphics v0.4.2
   Compiling cocoa v0.3.3
   Compiling cocoa v0.5.2
   Compiling glutin v0.7.4
   Compiling deque v0.3.1
   Compiling time v0.1.36
error: internal compiler error: /Users/rustbuild/src/rust-buildbot/slave/stable-dist-rustc-mac/build/src/librustc_trans/mir/constant.rs:702: Unexpected non-fat-pointer operand

note: the compiler unexpectedly panicked. this is a bug.

note: we would appreciate a bug report: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports

note: run with `RUST_BACKTRACE=1` for a backtrace

thread 'rustc' panicked at 'Box<Any>', /Users/rustbuild/src/rust-buildbot/slave/stable-dist-rustc-mac/build/src/librustc_errors/lib.rs:423
stack backtrace:
   1:        0x10c2534ca - std::sys::imp::backtrace::tracing::imp::write::hd3b65cdfe843284c
   2:        0x10c25fb4f - std::panicking::default_hook::{{closure}}::hf2b7428652613d83
   3:        0x10c25f6fd - std::panicking::default_hook::h5da8f27db5582938
   4:        0x10c260016 - std::panicking::rust_panic_with_hook::hcef1e67c646c6802
   5:        0x10c06c79a - std::panicking::begin_panic::heb8e05575db73098
   6:        0x10c0810f4 - rustc_errors::Handler::bug::h31175dae0c08edd0
   7:        0x1092a138c - rustc::session::opt_span_bug_fmt::{{closure}}::hb3011a1ab2efe7c5
   8:        0x1092a0e49 - rustc::session::opt_span_bug_fmt::hcb9223dc6b534a5b
   9:        0x1092a09ca - rustc::session::bug_fmt::h92473e45e697c482
  10:        0x1084c30a4 - rustc_trans::mir::constant::MirConstContext::const_rvalue::he9618774abcdee3a
  11:        0x1084bde2e - rustc_trans::mir::constant::MirConstContext::trans::hf43001608ccab145
  12:        0x1084bdba1 - rustc_trans::mir::constant::MirConstContext::trans_def::habfc95c1ebaeb9f2
  13:        0x1084c4bed - rustc_trans::mir::constant::<impl rustc_trans::mir::MirContext<'bcx, 'tcx>>::trans_constant::h27b41ae6ad74a03e
  14:        0x1084c6c0c - rustc_trans::mir::operand::<impl rustc_trans::mir::MirContext<'bcx, 'tcx>>::trans_operand::hc01a1be0adcb3b05
  15:        0x1084c71e9 - rustc_trans::mir::rvalue::<impl rustc_trans::mir::MirContext<'bcx, 'tcx>>::trans_rvalue::ha583054fa6b1fb22
  16:        0x1084b5808 - rustc_trans::mir::block::<impl rustc_trans::mir::MirContext<'bcx, 'tcx>>::trans_block::h7b22704adf2aea7b
  17:        0x1084b3716 - rustc_trans::mir::trans_mir::h25b3be70654d8c6d
  18:        0x1084d57fc - rustc_trans::trans_item::TransItem::define::h228b4a009b417e80
  19:        0x10844c0c0 - rustc_trans::base::trans_crate::h0ef15a01f7d9c447
  20:        0x10826205b - rustc_driver::driver::phase_4_translate_to_llvm::he72e34dcc3bff444
  21:        0x108231ce6 - rustc_driver::driver::compile_input::{{closure}}::h43371a098d81924e
  22:        0x10826080f - rustc_driver::driver::phase_3_run_analysis_passes::{{closure}}::hc76c3449d8a13138
  23:        0x108249624 - rustc_driver::driver::phase_3_run_analysis_passes::hac400312f738d13f
  24:        0x10822fcfa - rustc_driver::driver::compile_input::ha5e7e88542653c4b
  25:        0x10827677b - rustc_driver::run_compiler::h606af939ee2c21bf
  26:        0x108196938 - std::panicking::try::do_call::he590fc377f9781bb
  27:        0x10c2625ca - __rust_maybe_catch_panic
  28:        0x1081b8ccf - <F as alloc::boxed::FnBox<A>>::call_box::hb6e07c708232b9b0
  29:        0x10c25ec94 - std::sys::imp::thread::Thread::new::thread_start::hf410a68837ea407b
  30:     0x7fff92ca799c - _pthread_body
  31:     0x7fff92ca7919 - _pthread_start

Build failed, waiting for other jobs to finish...
error: internal compiler error: /Users/rustbuild/src/rust-buildbot/slave/stable-dist-rustc-mac/build/src/librustc_trans/mir/constant.rs:702: Unexpected non-fat-pointer operand

note: the compiler unexpectedly panicked. this is a bug.

note: we would appreciate a bug report: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports

note: run with `RUST_BACKTRACE=1` for a backtrace

thread 'rustc' panicked at 'Box<Any>', /Users/rustbuild/src/rust-buildbot/slave/stable-dist-rustc-mac/build/src/librustc_errors/lib.rs:423
stack backtrace:
   1:        0x1048594ca - std::sys::imp::backtrace::tracing::imp::write::hd3b65cdfe843284c
   2:        0x104865b4f - std::panicking::default_hook::{{closure}}::hf2b7428652613d83
   3:        0x1048656fd - std::panicking::default_hook::h5da8f27db5582938
   4:        0x104866016 - std::panicking::rust_panic_with_hook::hcef1e67c646c6802
   5:        0x10466c79a - std::panicking::begin_panic::heb8e05575db73098
   6:        0x1046810f4 - rustc_errors::Handler::bug::h31175dae0c08edd0
   7:        0x1018b838c - rustc::session::opt_span_bug_fmt::{{closure}}::hb3011a1ab2efe7c5
   8:        0x1018b7e49 - rustc::session::opt_span_bug_fmt::hcb9223dc6b534a5b
   9:        0x1018b79ca - rustc::session::bug_fmt::h92473e45e697c482
  10:        0x100ae80a4 - rustc_trans::mir::constant::MirConstContext::const_rvalue::he9618774abcdee3a
  11:        0x100ae2e2e - rustc_trans::mir::constant::MirConstContext::trans::hf43001608ccab145
  12:        0x100ae2ba1 - rustc_trans::mir::constant::MirConstContext::trans_def::habfc95c1ebaeb9f2
  13:        0x100ae5255 - rustc_trans::mir::constant::MirConstContext::const_operand::h8c964f74760f2ba7
  14:        0x100ae56d3 - rustc_trans::mir::constant::MirConstContext::const_rvalue::he9618774abcdee3a
  15:        0x100ae2e2e - rustc_trans::mir::constant::MirConstContext::trans::hf43001608ccab145
  16:        0x100ae2ba1 - rustc_trans::mir::constant::MirConstContext::trans_def::habfc95c1ebaeb9f2
  17:        0x100ae9bed - rustc_trans::mir::constant::<impl rustc_trans::mir::MirContext<'bcx, 'tcx>>::trans_constant::h27b41ae6ad74a03e
  18:        0x100aebc0c - rustc_trans::mir::operand::<impl rustc_trans::mir::MirContext<'bcx, 'tcx>>::trans_operand::hc01a1be0adcb3b05
  19:        0x100aec1e9 - rustc_trans::mir::rvalue::<impl rustc_trans::mir::MirContext<'bcx, 'tcx>>::trans_rvalue::ha583054fa6b1fb22
  20:        0x100ada808 - rustc_trans::mir::block::<impl rustc_trans::mir::MirContext<'bcx, 'tcx>>::trans_block::h7b22704adf2aea7b
  21:        0x100ad8716 - rustc_trans::mir::trans_mir::h25b3be70654d8c6d
  22:        0x100afa7fc - rustc_trans::trans_item::TransItem::define::h228b4a009b417e80
  23:        0x100a710c0 - rustc_trans::base::trans_crate::h0ef15a01f7d9c447
  24:        0x10089005b - rustc_driver::driver::phase_4_translate_to_llvm::he72e34dcc3bff444
  25:        0x10085fce6 - rustc_driver::driver::compile_input::{{closure}}::h43371a098d81924e
  26:        0x10088e80f - rustc_driver::driver::phase_3_run_analysis_passes::{{closure}}::hc76c3449d8a13138
  27:        0x100877624 - rustc_driver::driver::phase_3_run_analysis_passes::hac400312f738d13f
  28:        0x10085dcfa - rustc_driver::driver::compile_input::ha5e7e88542653c4b
  29:        0x1008a477b - rustc_driver::run_compiler::h606af939ee2c21bf
  30:        0x1007c4938 - std::panicking::try::do_call::he590fc377f9781bb
  31:        0x1048685ca - __rust_maybe_catch_panic
  32:        0x1007e6ccf - <F as alloc::boxed::FnBox<A>>::call_box::hb6e07c708232b9b0
  33:        0x104864c94 - std::sys::imp::thread::Thread::new::thread_start::hf410a68837ea407b
  34:     0x7fff92ca799c - _pthread_body
  35:     0x7fff92ca7919 - _pthread_start

Build failed, waiting for other jobs to finish...
error: Could not compile `cocoa`.
@johnthagen johnthagen changed the title Cross compiling to macOS stable 1.15.1 causes compiler panic Cross compiling to 32-bit x86 macOS stable 1.15.1 causes compiler panic Mar 14, 2017
@steveklabnik steveklabnik added I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Mar 14, 2017
@nagisa
Copy link
Member

nagisa commented Mar 14, 2017

Likely duplicate of #38942. Please try with stable/beta.

@johnthagen
Copy link
Contributor Author

@nagisa, what do you mean? This was run with stable.

@nagisa
Copy link
Member

nagisa commented Mar 15, 2017

Err obviously I meant to tell to try with beta or nightly.

@johnthagen
Copy link
Contributor Author

johnthagen commented Mar 15, 2017

The compiler bug did not manifest on the following compiler versions using --target=i686-apple-darwin

nightly-x86_64-apple-darwin (default)
rustc 1.17.0-nightly (6f10e2f63 2017-03-14)
beta-x86_64-apple-darwin (default)
rustc 1.17.0-beta.1 (408d49e60 2017-03-14)

Though winit v0.5.10 failed to compile (not a compiler bug), so the entire build did not complete. But cocoa did compile correctly (where the particular compiler bug reported manifested).

So it seems this has been fixed upstream.

@Mark-Simulacrum
Copy link
Member

I cannot reproduce today (getting some errors in winit, yes, but no ICEs) -- I'm going to close this.

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) ❄️ T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

4 participants