On 2022-01-14 09:42, Alexander Kanavin wrote:
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
Francesco,
Did looking at the mozjs recipe help?
Maybe you can summarize here for anyone who has a similar issue and
finds this thread.
../Randy
On Fri, 14 Jan 2022 at 15:21, Francesco Pham <[email protected]
<mailto:[email protected]>> 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
<http://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
<http://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://[email protected]/frankplus/rust-hello-world.git;protocol=https;branch=master
<https://urldefense.com/v3/__http://[email protected]/frankplus/rust-hello-world.git;protocol=https;branch=master__;!!AjveYdw8EvQ!O6m7kT4SKIB2etM325d3xV_J7Qj-NTnCCEFkV6LpAdckc3pCtFlvYTiGn6SXpv9qX_W32g$>"
> SRCREV = "68b7f7ee7df6e08a0411ba7157761145c43baf5d"
> S = "${WORKDIR}/git"
> SUMMARY = "rust-hello-world"
> HOMEPAGE = "https://github.com/frankplus/rust-hello-world
<https://urldefense.com/v3/__https://github.com/frankplus/rust-hello-world__;!!AjveYdw8EvQ!O6m7kT4SKIB2etM325d3xV_J7Qj-NTnCCEFkV6LpAdckc3pCtFlvYTiGn6SXpv_KuXxrfQ$>"
> 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
<https://urldefense.com/v3/__https://github.com/meta-rust/meta-rust/issues/343__;!!AjveYdw8EvQ!O6m7kT4SKIB2etM325d3xV_J7Qj-NTnCCEFkV6LpAdckc3pCtFlvYTiGn6SXpv-aGWv17w$>
--
# Randy MacLeod
# Wind River Linux
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#163586):
https://lists.openembedded.org/g/openembedded-core/message/163586
Mute This Topic: https://lists.openembedded.org/mt/88421290/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-