-
Notifications
You must be signed in to change notification settings - Fork 13k
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 trying to cross compile with xargo #47040
Comments
Same here. First time trying to follow @japaric's cortex-m-quickstart instructions, using blue pill board support crate. Only difference I can spot in the error or trace is the
|
Same here, trying to build for arm target using xargo.
|
I think this is breakage caused by the new Minimal repro: // foo/src/lib.rs
#![feature(lang_items)]
#![no_std]
#[lang = "eh_personality"]
fn eh_personality() {}
#[lang = "panic_fmt"]
fn panic_fmt() {}
#[lang = "start"]
extern "C" fn start(main: fn(), _argc: isize, _argv: *const *const u8) -> isize {
main();
0
} // bar/src/main.rs
#![no_std]
extern crate foo;
fn main() {} $ cd bar
$ tail Cargo.toml
[dependencies]
foo = { path = "../foo" }
$ cargo build
Compiling bar v0.1.0 (file:///home/japaric/tmp/bar)
error: internal compiler error: /checkout/src/librustc_metadata/cstore_impl.rs:131: get_optimized_mir: missing MIR for `DefId(2/0:5 ~ foo[128e]::start[0])`
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: rustc 1.24.0-nightly (77e189cd7 2017-12-28) running on x86_64-unknown-linux-gnu
thread 'rustc' panicked at 'Box<Any>', /checkout/src/librustc_errors/lib.rs:504:9
note: Run with `RUST_BACKTRACE=1` for a backtrace.
error: Could not compile `bar`.
To learn more, run the command again with --verbose. The error here is that the signature of the |
Off-topic for the actual rustc issue but related to the sympton reported by the OP: The people that have been experiencing the ICE with the cortex-m-quickstart Cargo template and/or with the cortex-m-rt dependency should switch to version v0.3.8 of cortex-m-rt. The ICE should be gone when using that version. Calling |
Hmm with the latest nightly and updated cortex-m-rt crate I get a segmentation fault from rustc! (In the LLVM parts, so I guess it's not Rusts fault 😉)
|
Segfaults inside of LLVM are actually often rustc's fault. It'll happen if you feed it invalid data and have it built with assertions disabled. |
With rustc 1.24.0-nightly (b65f0be 2018-01-01) I no longer get the segfault either |
I still get a segfault with rustc 1.25.0-nightly (3f92e8d 2018-01-14)
|
I encountered this problem in #48119. I worked around the LLVM assert by making my lang_start function signature match the one in the standard library (returns an isize not !), which is different than the example in RFC 1937. |
ping from triage: Status? |
Well this is a pretty old bug and I'm not sure if it is worth to try and reproduce, since |
Closing this as it is an old issue |
I got an internal compiler error when trying to cross compile a project with the latest nightly using xargo.
The text was updated successfully, but these errors were encountered: