Perhaps you could look at how this is handled in mozjs recipe in meta-oe, I vaguely remember it forces panic strategy to something incompatible and I patched it to match..
Alex On Fri, 14 Jan 2022 at 15:21, Francesco Pham <pham.france...@gmail.com> wrote: > 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:// > g...@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 > > > >
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#160570): https://lists.openembedded.org/g/openembedded-core/message/160570 Mute This Topic: https://lists.openembedded.org/mt/88421290/21656 Group Owner: openembedded-core+ow...@lists.openembedded.org Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-