cargo: Still cannot build project with 'panic = abort'
This time compiler plugins seem to be the culprit
alexbool@alexbool-osx ~/D/I/nounwind> cat Cargo.toml
[package]
name = "nounwind"
version = "0.1.0"
authors = ["Alexander Bulaev <alexbool@yandex-team.ru>"]
[dependencies]
quasi_macros = "*"
[profile.release]
panic = "abort"
alexbool@alexbool-osx ~/D/I/nounwind> cat src/main.rs
extern crate quasi_macros;
fn main() {
}
alexbool@alexbool-osx ~/D/I/nounwind> cargo build --release
Updating registry `https://github.com/rust-lang/crates.io-index`
Compiling aster v0.16.0
Compiling quasi_codegen v0.10.0
Compiling quasi_macros v0.10.0
error: the linked panic runtime `panic_unwind` is not compiled with this crate's panic strategy `abort`
error: aborting due to previous error
error: Could not compile `quasi_macros`.
To learn more, run the command again with --verbose.
This time adding
[profile.dev]
panic = "abort"
doesn’t help
Meta:
alexbool@alexbool-osx ~/D/I/nounwind> rustc -vV
rustc 1.10.0-nightly (57ef01513 2016-05-23)
binary: rustc
commit-hash: 57ef015132ec09345b88d2ec20a9d9809b5d3dfc
commit-date: 2016-05-23
host: x86_64-apple-darwin
release: 1.10.0-nightly
alexbool@alexbool-osx ~/D/I/nounwind> cargo -vV
cargo 0.11.0-nightly (ca743f3 2016-05-23)
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Reactions: 3
- Comments: 15 (8 by maintainers)
Commits related to this issue
- Fix panic=abort when compiling with plugins Closes #2738 — committed to alexcrichton/cargo by alexcrichton 8 years ago
- Auto merge of #2954 - alexcrichton:panic-abort-plugins, r=brson Fix panic=abort when compiling with plugins Closes #2738 — committed to rust-lang/cargo by bors 8 years ago
- Important fix: make fuzzer able to tell different bugs appart (again) **Context:** For the fuzzer to be able to "understand" that something went wrong, like a panic, the process must terminate in an... — committed to rust-fuzz/honggfuzz-rs by PaulGrandperrin 6 years ago
- Important fix: make fuzzer able to tell different bugs appart (again) **Context:** For the fuzzer to be able to "understand" that something went wrong, like a panic, the process must terminate in an... — committed to rust-fuzz/honggfuzz-rs by PaulGrandperrin 6 years ago
@Jragonmiris ah unfortunately that’s a bad error message but it’s because of
crate-type = ["dylib", "rlib"]in thec_veccrate. This causes Cargo to pass-C prefer-dynamicwhich links to the dylib that we ship which is compiled againstpanic_unwind, meaning theabortmode is indeed invalid (this error is coming from the compiler).The fix here would be to remove
"dylib"from thec_veccrate.@alexcrichton if it’s hard to fix, maybe it’s easier to detect that problem and tell the user why it’s broken and link to this here. That was surprisingly hard to google for and it wastes quite a bit of time.