The recipe passed --with-sysroot=${STAGING_DIR_TARGET} to the bundled gdb's
configure. gdb bakes that path in as its default target sysroot, so the
resulting /usr/bin/crash binary embedded the build-time recipe-sysroot path:
File /usr/bin/crash in package crash contains reference to TMPDIR
[buildpaths]
This was worked around by demoting the buildpaths QA check to a warning
(ERROR_QA:remove / WARN_QA:append), which only hides the problem - the build
path is still wrong for a binary that runs on the target (or, for the
cross-canadian variant, in the SDK).
Set --with-sysroot=/ instead. crash takes the kernel/vmlinux and dump on its
command line, so gdb's compiled-in default sysroot is irrelevant at runtime;
"/" is both a sane default and contains no build path. With this the binary
no longer references TMPDIR, so the QA suppression can be removed and the
buildpaths check passes for real.
Verified with a clean build for qemux86-64: no buildpaths QA issue and no
TMPDIR references remain in the crash binary.
Signed-off-by: Khem Raj <[email protected]>
---
.../recipes-kernel/crash/crash-cross-canadian_9.0.2.bb | 2 +-
meta-oe/recipes-kernel/crash/crash.inc | 9 +--------
2 files changed, 2 insertions(+), 9 deletions(-)
diff --git a/meta-oe/recipes-kernel/crash/crash-cross-canadian_9.0.2.bb
b/meta-oe/recipes-kernel/crash/crash-cross-canadian_9.0.2.bb
index 0ab18cb3d4..1a62441c05 100644
--- a/meta-oe/recipes-kernel/crash/crash-cross-canadian_9.0.2.bb
+++ b/meta-oe/recipes-kernel/crash/crash-cross-canadian_9.0.2.bb
@@ -37,7 +37,7 @@ EXTRA_OEMAKE:class-cross-canadian = ' \
--target=${TARGET_SYS} \
--disable-gdbserver \
--disable-gprofng \
- --with-sysroot=${STAGING_DIR_TARGET} \
+ --with-sysroot=/ \
ac_cv_type_gregset_t=yes \
ac_cv_type_fpregset_t=yes \
ac_cv_header_sys_procfs_h=yes" \
diff --git a/meta-oe/recipes-kernel/crash/crash.inc
b/meta-oe/recipes-kernel/crash/crash.inc
index e7b3b9cf13..57a6c23bc4 100644
--- a/meta-oe/recipes-kernel/crash/crash.inc
+++ b/meta-oe/recipes-kernel/crash/crash.inc
@@ -58,7 +58,7 @@ EXTRA_OEMAKE = ' \
--target=${TARGET_SYS} \
--disable-gdbserver \
--disable-gprofng \
- --with-sysroot=${STAGING_DIR_TARGET} \
+ --with-sysroot=/ \
ac_cv_type_gregset_t=yes \
ac_cv_type_fpregset_t=yes \
ac_cv_header_sys_procfs_h=yes" \
@@ -121,10 +121,3 @@ do_install:prepend () {
RDEPENDS:${PN} += "liblzma"
ARM_INSTRUCTION_SET = "arm"
-
-# WARNING: crash-9.0.2-r0 do_package_qa: QA Issue: File /usr/bin/crash in
package crash contains reference to TMPDIR [buildpaths]
-#
-# WARNING: crash-cross-canadian-aarch64-9.0.2-r0 do_package_qa: QA Issue: File
/opt/phytec-ampliphy-resy-systemd/6.0.98-devel/sysroots/x86_64-resysdk-linux/usr/bin/aarch64-resy-linux/crash
in package crash-cross-canadian-aarch64 contains reference to TMPDIR
[buildpaths]
-#
-ERROR_QA:remove = "buildpaths"
-WARN_QA:append = " buildpaths"
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#127784):
https://lists.openembedded.org/g/openembedded-devel/message/127784
Mute This Topic: https://lists.openembedded.org/mt/119978155/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-