public inbox for openembedded-core@lists.openembedded.org
 help / color / mirror / Atom feed
* [rust] error: the crate panic_abort does not have the panic strategy abort
@ 2022-01-14 14:21 Francesco Pham
  2022-01-14 14:42 ` [OE-core] " Alexander Kanavin
  0 siblings, 1 reply; 3+ messages in thread
From: Francesco Pham @ 2022-01-14 14:21 UTC (permalink / raw)
  To: openembedded-core

Hi,
the following error appears when trying to build a simple rust hello
world that uses panic set to abort mode.

> | DEBUG: Executing shell function do_compile
> | NOTE: cargo = /home/francesco/Desktop/poky/build/tmp/work/core2-64-poky-linux/rust-panic-test/git-r0/recipe-sysroot-native/usr/bin/cargo
> | NOTE: rustc =
> | NOTE: cargo build -v --target x86_64-poky-linux --release --manifest-path=/home/francesco/Desktop/poky/build/tmp/work/core2-64-poky-linux/rust-panic-test/git-r0/git//Cargo.toml
> |    Compiling rust-hello-world v0.0.1 (/home/francesco/Desktop/poky/build/tmp/work/core2-64-poky-linux/rust-panic-test/git-r0/git)
> |     Building [                             ] 0/1: rust-hello-world(bin)
> |      Running `rustc --crate-name rust_hello_world --edition=2018 src/main.rs --error-format=json --json=diagnostic-rendered-ansi --crate-type bin --emit=dep-info,link -C opt-level=3 -C panic=abort -C lto -C metadata=38cc6f415494c65c -C extra-filename=-38cc6f415494c65c --out-dir /home/francesco/Desktop/poky/build/tmp/work/core2-64-poky-linux/rust-panic-test/git-r0/build/target/x86_64-poky-linux/release/deps --target x86_64-poky-linux -C linker=/home/francesco/Desktop/poky/build/tmp/work/core2-64-poky-linux/rust-panic-test/git-r0/wrapper/target-rust-ccld -L dependency=/home/francesco/Desktop/poky/build/tmp/work/core2-64-poky-linux/rust-panic-test/git-r0/build/target/x86_64-poky-linux/release/deps -L dependency=/home/francesco/Desktop/poky/build/tmp/work/core2-64-poky-linux/rust-panic-test/git-r0/build/target/release/deps -L /home/francesco/Desktop/poky/build/tmp/work/core2-64-poky-linux/rust-panic-test/git-r0/recipe-sysroot/usr/lib/rust --remap-path-prefix=/home/francesco/Desktop/poky/build/tmp/work/core2-64-poky-linux/rust-panic-test/git-r0=/usr/src/debug/rust-panic-test/git-r0`
> | error: the crate `panic_abort` does not have the panic strategy `abort`
> |
> | error: aborting due to previous error
> |
> | error: could not compile `rust-hello-world`
> |
> | Caused by:
> |   process didn't exit successfully: `rustc --crate-name rust_hello_world --edition=2018 src/main.rs --error-format=json --json=diagnostic-rendered-ansi --crate-type bin --emit=dep-info,link -C opt-level=3 -C panic=abort -C lto -C metadata=38cc6f415494c65c -C extra-filename=-38cc6f415494c65c --out-dir /home/francesco/Desktop/poky/build/tmp/work/core2-64-poky-linux/rust-panic-test/git-r0/build/target/x86_64-poky-linux/release/deps --target x86_64-poky-linux -C linker=/home/francesco/Desktop/poky/build/tmp/work/core2-64-poky-linux/rust-panic-test/git-r0/wrapper/target-rust-ccld -L dependency=/home/francesco/Desktop/poky/build/tmp/work/core2-64-poky-linux/rust-panic-test/git-r0/build/target/x86_64-poky-linux/release/deps -L dependency=/home/francesco/Desktop/poky/build/tmp/work/core2-64-poky-linux/rust-panic-test/git-r0/build/target/release/deps -L /home/francesco/Desktop/poky/build/tmp/work/core2-64-poky-linux/rust-panic-test/git-r0/recipe-sysroot/usr/lib/rust --remap-path-prefix=/home/francesco/Desktop/poky/build/tmp/work/core2-64-poky-linux/rust-panic-test/git-r0=/usr/src/debug/rust-panic-test/git-r0` (exit status: 1)
> | WARNING: exit code 101 from a shell command.

A similar error also appears when the panic strategy is set to unwind
The recipe, generated using cargo bitbake, is as follows:

> inherit cargo
> SRC_URI += "git://git@github.com/frankplus/rust-hello-world.git;protocol=https;branch=master"
> SRCREV = "68b7f7ee7df6e08a0411ba7157761145c43baf5d"
> S = "${WORKDIR}/git"
> SUMMARY = "rust-hello-world"
> HOMEPAGE = "https://github.com/frankplus/rust-hello-world"
> LICENSE = "MIT | Apache-2.0"
> LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=e6b2207ac3740d2d01141c49208c2147"

Version: honister @ f286eef, master @ f9f3e1
Component: meta/recipes-devtools/rust
Relate-to: https://github.com/meta-rust/meta-rust/issues/343


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-03-23 15:57 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-01-14 14:21 [rust] error: the crate panic_abort does not have the panic strategy abort Francesco Pham
2022-01-14 14:42 ` [OE-core] " Alexander Kanavin
2022-03-23 15:57   ` Randy MacLeod

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox