From: Yash.Shinde@windriver.com
To: openembedded-core@lists.openembedded.org
Cc: Randy.MacLeod@windriver.com, Sundeep.Kokkonda@windriver.com,
Yash.Shinde@windriver.com
Subject: [PATCH] cargo-c: fix debug symbols containing TMPDIR references
Date: Wed, 8 Oct 2025 06:01:37 -0700 [thread overview]
Message-ID: <20251008130137.2266449-1-Yash.Shinde@windriver.com> (raw)
From: Yash Shinde <Yash.Shinde@windriver.com>
When building cargo-c with DEBUG mode, QA checks fail due to
absolute paths from the build environment (TMPDIR) being embedded into
the debug symbols/binaries. This causes issues such as:
ERROR: do_package_qa: File /usr/bin/.debug/cargo-capi contains reference to TMPDIR [buildpaths]
ERROR: do_package_qa: File /usr/bin/.debug/cargo-cinstall contains reference to TMPDIR [buildpaths]
ERROR: do_package_qa: File /usr/bin/.debug/cargo-cbuild contains reference to TMPDIR [buildpaths]
ERROR: do_package_qa: File /usr/bin/.debug/cargo-ctest contains reference to TMPDIR [buildpaths]
To fix this, pass an additional -ffile-prefix-map option to DEBUG_PREFIX_MAP to
ensure that paths under `${CARGO_HOME}` are remapped to `${TARGET_DBGSRC_DIR}`.
This ensures debug info is reproducible and does not leak host-specific paths.
Signed-off-by: Yash Shinde <Yash.Shinde@windriver.com>
---
meta/recipes-devtools/rust/cargo-c_0.10.16+cargo-0.91.0.bb | 2 ++
1 file changed, 2 insertions(+)
diff --git a/meta/recipes-devtools/rust/cargo-c_0.10.16+cargo-0.91.0.bb b/meta/recipes-devtools/rust/cargo-c_0.10.16+cargo-0.91.0.bb
index fd15f02da9..5ef68e13c2 100644
--- a/meta/recipes-devtools/rust/cargo-c_0.10.16+cargo-0.91.0.bb
+++ b/meta/recipes-devtools/rust/cargo-c_0.10.16+cargo-0.91.0.bb
@@ -12,6 +12,8 @@ SRC_URI = "crate://crates.io/cargo-c/${PV};name=cargo-c \
SRC_URI[cargo-c.sha256sum] = "17d431789b050b0fcf678455dfd5ceb7e5b45cd806140f8fe03b16b995d6cbff"
S = "${CARGO_VENDORING_DIRECTORY}/cargo-c-${PV}"
+DEBUG_PREFIX_MAP += "-ffile-prefix-map=${CARGO_HOME}=${TARGET_DBGSRC_DIR}"
+
inherit cargo cargo-update-recipe-crates pkgconfig
DEPENDS = "openssl curl"
--
2.49.0
next reply other threads:[~2025-10-08 13:01 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-08 13:01 Yash.Shinde [this message]
2025-10-08 17:43 ` [OE-core] [PATCH] cargo-c: fix debug symbols containing TMPDIR references Frédéric Martinsons
2025-10-09 6:44 ` Yash Shinde
2025-10-09 10:03 ` Frédéric Martinsons
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20251008130137.2266449-1-Yash.Shinde@windriver.com \
--to=yash.shinde@windriver.com \
--cc=Randy.MacLeod@windriver.com \
--cc=Sundeep.Kokkonda@windriver.com \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox