Openembedded Core Discussions
 help / color / mirror / Atom feed
* [meta-oe][PATCH] pstack: add recipe
@ 2025-06-30 17:22 Wen Yang
  2025-06-30 18:16 ` Patchtest results for " patchtest
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Wen Yang @ 2025-06-30 17:22 UTC (permalink / raw)
  To: openembedded-core, openembedded-devel; +Cc: Wen Yang

This recipe provides pstack for C/C++, Go, Rust, and Python.

Signed-off-by: Wen Yang <wen.yang@linux.dev>
---
 ...e-issue-of-cross-compilation-failure.patch | 28 +++++++++++++
 meta-oe/recipes-devtools/pstack/pstack.inc    | 39 +++++++++++++++++++
 .../recipes-devtools/pstack/pstack_2.10.bb    | 33 ++++++++++++++++
 meta-oe/recipes-devtools/pstack/pstack_git.bb |  8 ++++
 4 files changed, 108 insertions(+)
 create mode 100644 meta-oe/recipes-devtools/pstack/files/0001-tests-fix-the-issue-of-cross-compilation-failure.patch
 create mode 100644 meta-oe/recipes-devtools/pstack/pstack.inc
 create mode 100644 meta-oe/recipes-devtools/pstack/pstack_2.10.bb
 create mode 100644 meta-oe/recipes-devtools/pstack/pstack_git.bb

diff --git a/meta-oe/recipes-devtools/pstack/files/0001-tests-fix-the-issue-of-cross-compilation-failure.patch b/meta-oe/recipes-devtools/pstack/files/0001-tests-fix-the-issue-of-cross-compilation-failure.patch
new file mode 100644
index 0000000000..2b54750e7a
--- /dev/null
+++ b/meta-oe/recipes-devtools/pstack/files/0001-tests-fix-the-issue-of-cross-compilation-failure.patch
@@ -0,0 +1,28 @@
+From a8c3996d3f8d9b8f3a2888b7062c1139263c5aba Mon Sep 17 00:00:00 2001
+From: Wen Yang <yellowriver2010@hotmail.com>
+Date: Mon, 23 Jun 2025 02:06:53 +0800
+Subject: [PATCH] tests: fix the issue of cross compilation failure
+
+By replacing objcopy with MAKE_OBJCOPY, pstack could support both
+native and cross compilation.
+
+Upstream-Status: Backport [https://github.com/peadar/pstack/pull/38]
+---
+ tests/CMakeLists.txt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
+index 71a62a7..bf11a04 100644
+--- a/tests/CMakeLists.txt
++++ b/tests/CMakeLists.txt
+@@ -38,7 +38,7 @@ SET_TARGET_PROPERTIES(noreturn PROPERTIES COMPILE_FLAGS "-O2 -g")
+
+ add_custom_command(
+    OUTPUT basic-no-unwind-gen
+-   COMMAND objcopy --strip-debug --remove-section .eh_frame basic basic-no-unwind
++   COMMAND ${CMAKE_OBJCOPY} --strip-debug --remove-section .eh_frame basic basic-no-unwind
+    VERBATIM )
+
+ add_custom_target(basic-no-unwind ALL DEPENDS basic basic-no-unwind-gen)
+--
+2.25.1
diff --git a/meta-oe/recipes-devtools/pstack/pstack.inc b/meta-oe/recipes-devtools/pstack/pstack.inc
new file mode 100644
index 0000000000..9831a74d1a
--- /dev/null
+++ b/meta-oe/recipes-devtools/pstack/pstack.inc
@@ -0,0 +1,39 @@
+SUMMARY = "A utility to print stack traces of running processes"
+DESCRIPTION = "A from-scratch implementation of pstack using DWARF debugging and unwind information. \
+Works for C/C++, Go, Rust, and Python. A traditional pstack command can generally print a backtrace \
+of each thread in a running program, and sometimes from a core file. This version of pstack uses its \
+own self contained ELF and DWARF parsing library, libdwelf to parse the DWARF debug and unwind \
+information, to get a stack trace."
+HOMEPAGE = "https://github.com/peadar/pstack"
+SECTION = "devel"
+LICENSE = "BSD-2-Clause"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=671019a96ba80415b696240ed2ca5e80"
+
+inherit cmake
+
+S = "${UNPACKDIR}/${BPN}-${PV}"
+DEPENDS += "zlib xz libunwind elfutils"
+
+RDEPENDS:${PN} += "elfutils"
+
+do_install() {
+    install -d ${D}${bindir}
+    install -m 0755 ${B}/pstack ${D}${bindir}/pstack
+
+    install -d ${D}${libdir}
+    install -m 0755 ${B}/libprocman.so.${PV} ${D}${libdir}/libprocman.so.${PV}
+    ln -sf libprocman.so.${PV} ${D}${libdir}/libprocman.so
+    install -m 0755 ${B}/libdwelf.so.${PV}  ${D}${libdir}/libdwelf.so.${PV}
+    ln -sf libdwelf.so.${PV}  ${D}${libdir}/libdwelf.so
+}
+
+PACKAGES = "${PN}"
+FILES:${PN} = "${bindir}/pstack"
+FILES:${PN} += "${libdir}/libprocman.so.${PV}"
+FILES:${PN} += "${libdir}/libdwelf.so.${PV}"
+
+PACKAGES += "${PN}-dbg"
+FILES:${PN}-dbg += "${base_bindir}/.debug ${base_sbindir}/.debug ${bindir}/.debug ${sbindir}/.debug"
+
+PACKAGES += "${PN}-dev"
+FILES:${PN}-dev += "${base_libdir}/*.so"
diff --git a/meta-oe/recipes-devtools/pstack/pstack_2.10.bb b/meta-oe/recipes-devtools/pstack/pstack_2.10.bb
new file mode 100644
index 0000000000..cebc13d36c
--- /dev/null
+++ b/meta-oe/recipes-devtools/pstack/pstack_2.10.bb
@@ -0,0 +1,33 @@
+SUMMARY = "A from-scratch implementation of pstack using DWARF debugging \
+and unwind information. Works for C/C++, Go, Rust, and Python."
+
+HOMEPAGE = "https://github.com/peadar/pstack"
+SECTION = "devel/pstack"
+
+LICENSE = "BSD-2-Clause"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=ea061f8731d5e6a5761dfad951ef5f5f"
+
+DEPENDS = "tcl virtual/libx11 libxt zip-native"
+
+SRC_URI = "git://github.com/peadar/pstack;branch=master;tag=v${PV};protocol=https"
+SRCREV = "a310df637d74917a1d3570c540bf3aef899d7e63"
+
+S = "${WORKDIR}/${BPN}${PV}"
+
+PACKAGES =+ "${PN}-lib"
+
+SOLIBS = ".so"
+FILES_SOLIBSDEV = ""
+
+# isn't getting picked up by shlibs code
+RDEPENDS:${PN} += "tk-lib"
+RDEPENDS:${PN}:class-native = ""
+
+BBCLASSEXTEND = "native nativesdk"
+
+inherit binconfig
+
+SYSROOT_DIRS += "${bindir_crossscripts}"
+
+# Fix some paths that might be used by Tcl extensions
+BINCONFIG_GLOB = "*Config.sh"
diff --git a/meta-oe/recipes-devtools/pstack/pstack_git.bb b/meta-oe/recipes-devtools/pstack/pstack_git.bb
new file mode 100644
index 0000000000..cc6721f9e3
--- /dev/null
+++ b/meta-oe/recipes-devtools/pstack/pstack_git.bb
@@ -0,0 +1,8 @@
+require pstack.inc
+
+SRCREV = "1e1734be3adb6d9c81b57c5cc3d0c8fbc43bdee3"
+PV = "2.11"
+
+SRC_URI = "git://github.com/peadar/pstack.git;branch=master;protocol=https \
+           file://0001-tests-fix-the-issue-of-cross-compilation-failure.patch \
+          "
-- 
2.25.1



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

* Patchtest results for [meta-oe][PATCH] pstack: add recipe
  2025-06-30 17:22 [meta-oe][PATCH] pstack: add recipe Wen Yang
@ 2025-06-30 18:16 ` patchtest
  2025-07-03 23:02 ` [oe] " Khem Raj
  2025-07-11 20:20 ` Martin Jansa
  2 siblings, 0 replies; 5+ messages in thread
From: patchtest @ 2025-06-30 18:16 UTC (permalink / raw)
  To: Wen Yang; +Cc: openembedded-core

[-- Attachment #1: Type: text/plain, Size: 3224 bytes --]

Thank you for your submission. Patchtest identified one
or more issues with the patch. Please see the log below for
more information:

---
Testing patch /home/patchtest/share/mboxes/meta-oe-pstack-add-recipe.patch

FAIL: test Signed-off-by presence: A patch file has been added without a Signed-off-by tag: '0001-tests-fix-the-issue-of-cross-compilation-failure.patch' (test_patch.TestPatch.test_signed_off_by_presence)
FAIL: test target mailing list: Series sent to the wrong mailing list or some patches from the series correspond to different mailing lists (test_mbox.TestMbox.test_target_mailing_list)

PASS: test CVE tag format (test_patch.TestPatch.test_cve_tag_format)
PASS: test Signed-off-by presence (test_mbox.TestMbox.test_signed_off_by_presence)
PASS: test Upstream-Status presence (test_patch.TestPatch.test_upstream_status_presence_format)
PASS: test author valid (test_mbox.TestMbox.test_author_valid)
PASS: test commit message presence (test_mbox.TestMbox.test_commit_message_presence)
PASS: test commit message user tags (test_mbox.TestMbox.test_commit_message_user_tags)
PASS: test max line length (test_metadata.TestMetadata.test_max_line_length)
PASS: test mbox format (test_mbox.TestMbox.test_mbox_format)
PASS: test non-AUH upgrade (test_mbox.TestMbox.test_non_auh_upgrade)
PASS: test shortlog format (test_mbox.TestMbox.test_shortlog_format)
PASS: test shortlog length (test_mbox.TestMbox.test_shortlog_length)

SKIP: pretest pylint: No python related patches, skipping test (test_python_pylint.PyLint.pretest_pylint)
SKIP: pretest src uri left files: No modified recipes, skipping pretest (test_metadata.TestMetadata.pretest_src_uri_left_files)
SKIP: test CVE check ignore: No modified recipes or older target branch, skipping test (test_metadata.TestMetadata.test_cve_check_ignore)
SKIP: test bugzilla entry format: No bug ID found (test_mbox.TestMbox.test_bugzilla_entry_format)
SKIP: test lic files chksum modified not mentioned: No modified recipes, skipping test (test_metadata.TestMetadata.test_lic_files_chksum_modified_not_mentioned)
SKIP: test lic files chksum presence: No added recipes, skipping test (test_metadata.TestMetadata.test_lic_files_chksum_presence)
SKIP: test license presence: No added recipes, skipping test (test_metadata.TestMetadata.test_license_presence)
SKIP: test pylint: No python related patches, skipping test (test_python_pylint.PyLint.test_pylint)
SKIP: test series merge on head: Merge test is disabled for now (test_mbox.TestMbox.test_series_merge_on_head)
SKIP: test src uri left files: No modified recipes, skipping pretest (test_metadata.TestMetadata.test_src_uri_left_files)
SKIP: test summary presence: No added recipes, skipping test (test_metadata.TestMetadata.test_summary_presence)

---

Please address the issues identified and
submit a new revision of the patch, or alternatively, reply to this
email with an explanation of why the patch should be accepted. If you
believe these results are due to an error in patchtest, please submit a
bug at https://bugzilla.yoctoproject.org/ (use the 'Patchtest' category
under 'Yocto Project Subprojects'). For more information on specific
failures, see: https://wiki.yoctoproject.org/wiki/Patchtest. Thank
you!

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

* Re: [oe] [meta-oe][PATCH] pstack: add recipe
  2025-06-30 17:22 [meta-oe][PATCH] pstack: add recipe Wen Yang
  2025-06-30 18:16 ` Patchtest results for " patchtest
@ 2025-07-03 23:02 ` Khem Raj
  2025-07-11 20:20 ` Martin Jansa
  2 siblings, 0 replies; 5+ messages in thread
From: Khem Raj @ 2025-07-03 23:02 UTC (permalink / raw)
  To: wen.yang; +Cc: openembedded-core, openembedded-devel

It fails to build with clang -
https://errors.yoctoproject.org/Errors/Details/868022/

On Mon, Jun 30, 2025 at 10:40 AM Wen Yang via lists.openembedded.org
<wen.yang=linux.dev@lists.openembedded.org> wrote:
>
> This recipe provides pstack for C/C++, Go, Rust, and Python.
>
> Signed-off-by: Wen Yang <wen.yang@linux.dev>
> ---
>  ...e-issue-of-cross-compilation-failure.patch | 28 +++++++++++++
>  meta-oe/recipes-devtools/pstack/pstack.inc    | 39 +++++++++++++++++++
>  .../recipes-devtools/pstack/pstack_2.10.bb    | 33 ++++++++++++++++
>  meta-oe/recipes-devtools/pstack/pstack_git.bb |  8 ++++
>  4 files changed, 108 insertions(+)
>  create mode 100644 meta-oe/recipes-devtools/pstack/files/0001-tests-fix-the-issue-of-cross-compilation-failure.patch
>  create mode 100644 meta-oe/recipes-devtools/pstack/pstack.inc
>  create mode 100644 meta-oe/recipes-devtools/pstack/pstack_2.10.bb
>  create mode 100644 meta-oe/recipes-devtools/pstack/pstack_git.bb
>
> diff --git a/meta-oe/recipes-devtools/pstack/files/0001-tests-fix-the-issue-of-cross-compilation-failure.patch b/meta-oe/recipes-devtools/pstack/files/0001-tests-fix-the-issue-of-cross-compilation-failure.patch
> new file mode 100644
> index 0000000000..2b54750e7a
> --- /dev/null
> +++ b/meta-oe/recipes-devtools/pstack/files/0001-tests-fix-the-issue-of-cross-compilation-failure.patch
> @@ -0,0 +1,28 @@
> +From a8c3996d3f8d9b8f3a2888b7062c1139263c5aba Mon Sep 17 00:00:00 2001
> +From: Wen Yang <yellowriver2010@hotmail.com>
> +Date: Mon, 23 Jun 2025 02:06:53 +0800
> +Subject: [PATCH] tests: fix the issue of cross compilation failure
> +
> +By replacing objcopy with MAKE_OBJCOPY, pstack could support both
> +native and cross compilation.
> +
> +Upstream-Status: Backport [https://github.com/peadar/pstack/pull/38]
> +---
> + tests/CMakeLists.txt | 2 +-
> + 1 file changed, 1 insertion(+), 1 deletion(-)
> +
> +diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
> +index 71a62a7..bf11a04 100644
> +--- a/tests/CMakeLists.txt
> ++++ b/tests/CMakeLists.txt
> +@@ -38,7 +38,7 @@ SET_TARGET_PROPERTIES(noreturn PROPERTIES COMPILE_FLAGS "-O2 -g")
> +
> + add_custom_command(
> +    OUTPUT basic-no-unwind-gen
> +-   COMMAND objcopy --strip-debug --remove-section .eh_frame basic basic-no-unwind
> ++   COMMAND ${CMAKE_OBJCOPY} --strip-debug --remove-section .eh_frame basic basic-no-unwind
> +    VERBATIM )
> +
> + add_custom_target(basic-no-unwind ALL DEPENDS basic basic-no-unwind-gen)
> +--
> +2.25.1
> diff --git a/meta-oe/recipes-devtools/pstack/pstack.inc b/meta-oe/recipes-devtools/pstack/pstack.inc
> new file mode 100644
> index 0000000000..9831a74d1a
> --- /dev/null
> +++ b/meta-oe/recipes-devtools/pstack/pstack.inc
> @@ -0,0 +1,39 @@
> +SUMMARY = "A utility to print stack traces of running processes"
> +DESCRIPTION = "A from-scratch implementation of pstack using DWARF debugging and unwind information. \
> +Works for C/C++, Go, Rust, and Python. A traditional pstack command can generally print a backtrace \
> +of each thread in a running program, and sometimes from a core file. This version of pstack uses its \
> +own self contained ELF and DWARF parsing library, libdwelf to parse the DWARF debug and unwind \
> +information, to get a stack trace."
> +HOMEPAGE = "https://github.com/peadar/pstack"
> +SECTION = "devel"
> +LICENSE = "BSD-2-Clause"
> +LIC_FILES_CHKSUM = "file://LICENSE;md5=671019a96ba80415b696240ed2ca5e80"
> +
> +inherit cmake
> +
> +S = "${UNPACKDIR}/${BPN}-${PV}"
> +DEPENDS += "zlib xz libunwind elfutils"
> +
> +RDEPENDS:${PN} += "elfutils"
> +
> +do_install() {
> +    install -d ${D}${bindir}
> +    install -m 0755 ${B}/pstack ${D}${bindir}/pstack
> +
> +    install -d ${D}${libdir}
> +    install -m 0755 ${B}/libprocman.so.${PV} ${D}${libdir}/libprocman.so.${PV}
> +    ln -sf libprocman.so.${PV} ${D}${libdir}/libprocman.so
> +    install -m 0755 ${B}/libdwelf.so.${PV}  ${D}${libdir}/libdwelf.so.${PV}
> +    ln -sf libdwelf.so.${PV}  ${D}${libdir}/libdwelf.so
> +}
> +
> +PACKAGES = "${PN}"
> +FILES:${PN} = "${bindir}/pstack"
> +FILES:${PN} += "${libdir}/libprocman.so.${PV}"
> +FILES:${PN} += "${libdir}/libdwelf.so.${PV}"
> +
> +PACKAGES += "${PN}-dbg"
> +FILES:${PN}-dbg += "${base_bindir}/.debug ${base_sbindir}/.debug ${bindir}/.debug ${sbindir}/.debug"
> +
> +PACKAGES += "${PN}-dev"
> +FILES:${PN}-dev += "${base_libdir}/*.so"
> diff --git a/meta-oe/recipes-devtools/pstack/pstack_2.10.bb b/meta-oe/recipes-devtools/pstack/pstack_2.10.bb
> new file mode 100644
> index 0000000000..cebc13d36c
> --- /dev/null
> +++ b/meta-oe/recipes-devtools/pstack/pstack_2.10.bb
> @@ -0,0 +1,33 @@
> +SUMMARY = "A from-scratch implementation of pstack using DWARF debugging \
> +and unwind information. Works for C/C++, Go, Rust, and Python."
> +
> +HOMEPAGE = "https://github.com/peadar/pstack"
> +SECTION = "devel/pstack"
> +
> +LICENSE = "BSD-2-Clause"
> +LIC_FILES_CHKSUM = "file://LICENSE;md5=ea061f8731d5e6a5761dfad951ef5f5f"
> +
> +DEPENDS = "tcl virtual/libx11 libxt zip-native"
> +
> +SRC_URI = "git://github.com/peadar/pstack;branch=master;tag=v${PV};protocol=https"
> +SRCREV = "a310df637d74917a1d3570c540bf3aef899d7e63"
> +
> +S = "${WORKDIR}/${BPN}${PV}"
> +
> +PACKAGES =+ "${PN}-lib"
> +
> +SOLIBS = ".so"
> +FILES_SOLIBSDEV = ""
> +
> +# isn't getting picked up by shlibs code
> +RDEPENDS:${PN} += "tk-lib"
> +RDEPENDS:${PN}:class-native = ""
> +
> +BBCLASSEXTEND = "native nativesdk"
> +
> +inherit binconfig
> +
> +SYSROOT_DIRS += "${bindir_crossscripts}"
> +
> +# Fix some paths that might be used by Tcl extensions
> +BINCONFIG_GLOB = "*Config.sh"
> diff --git a/meta-oe/recipes-devtools/pstack/pstack_git.bb b/meta-oe/recipes-devtools/pstack/pstack_git.bb
> new file mode 100644
> index 0000000000..cc6721f9e3
> --- /dev/null
> +++ b/meta-oe/recipes-devtools/pstack/pstack_git.bb
> @@ -0,0 +1,8 @@
> +require pstack.inc
> +
> +SRCREV = "1e1734be3adb6d9c81b57c5cc3d0c8fbc43bdee3"
> +PV = "2.11"
> +
> +SRC_URI = "git://github.com/peadar/pstack.git;branch=master;protocol=https \
> +           file://0001-tests-fix-the-issue-of-cross-compilation-failure.patch \
> +          "
> --
> 2.25.1
>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#118182): https://lists.openembedded.org/g/openembedded-devel/message/118182
> Mute This Topic: https://lists.openembedded.org/mt/113912625/1997914
> Group Owner: openembedded-devel+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [raj.khem@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>


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

* Re: [oe] [meta-oe][PATCH] pstack: add recipe
  2025-06-30 17:22 [meta-oe][PATCH] pstack: add recipe Wen Yang
  2025-06-30 18:16 ` Patchtest results for " patchtest
  2025-07-03 23:02 ` [oe] " Khem Raj
@ 2025-07-11 20:20 ` Martin Jansa
  2025-07-12  0:05   ` [OE-core] " Khem Raj
  2 siblings, 1 reply; 5+ messages in thread
From: Martin Jansa @ 2025-07-11 20:20 UTC (permalink / raw)
  To: wen.yang; +Cc: openembedded-core, openembedded-devel

libxt and libx11 are available only with x11 in DISTRO_FEATURES, this
should declare the REQUIRED_DISTRO_FEATURES as well.

Will send a fix later.

On Mon, Jun 30, 2025 at 7:40 PM Wen Yang via lists.openembedded.org
<wen.yang=linux.dev@lists.openembedded.org> wrote:
>
> This recipe provides pstack for C/C++, Go, Rust, and Python.
>
> Signed-off-by: Wen Yang <wen.yang@linux.dev>
> ---
>  ...e-issue-of-cross-compilation-failure.patch | 28 +++++++++++++
>  meta-oe/recipes-devtools/pstack/pstack.inc    | 39 +++++++++++++++++++
>  .../recipes-devtools/pstack/pstack_2.10.bb    | 33 ++++++++++++++++
>  meta-oe/recipes-devtools/pstack/pstack_git.bb |  8 ++++
>  4 files changed, 108 insertions(+)
>  create mode 100644 meta-oe/recipes-devtools/pstack/files/0001-tests-fix-the-issue-of-cross-compilation-failure.patch
>  create mode 100644 meta-oe/recipes-devtools/pstack/pstack.inc
>  create mode 100644 meta-oe/recipes-devtools/pstack/pstack_2.10.bb
>  create mode 100644 meta-oe/recipes-devtools/pstack/pstack_git.bb
>
> diff --git a/meta-oe/recipes-devtools/pstack/files/0001-tests-fix-the-issue-of-cross-compilation-failure.patch b/meta-oe/recipes-devtools/pstack/files/0001-tests-fix-the-issue-of-cross-compilation-failure.patch
> new file mode 100644
> index 0000000000..2b54750e7a
> --- /dev/null
> +++ b/meta-oe/recipes-devtools/pstack/files/0001-tests-fix-the-issue-of-cross-compilation-failure.patch
> @@ -0,0 +1,28 @@
> +From a8c3996d3f8d9b8f3a2888b7062c1139263c5aba Mon Sep 17 00:00:00 2001
> +From: Wen Yang <yellowriver2010@hotmail.com>
> +Date: Mon, 23 Jun 2025 02:06:53 +0800
> +Subject: [PATCH] tests: fix the issue of cross compilation failure
> +
> +By replacing objcopy with MAKE_OBJCOPY, pstack could support both
> +native and cross compilation.
> +
> +Upstream-Status: Backport [https://github.com/peadar/pstack/pull/38]
> +---
> + tests/CMakeLists.txt | 2 +-
> + 1 file changed, 1 insertion(+), 1 deletion(-)
> +
> +diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
> +index 71a62a7..bf11a04 100644
> +--- a/tests/CMakeLists.txt
> ++++ b/tests/CMakeLists.txt
> +@@ -38,7 +38,7 @@ SET_TARGET_PROPERTIES(noreturn PROPERTIES COMPILE_FLAGS "-O2 -g")
> +
> + add_custom_command(
> +    OUTPUT basic-no-unwind-gen
> +-   COMMAND objcopy --strip-debug --remove-section .eh_frame basic basic-no-unwind
> ++   COMMAND ${CMAKE_OBJCOPY} --strip-debug --remove-section .eh_frame basic basic-no-unwind
> +    VERBATIM )
> +
> + add_custom_target(basic-no-unwind ALL DEPENDS basic basic-no-unwind-gen)
> +--
> +2.25.1
> diff --git a/meta-oe/recipes-devtools/pstack/pstack.inc b/meta-oe/recipes-devtools/pstack/pstack.inc
> new file mode 100644
> index 0000000000..9831a74d1a
> --- /dev/null
> +++ b/meta-oe/recipes-devtools/pstack/pstack.inc
> @@ -0,0 +1,39 @@
> +SUMMARY = "A utility to print stack traces of running processes"
> +DESCRIPTION = "A from-scratch implementation of pstack using DWARF debugging and unwind information. \
> +Works for C/C++, Go, Rust, and Python. A traditional pstack command can generally print a backtrace \
> +of each thread in a running program, and sometimes from a core file. This version of pstack uses its \
> +own self contained ELF and DWARF parsing library, libdwelf to parse the DWARF debug and unwind \
> +information, to get a stack trace."
> +HOMEPAGE = "https://github.com/peadar/pstack"
> +SECTION = "devel"
> +LICENSE = "BSD-2-Clause"
> +LIC_FILES_CHKSUM = "file://LICENSE;md5=671019a96ba80415b696240ed2ca5e80"
> +
> +inherit cmake
> +
> +S = "${UNPACKDIR}/${BPN}-${PV}"
> +DEPENDS += "zlib xz libunwind elfutils"
> +
> +RDEPENDS:${PN} += "elfutils"
> +
> +do_install() {
> +    install -d ${D}${bindir}
> +    install -m 0755 ${B}/pstack ${D}${bindir}/pstack
> +
> +    install -d ${D}${libdir}
> +    install -m 0755 ${B}/libprocman.so.${PV} ${D}${libdir}/libprocman.so.${PV}
> +    ln -sf libprocman.so.${PV} ${D}${libdir}/libprocman.so
> +    install -m 0755 ${B}/libdwelf.so.${PV}  ${D}${libdir}/libdwelf.so.${PV}
> +    ln -sf libdwelf.so.${PV}  ${D}${libdir}/libdwelf.so
> +}
> +
> +PACKAGES = "${PN}"
> +FILES:${PN} = "${bindir}/pstack"
> +FILES:${PN} += "${libdir}/libprocman.so.${PV}"
> +FILES:${PN} += "${libdir}/libdwelf.so.${PV}"
> +
> +PACKAGES += "${PN}-dbg"
> +FILES:${PN}-dbg += "${base_bindir}/.debug ${base_sbindir}/.debug ${bindir}/.debug ${sbindir}/.debug"
> +
> +PACKAGES += "${PN}-dev"
> +FILES:${PN}-dev += "${base_libdir}/*.so"
> diff --git a/meta-oe/recipes-devtools/pstack/pstack_2.10.bb b/meta-oe/recipes-devtools/pstack/pstack_2.10.bb
> new file mode 100644
> index 0000000000..cebc13d36c
> --- /dev/null
> +++ b/meta-oe/recipes-devtools/pstack/pstack_2.10.bb
> @@ -0,0 +1,33 @@
> +SUMMARY = "A from-scratch implementation of pstack using DWARF debugging \
> +and unwind information. Works for C/C++, Go, Rust, and Python."
> +
> +HOMEPAGE = "https://github.com/peadar/pstack"
> +SECTION = "devel/pstack"
> +
> +LICENSE = "BSD-2-Clause"
> +LIC_FILES_CHKSUM = "file://LICENSE;md5=ea061f8731d5e6a5761dfad951ef5f5f"
> +
> +DEPENDS = "tcl virtual/libx11 libxt zip-native"
> +
> +SRC_URI = "git://github.com/peadar/pstack;branch=master;tag=v${PV};protocol=https"
> +SRCREV = "a310df637d74917a1d3570c540bf3aef899d7e63"
> +
> +S = "${WORKDIR}/${BPN}${PV}"
> +
> +PACKAGES =+ "${PN}-lib"
> +
> +SOLIBS = ".so"
> +FILES_SOLIBSDEV = ""
> +
> +# isn't getting picked up by shlibs code
> +RDEPENDS:${PN} += "tk-lib"
> +RDEPENDS:${PN}:class-native = ""
> +
> +BBCLASSEXTEND = "native nativesdk"
> +
> +inherit binconfig
> +
> +SYSROOT_DIRS += "${bindir_crossscripts}"
> +
> +# Fix some paths that might be used by Tcl extensions
> +BINCONFIG_GLOB = "*Config.sh"
> diff --git a/meta-oe/recipes-devtools/pstack/pstack_git.bb b/meta-oe/recipes-devtools/pstack/pstack_git.bb
> new file mode 100644
> index 0000000000..cc6721f9e3
> --- /dev/null
> +++ b/meta-oe/recipes-devtools/pstack/pstack_git.bb
> @@ -0,0 +1,8 @@
> +require pstack.inc
> +
> +SRCREV = "1e1734be3adb6d9c81b57c5cc3d0c8fbc43bdee3"
> +PV = "2.11"
> +
> +SRC_URI = "git://github.com/peadar/pstack.git;branch=master;protocol=https \
> +           file://0001-tests-fix-the-issue-of-cross-compilation-failure.patch \
> +          "
> --
> 2.25.1
>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#118182): https://lists.openembedded.org/g/openembedded-devel/message/118182
> Mute This Topic: https://lists.openembedded.org/mt/113912625/3617156
> Group Owner: openembedded-devel+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [martin.jansa@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>


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

* Re: [OE-core] [oe] [meta-oe][PATCH] pstack: add recipe
  2025-07-11 20:20 ` Martin Jansa
@ 2025-07-12  0:05   ` Khem Raj
  0 siblings, 0 replies; 5+ messages in thread
From: Khem Raj @ 2025-07-12  0:05 UTC (permalink / raw)
  To: martin.jansa; +Cc: wen.yang, openembedded-core, openembedded-devel

On Fri, Jul 11, 2025 at 1:20 PM Martin Jansa via
lists.openembedded.org <martin.jansa=gmail.com@lists.openembedded.org>
wrote:
>
> libxt and libx11 are available only with x11 in DISTRO_FEATURES, this
> should declare the REQUIRED_DISTRO_FEATURES as well.
>
> Will send a fix later.
>

Thanks

> On Mon, Jun 30, 2025 at 7:40 PM Wen Yang via lists.openembedded.org
> <wen.yang=linux.dev@lists.openembedded.org> wrote:
> >
> > This recipe provides pstack for C/C++, Go, Rust, and Python.
> >
> > Signed-off-by: Wen Yang <wen.yang@linux.dev>
> > ---
> >  ...e-issue-of-cross-compilation-failure.patch | 28 +++++++++++++
> >  meta-oe/recipes-devtools/pstack/pstack.inc    | 39 +++++++++++++++++++
> >  .../recipes-devtools/pstack/pstack_2.10.bb    | 33 ++++++++++++++++
> >  meta-oe/recipes-devtools/pstack/pstack_git.bb |  8 ++++
> >  4 files changed, 108 insertions(+)
> >  create mode 100644 meta-oe/recipes-devtools/pstack/files/0001-tests-fix-the-issue-of-cross-compilation-failure.patch
> >  create mode 100644 meta-oe/recipes-devtools/pstack/pstack.inc
> >  create mode 100644 meta-oe/recipes-devtools/pstack/pstack_2.10.bb
> >  create mode 100644 meta-oe/recipes-devtools/pstack/pstack_git.bb
> >
> > diff --git a/meta-oe/recipes-devtools/pstack/files/0001-tests-fix-the-issue-of-cross-compilation-failure.patch b/meta-oe/recipes-devtools/pstack/files/0001-tests-fix-the-issue-of-cross-compilation-failure.patch
> > new file mode 100644
> > index 0000000000..2b54750e7a
> > --- /dev/null
> > +++ b/meta-oe/recipes-devtools/pstack/files/0001-tests-fix-the-issue-of-cross-compilation-failure.patch
> > @@ -0,0 +1,28 @@
> > +From a8c3996d3f8d9b8f3a2888b7062c1139263c5aba Mon Sep 17 00:00:00 2001
> > +From: Wen Yang <yellowriver2010@hotmail.com>
> > +Date: Mon, 23 Jun 2025 02:06:53 +0800
> > +Subject: [PATCH] tests: fix the issue of cross compilation failure
> > +
> > +By replacing objcopy with MAKE_OBJCOPY, pstack could support both
> > +native and cross compilation.
> > +
> > +Upstream-Status: Backport [https://github.com/peadar/pstack/pull/38]
> > +---
> > + tests/CMakeLists.txt | 2 +-
> > + 1 file changed, 1 insertion(+), 1 deletion(-)
> > +
> > +diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
> > +index 71a62a7..bf11a04 100644
> > +--- a/tests/CMakeLists.txt
> > ++++ b/tests/CMakeLists.txt
> > +@@ -38,7 +38,7 @@ SET_TARGET_PROPERTIES(noreturn PROPERTIES COMPILE_FLAGS "-O2 -g")
> > +
> > + add_custom_command(
> > +    OUTPUT basic-no-unwind-gen
> > +-   COMMAND objcopy --strip-debug --remove-section .eh_frame basic basic-no-unwind
> > ++   COMMAND ${CMAKE_OBJCOPY} --strip-debug --remove-section .eh_frame basic basic-no-unwind
> > +    VERBATIM )
> > +
> > + add_custom_target(basic-no-unwind ALL DEPENDS basic basic-no-unwind-gen)
> > +--
> > +2.25.1
> > diff --git a/meta-oe/recipes-devtools/pstack/pstack.inc b/meta-oe/recipes-devtools/pstack/pstack.inc
> > new file mode 100644
> > index 0000000000..9831a74d1a
> > --- /dev/null
> > +++ b/meta-oe/recipes-devtools/pstack/pstack.inc
> > @@ -0,0 +1,39 @@
> > +SUMMARY = "A utility to print stack traces of running processes"
> > +DESCRIPTION = "A from-scratch implementation of pstack using DWARF debugging and unwind information. \
> > +Works for C/C++, Go, Rust, and Python. A traditional pstack command can generally print a backtrace \
> > +of each thread in a running program, and sometimes from a core file. This version of pstack uses its \
> > +own self contained ELF and DWARF parsing library, libdwelf to parse the DWARF debug and unwind \
> > +information, to get a stack trace."
> > +HOMEPAGE = "https://github.com/peadar/pstack"
> > +SECTION = "devel"
> > +LICENSE = "BSD-2-Clause"
> > +LIC_FILES_CHKSUM = "file://LICENSE;md5=671019a96ba80415b696240ed2ca5e80"
> > +
> > +inherit cmake
> > +
> > +S = "${UNPACKDIR}/${BPN}-${PV}"
> > +DEPENDS += "zlib xz libunwind elfutils"
> > +
> > +RDEPENDS:${PN} += "elfutils"
> > +
> > +do_install() {
> > +    install -d ${D}${bindir}
> > +    install -m 0755 ${B}/pstack ${D}${bindir}/pstack
> > +
> > +    install -d ${D}${libdir}
> > +    install -m 0755 ${B}/libprocman.so.${PV} ${D}${libdir}/libprocman.so.${PV}
> > +    ln -sf libprocman.so.${PV} ${D}${libdir}/libprocman.so
> > +    install -m 0755 ${B}/libdwelf.so.${PV}  ${D}${libdir}/libdwelf.so.${PV}
> > +    ln -sf libdwelf.so.${PV}  ${D}${libdir}/libdwelf.so
> > +}
> > +
> > +PACKAGES = "${PN}"
> > +FILES:${PN} = "${bindir}/pstack"
> > +FILES:${PN} += "${libdir}/libprocman.so.${PV}"
> > +FILES:${PN} += "${libdir}/libdwelf.so.${PV}"
> > +
> > +PACKAGES += "${PN}-dbg"
> > +FILES:${PN}-dbg += "${base_bindir}/.debug ${base_sbindir}/.debug ${bindir}/.debug ${sbindir}/.debug"
> > +
> > +PACKAGES += "${PN}-dev"
> > +FILES:${PN}-dev += "${base_libdir}/*.so"
> > diff --git a/meta-oe/recipes-devtools/pstack/pstack_2.10.bb b/meta-oe/recipes-devtools/pstack/pstack_2.10.bb
> > new file mode 100644
> > index 0000000000..cebc13d36c
> > --- /dev/null
> > +++ b/meta-oe/recipes-devtools/pstack/pstack_2.10.bb
> > @@ -0,0 +1,33 @@
> > +SUMMARY = "A from-scratch implementation of pstack using DWARF debugging \
> > +and unwind information. Works for C/C++, Go, Rust, and Python."
> > +
> > +HOMEPAGE = "https://github.com/peadar/pstack"
> > +SECTION = "devel/pstack"
> > +
> > +LICENSE = "BSD-2-Clause"
> > +LIC_FILES_CHKSUM = "file://LICENSE;md5=ea061f8731d5e6a5761dfad951ef5f5f"
> > +
> > +DEPENDS = "tcl virtual/libx11 libxt zip-native"
> > +
> > +SRC_URI = "git://github.com/peadar/pstack;branch=master;tag=v${PV};protocol=https"
> > +SRCREV = "a310df637d74917a1d3570c540bf3aef899d7e63"
> > +
> > +S = "${WORKDIR}/${BPN}${PV}"
> > +
> > +PACKAGES =+ "${PN}-lib"
> > +
> > +SOLIBS = ".so"
> > +FILES_SOLIBSDEV = ""
> > +
> > +# isn't getting picked up by shlibs code
> > +RDEPENDS:${PN} += "tk-lib"
> > +RDEPENDS:${PN}:class-native = ""
> > +
> > +BBCLASSEXTEND = "native nativesdk"
> > +
> > +inherit binconfig
> > +
> > +SYSROOT_DIRS += "${bindir_crossscripts}"
> > +
> > +# Fix some paths that might be used by Tcl extensions
> > +BINCONFIG_GLOB = "*Config.sh"
> > diff --git a/meta-oe/recipes-devtools/pstack/pstack_git.bb b/meta-oe/recipes-devtools/pstack/pstack_git.bb
> > new file mode 100644
> > index 0000000000..cc6721f9e3
> > --- /dev/null
> > +++ b/meta-oe/recipes-devtools/pstack/pstack_git.bb
> > @@ -0,0 +1,8 @@
> > +require pstack.inc
> > +
> > +SRCREV = "1e1734be3adb6d9c81b57c5cc3d0c8fbc43bdee3"
> > +PV = "2.11"
> > +
> > +SRC_URI = "git://github.com/peadar/pstack.git;branch=master;protocol=https \
> > +           file://0001-tests-fix-the-issue-of-cross-compilation-failure.patch \
> > +          "
> > --
> > 2.25.1
> >
> >
> >
> >
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#220167): https://lists.openembedded.org/g/openembedded-core/message/220167
> Mute This Topic: https://lists.openembedded.org/mt/114107395/1997914
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [raj.khem@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>


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

end of thread, other threads:[~2025-07-12  0:06 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-30 17:22 [meta-oe][PATCH] pstack: add recipe Wen Yang
2025-06-30 18:16 ` Patchtest results for " patchtest
2025-07-03 23:02 ` [oe] " Khem Raj
2025-07-11 20:20 ` Martin Jansa
2025-07-12  0:05   ` [OE-core] " Khem Raj

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