* [Buildroot] [PATCH 2/6] package/google-breakpad: disable uclibc support
2023-12-03 4:18 [Buildroot] [PATCH 1/6] package/google-breakpad/gen-syms.sh: fix shellcheck warnings Adam Duskett
@ 2023-12-03 4:18 ` Adam Duskett
2023-12-23 21:25 ` Thomas Petazzoni via buildroot
2024-01-09 12:51 ` Peter Korsgaard
2023-12-03 4:18 ` [Buildroot] [PATCH 3/6] package/google-breakpad: fix building on newer systems Adam Duskett
` (5 subsequent siblings)
6 siblings, 2 replies; 18+ messages in thread
From: Adam Duskett @ 2023-12-03 4:18 UTC (permalink / raw)
To: buildroot; +Cc: Adam Duskett, Pascal Huerst, Thomas Petazzoni
The google-breakpad package uses stab.h which is not included in uClibc.
Signed-off-by: Adam Duskett <adam.duskett@amarulasolutions.com>
---
Config.in | 2 +-
package/google-breakpad/Config.in | 6 +++---
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/Config.in b/Config.in
index 27f5deb16a..554b4062eb 100644
--- a/Config.in
+++ b/Config.in
@@ -589,7 +589,7 @@ config BR2_GOOGLE_BREAKPAD_ENABLE
depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 # C++11
depends on BR2_USE_WCHAR
depends on BR2_TOOLCHAIN_HAS_THREADS
- depends on (BR2_TOOLCHAIN_USES_GLIBC || BR2_TOOLCHAIN_USES_UCLIBC)
+ depends on BR2_TOOLCHAIN_USES_GLIBC
depends on BR2_PACKAGE_GOOGLE_BREAKPAD_ARCH_SUPPORTS
depends on BR2_PACKAGE_HOST_GOOGLE_BREAKPAD_ARCH_SUPPORTS
select BR2_PACKAGE_GOOGLE_BREAKPAD
diff --git a/package/google-breakpad/Config.in b/package/google-breakpad/Config.in
index 4320ad64aa..49d0bc06de 100644
--- a/package/google-breakpad/Config.in
+++ b/package/google-breakpad/Config.in
@@ -9,7 +9,7 @@ config BR2_PACKAGE_GOOGLE_BREAKPAD
depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 # C++11
depends on BR2_USE_WCHAR
depends on BR2_TOOLCHAIN_HAS_THREADS
- depends on (BR2_TOOLCHAIN_USES_GLIBC || BR2_TOOLCHAIN_USES_UCLIBC)
+ depends on BR2_TOOLCHAIN_USES_GLIBC
depends on BR2_PACKAGE_GOOGLE_BREAKPAD_ARCH_SUPPORTS
depends on BR2_PACKAGE_HOST_GOOGLE_BREAKPAD_ARCH_SUPPORTS
select BR2_PACKAGE_LINUX_SYSCALL_SUPPORT
@@ -34,12 +34,12 @@ config BR2_PACKAGE_GOOGLE_BREAKPAD
https://chromium.googlesource.com/breakpad/breakpad
-comment "google-breakpad requires a glibc or uClibc toolchain w/ wchar, thread, C++, gcc >= 4.8"
+comment "google-breakpad requires a glibc toolchain w/ wchar, thread, C++, gcc >= 4.8"
depends on BR2_PACKAGE_GOOGLE_BREAKPAD_ARCH_SUPPORTS
depends on BR2_PACKAGE_HOST_GOOGLE_BREAKPAD_ARCH_SUPPORTS
depends on !BR2_INSTALL_LIBSTDCPP || !BR2_USE_WCHAR || \
!BR2_TOOLCHAIN_HAS_THREADS || \
- !(BR2_TOOLCHAIN_USES_GLIBC || BR2_TOOLCHAIN_USES_UCLIBC) || \
+ !BR2_TOOLCHAIN_USES_GLIBC || \
!BR2_TOOLCHAIN_GCC_AT_LEAST_4_8
if BR2_PACKAGE_GOOGLE_BREAKPAD
--
2.43.0
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 18+ messages in thread* Re: [Buildroot] [PATCH 2/6] package/google-breakpad: disable uclibc support
2023-12-03 4:18 ` [Buildroot] [PATCH 2/6] package/google-breakpad: disable uclibc support Adam Duskett
@ 2023-12-23 21:25 ` Thomas Petazzoni via buildroot
2024-01-09 12:51 ` Peter Korsgaard
1 sibling, 0 replies; 18+ messages in thread
From: Thomas Petazzoni via buildroot @ 2023-12-23 21:25 UTC (permalink / raw)
To: Adam Duskett; +Cc: Pascal Huerst, buildroot
On Sat, 2 Dec 2023 21:18:35 -0700
Adam Duskett <adam.duskett@amarulasolutions.com> wrote:
> The google-breakpad package uses stab.h which is not included in uClibc.
>
> Signed-off-by: Adam Duskett <adam.duskett@amarulasolutions.com>
> ---
> Config.in | 2 +-
> package/google-breakpad/Config.in | 6 +++---
> 2 files changed, 4 insertions(+), 4 deletions(-)
Applied to master after adding a reference to the autobuilder issue
that it is fixing. Thanks!
Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [Buildroot] [PATCH 2/6] package/google-breakpad: disable uclibc support
2023-12-03 4:18 ` [Buildroot] [PATCH 2/6] package/google-breakpad: disable uclibc support Adam Duskett
2023-12-23 21:25 ` Thomas Petazzoni via buildroot
@ 2024-01-09 12:51 ` Peter Korsgaard
2024-01-09 13:33 ` Baruch Siach via buildroot
1 sibling, 1 reply; 18+ messages in thread
From: Peter Korsgaard @ 2024-01-09 12:51 UTC (permalink / raw)
To: Adam Duskett; +Cc: Pascal Huerst, Thomas Petazzoni, buildroot
>>>>> "Adam" == Adam Duskett <adam.duskett@amarulasolutions.com> writes:
> The google-breakpad package uses stab.h which is not included in uClibc.
> Signed-off-by: Adam Duskett <adam.duskett@amarulasolutions.com>
Committed to 2023.02.x and 2023.11.x, thanks.
--
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [Buildroot] [PATCH 2/6] package/google-breakpad: disable uclibc support
2024-01-09 12:51 ` Peter Korsgaard
@ 2024-01-09 13:33 ` Baruch Siach via buildroot
2024-01-09 13:37 ` Peter Korsgaard
0 siblings, 1 reply; 18+ messages in thread
From: Baruch Siach via buildroot @ 2024-01-09 13:33 UTC (permalink / raw)
To: Peter Korsgaard; +Cc: Adam Duskett, Pascal Huerst, Thomas Petazzoni, buildroot
Hi Peter,
On Tue, Jan 09 2024, Peter Korsgaard wrote:
>>>>>> "Adam" == Adam Duskett <adam.duskett@amarulasolutions.com> writes:
>
> > The google-breakpad package uses stab.h which is not included in uClibc.
> > Signed-off-by: Adam Duskett <adam.duskett@amarulasolutions.com>
>
> Committed to 2023.02.x and 2023.11.x, thanks.
Not in 2023.02.x as of commit 34fee4fb35e04 ("package/php: bump version
to 8.2.14").
baruch
--
~. .~ Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
- baruch@tkos.co.il - tel: +972.52.368.4656, http://www.tkos.co.il -
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 18+ messages in thread* Re: [Buildroot] [PATCH 2/6] package/google-breakpad: disable uclibc support
2024-01-09 13:33 ` Baruch Siach via buildroot
@ 2024-01-09 13:37 ` Peter Korsgaard
0 siblings, 0 replies; 18+ messages in thread
From: Peter Korsgaard @ 2024-01-09 13:37 UTC (permalink / raw)
To: Baruch Siach; +Cc: Adam Duskett, Pascal Huerst, Thomas Petazzoni, buildroot
>>>>> "Baruch" == Baruch Siach <baruch@tkos.co.il> writes:
> Hi Peter,
> On Tue, Jan 09 2024, Peter Korsgaard wrote:
>>>>>>> "Adam" == Adam Duskett <adam.duskett@amarulasolutions.com> writes:
>>
>> > The google-breakpad package uses stab.h which is not included in uClibc.
>> > Signed-off-by: Adam Duskett <adam.duskett@amarulasolutions.com>
>>
>> Committed to 2023.02.x and 2023.11.x, thanks.
> Not in 2023.02.x as of commit 34fee4fb35e04 ("package/php: bump version
> to 8.2.14").
Thanks for the heads up, fixed now. I originally wanted to verify when
the breakage was introduced, but we don't seem to have any pre-2022
autobuilder results any more.
--
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Buildroot] [PATCH 3/6] package/google-breakpad: fix building on newer systems
2023-12-03 4:18 [Buildroot] [PATCH 1/6] package/google-breakpad/gen-syms.sh: fix shellcheck warnings Adam Duskett
2023-12-03 4:18 ` [Buildroot] [PATCH 2/6] package/google-breakpad: disable uclibc support Adam Duskett
@ 2023-12-03 4:18 ` Adam Duskett
2023-12-23 21:22 ` Thomas Petazzoni via buildroot
2023-12-03 4:18 ` [Buildroot] [PATCH 4/6] support/testing/tests/package/test_google_breakpad.py: new runtime test Adam Duskett
` (4 subsequent siblings)
6 siblings, 1 reply; 18+ messages in thread
From: Adam Duskett @ 2023-12-03 4:18 UTC (permalink / raw)
To: buildroot; +Cc: Adam Duskett, Pascal Huerst, Thomas Petazzoni
Fixes the following error when building against Fedora 39:
‘uintptr_t’ is defined in header ‘<cstdint>’; did you forget to
‘#include <cstdint>’?
Signed-off-by: Adam Duskett <adam.duskett@amarulasolutions.com>
---
...add-cstdint-to-minidump_descriptor.h.patch | 32 +++++++++++++++++++
1 file changed, 32 insertions(+)
create mode 100644 package/google-breakpad/0001-add-cstdint-to-minidump_descriptor.h.patch
diff --git a/package/google-breakpad/0001-add-cstdint-to-minidump_descriptor.h.patch b/package/google-breakpad/0001-add-cstdint-to-minidump_descriptor.h.patch
new file mode 100644
index 0000000000..f13bddc3bb
--- /dev/null
+++ b/package/google-breakpad/0001-add-cstdint-to-minidump_descriptor.h.patch
@@ -0,0 +1,32 @@
+From dd7a6b28e75e765d45ce7ecab21060e845dd4088 Mon Sep 17 00:00:00 2001
+From: Adam Duskett <adam.duskett@amarulasolutions.com>
+Date: Fri, 1 Dec 2023 10:34:21 -0700
+Subject: [PATCH] add cstdint to minidump_descriptor.h
+
+Fixes builds on newer systems and resolves the following error:
+
+‘uintptr_t’ is defined in header ‘<cstdint>’; did you forget to
+‘#include <cstdint>’?
+
+Upstream: Not submitted. Fixed in later versions.
+
+Signed-off-by: Adam Duskett <adam.duskett@amarulasolutions.com>
+---
+ src/client/linux/handler/minidump_descriptor.h | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/client/linux/handler/minidump_descriptor.h b/src/client/linux/handler/minidump_descriptor.h
+index c7e4f2b..85e8c4b 100644
+--- a/src/client/linux/handler/minidump_descriptor.h
++++ b/src/client/linux/handler/minidump_descriptor.h
+@@ -30,6 +30,7 @@
+ #ifndef CLIENT_LINUX_HANDLER_MINIDUMP_DESCRIPTOR_H_
+ #define CLIENT_LINUX_HANDLER_MINIDUMP_DESCRIPTOR_H_
+
++#include <cstdint>
+ #include <assert.h>
+ #include <sys/types.h>
+
+--
+2.43.0
+
--
2.43.0
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 18+ messages in thread* Re: [Buildroot] [PATCH 3/6] package/google-breakpad: fix building on newer systems
2023-12-03 4:18 ` [Buildroot] [PATCH 3/6] package/google-breakpad: fix building on newer systems Adam Duskett
@ 2023-12-23 21:22 ` Thomas Petazzoni via buildroot
2024-01-09 12:51 ` Peter Korsgaard
0 siblings, 1 reply; 18+ messages in thread
From: Thomas Petazzoni via buildroot @ 2023-12-23 21:22 UTC (permalink / raw)
To: Adam Duskett; +Cc: Pascal Huerst, buildroot
On Sat, 2 Dec 2023 21:18:36 -0700
Adam Duskett <adam.duskett@amarulasolutions.com> wrote:
> Fixes the following error when building against Fedora 39:
> ‘uintptr_t’ is defined in header ‘<cstdint>’; did you forget to
> ‘#include <cstdint>’?
>
> Signed-off-by: Adam Duskett <adam.duskett@amarulasolutions.com>
> ---
> ...add-cstdint-to-minidump_descriptor.h.patch | 32 +++++++++++++++++++
> 1 file changed, 32 insertions(+)
> create mode 100644 package/google-breakpad/0001-add-cstdint-to-minidump_descriptor.h.patch
I've applied, but after backporting instead the upstream commit, and
adding a reference to the autobuilder failure being fixed by this
patch. Thanks!
Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [Buildroot] [PATCH 3/6] package/google-breakpad: fix building on newer systems
2023-12-23 21:22 ` Thomas Petazzoni via buildroot
@ 2024-01-09 12:51 ` Peter Korsgaard
0 siblings, 0 replies; 18+ messages in thread
From: Peter Korsgaard @ 2024-01-09 12:51 UTC (permalink / raw)
To: Thomas Petazzoni via buildroot
Cc: Adam Duskett, Pascal Huerst, Thomas Petazzoni
>>>>> "Thomas" == Thomas Petazzoni via buildroot <buildroot@buildroot.org> writes:
> On Sat, 2 Dec 2023 21:18:36 -0700
> Adam Duskett <adam.duskett@amarulasolutions.com> wrote:
>> Fixes the following error when building against Fedora 39:
>> ‘uintptr_t’ is defined in header ‘<cstdint>’; did you forget to
>> ‘#include <cstdint>’?
>>
>> Signed-off-by: Adam Duskett <adam.duskett@amarulasolutions.com>
>> ---
>> ...add-cstdint-to-minidump_descriptor.h.patch | 32 +++++++++++++++++++
>> 1 file changed, 32 insertions(+)
>> create mode 100644 package/google-breakpad/0001-add-cstdint-to-minidump_descriptor.h.patch
> I've applied, but after backporting instead the upstream commit, and
> adding a reference to the autobuilder failure being fixed by this
> patch. Thanks!
Committed to 2023.02.x and 2023.11.x, thanks.
--
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Buildroot] [PATCH 4/6] support/testing/tests/package/test_google_breakpad.py: new runtime test
2023-12-03 4:18 [Buildroot] [PATCH 1/6] package/google-breakpad/gen-syms.sh: fix shellcheck warnings Adam Duskett
2023-12-03 4:18 ` [Buildroot] [PATCH 2/6] package/google-breakpad: disable uclibc support Adam Duskett
2023-12-03 4:18 ` [Buildroot] [PATCH 3/6] package/google-breakpad: fix building on newer systems Adam Duskett
@ 2023-12-03 4:18 ` Adam Duskett
2023-12-24 11:09 ` Thomas Petazzoni via buildroot
2023-12-03 4:18 ` [Buildroot] [PATCH 5/6] package/google-breakpad: add 0002-dont-include-stab.h.patch Adam Duskett
` (3 subsequent siblings)
6 siblings, 1 reply; 18+ messages in thread
From: Adam Duskett @ 2023-12-03 4:18 UTC (permalink / raw)
To: buildroot; +Cc: Adam Duskett, Pascal Huerst, Thomas Petazzoni
Add a test that does the following:
- Builds the example code found here:
https://chromium.googlesource.com/breakpad/breakpad/+/master/docs/linux_starter_guide.md
- runs the google-breakpad-example program and checks to ensure the exit
code is 139 (SIGSEGV)
- Runs the minidump_stackwalk tool against the google-breakpad-example
symbols and checks for the following:
- That the google-breakpad-examples symbols loaded properly.
- That the crash() method in the google-breakpad-example.cpp file is
printed.
Signed-off-by: Adam Duskett <adam.duskett@amarulasolutions.com>
---
.../br2-external/google-breakpad/Config.in | 1 +
.../google-breakpad/external.desc | 1 +
.../br2-external/google-breakpad/external.mk | 1 +
.../package/google-breakpad-example/Config.in | 7 +++
.../google-breakpad-example.cpp | 22 ++++++++
.../google-breakpad-example.mk | 24 +++++++++
.../google-breakpad/post-build.sh | 5 ++
.../tests/package/test_google_breakpad.py | 50 +++++++++++++++++++
8 files changed, 111 insertions(+)
create mode 100644 support/testing/tests/package/br2-external/google-breakpad/Config.in
create mode 100644 support/testing/tests/package/br2-external/google-breakpad/external.desc
create mode 100644 support/testing/tests/package/br2-external/google-breakpad/external.mk
create mode 100644 support/testing/tests/package/br2-external/google-breakpad/package/google-breakpad-example/Config.in
create mode 100644 support/testing/tests/package/br2-external/google-breakpad/package/google-breakpad-example/google-breakpad-example.cpp
create mode 100644 support/testing/tests/package/br2-external/google-breakpad/package/google-breakpad-example/google-breakpad-example.mk
create mode 100755 support/testing/tests/package/br2-external/google-breakpad/post-build.sh
create mode 100644 support/testing/tests/package/test_google_breakpad.py
diff --git a/support/testing/tests/package/br2-external/google-breakpad/Config.in b/support/testing/tests/package/br2-external/google-breakpad/Config.in
new file mode 100644
index 0000000000..34c28ab03f
--- /dev/null
+++ b/support/testing/tests/package/br2-external/google-breakpad/Config.in
@@ -0,0 +1 @@
+source "$BR2_EXTERNAL_GOOGLE_BREAKPAD_PATH/package/google-breakpad-example/Config.in"
diff --git a/support/testing/tests/package/br2-external/google-breakpad/external.desc b/support/testing/tests/package/br2-external/google-breakpad/external.desc
new file mode 100644
index 0000000000..2bab54cfc1
--- /dev/null
+++ b/support/testing/tests/package/br2-external/google-breakpad/external.desc
@@ -0,0 +1 @@
+name: GOOGLE_BREAKPAD
diff --git a/support/testing/tests/package/br2-external/google-breakpad/external.mk b/support/testing/tests/package/br2-external/google-breakpad/external.mk
new file mode 100644
index 0000000000..44f7ccfc82
--- /dev/null
+++ b/support/testing/tests/package/br2-external/google-breakpad/external.mk
@@ -0,0 +1 @@
+include $(sort $(wildcard $(BR2_EXTERNAL_GOOGLE_BREAKPAD_PATH)/package/*/*.mk))
diff --git a/support/testing/tests/package/br2-external/google-breakpad/package/google-breakpad-example/Config.in b/support/testing/tests/package/br2-external/google-breakpad/package/google-breakpad-example/Config.in
new file mode 100644
index 0000000000..bab1d0d02c
--- /dev/null
+++ b/support/testing/tests/package/br2-external/google-breakpad/package/google-breakpad-example/Config.in
@@ -0,0 +1,7 @@
+config BR2_PACKAGE_GOOGLE_BREAKPAD_EXAMPLE
+ bool "google breakpad example"
+ depends on BR2_PACKAGE_GOOGLE_BREAKPAD
+ help
+ Example google-breakpad code
+
+ https://chromium.googlesource.com/breakpad/breakpad/+/master/docs/linux_starter_guide.md
diff --git a/support/testing/tests/package/br2-external/google-breakpad/package/google-breakpad-example/google-breakpad-example.cpp b/support/testing/tests/package/br2-external/google-breakpad/package/google-breakpad-example/google-breakpad-example.cpp
new file mode 100644
index 0000000000..9349dd2e5b
--- /dev/null
+++ b/support/testing/tests/package/br2-external/google-breakpad/package/google-breakpad-example/google-breakpad-example.cpp
@@ -0,0 +1,22 @@
+/*
+ * This code is from https://chromium.googlesource.com/breakpad/breakpad/+/master/docs/linux_starter_guide.md
+*/
+#include <stdio.h>
+#include <client/linux/handler/exception_handler.h>
+
+static bool dumpCallback(const google_breakpad::MinidumpDescriptor& descriptor, void* context, bool succeeded) {
+ printf("Dump path: %s\n", descriptor.path());
+ return succeeded;
+}
+
+void crash() {
+ volatile int *a = (int*)(NULL);
+ *a = 1;
+}
+
+int main(int argc, char* argv[]) {
+ google_breakpad::MinidumpDescriptor descriptor("/tmp");
+ google_breakpad::ExceptionHandler eh(descriptor, NULL, dumpCallback, NULL, true, -1);
+ crash();
+ return 0;
+}
diff --git a/support/testing/tests/package/br2-external/google-breakpad/package/google-breakpad-example/google-breakpad-example.mk b/support/testing/tests/package/br2-external/google-breakpad/package/google-breakpad-example/google-breakpad-example.mk
new file mode 100644
index 0000000000..17ddd68716
--- /dev/null
+++ b/support/testing/tests/package/br2-external/google-breakpad/package/google-breakpad-example/google-breakpad-example.mk
@@ -0,0 +1,24 @@
+################################################################################
+#
+# google-breakpad-example
+#
+################################################################################
+
+GOOGLE_BREAKPAD_EXAMPLE_DEPENDENCIES = google-breakpad
+
+define GOOGLE_BREAKPAD_EXAMPLE_BUILD_CMDS
+ $(INSTALL) -D $(GOOGLE_BREAKPAD_EXAMPLE_PKGDIR)/google-breakpad-example.cpp \
+ $(@D)/google-breakpad-example.cpp
+
+ $(TARGET_MAKE_ENV) $(TARGET_CXX) $(TARGET_CPPFLAGS) \
+ -I$(STAGING_DIR)/usr/include/breakpad \
+ $(@D)/google-breakpad-example.cpp \
+ $(STAGING_DIR)/usr/lib/libbreakpad_client.a -o $(@D)/google-breakpad-example
+endef
+
+define GOOGLE_BREAKPAD_EXAMPLE_INSTALL_TARGET_CMDS
+ $(INSTALL) -D -m 755 $(@D)/google-breakpad-example \
+ $(TARGET_DIR)/usr/bin/google-breakpad-example
+endef
+
+$(eval $(generic-package))
diff --git a/support/testing/tests/package/br2-external/google-breakpad/post-build.sh b/support/testing/tests/package/br2-external/google-breakpad/post-build.sh
new file mode 100755
index 0000000000..6778aae339
--- /dev/null
+++ b/support/testing/tests/package/br2-external/google-breakpad/post-build.sh
@@ -0,0 +1,5 @@
+#!/usr/bin/env bash
+set -e
+
+# We are going to run the minidump_stackwalk tool in the qemu instance.
+cp -rf "${STAGING_DIR}"/usr/share/google-breakpad-symbols "${TARGET_DIR}"/root/
diff --git a/support/testing/tests/package/test_google_breakpad.py b/support/testing/tests/package/test_google_breakpad.py
new file mode 100644
index 0000000000..646bdf6ee3
--- /dev/null
+++ b/support/testing/tests/package/test_google_breakpad.py
@@ -0,0 +1,50 @@
+import os
+import infra.basetest
+
+
+class GoogelBreakPadBase(infra.basetest.BRTest):
+ br2_external = [infra.filepath("tests/package/br2-external/google-breakpad")]
+ config = \
+ """
+ BR2_arm=y
+ BR2_TOOLCHAIN_EXTERNAL=y
+ BR2_TOOLCHAIN_EXTERNAL_BOOTLIN=y
+ BR2_ENABLE_DEBUG=y
+ BR2_ROOTFS_POST_BUILD_SCRIPT="support/testing/tests/package/br2-external/google-breakpad/post-build.sh"
+ BR2_STRIP_EXCLUDE_FILES="google-breakpad-example"
+ BR2_GOOGLE_BREAKPAD_ENABLE=y
+ BR2_GOOGLE_BREAKPAD_INCLUDE_FILES="/usr/bin/google-breakpad-example"
+ BR2_TARGET_ROOTFS_CPIO=y
+ BR2_PACKAGE_GOOGLE_BREAKPAD=y
+ BR2_PACKAGE_GOOGLE_BREAKPAD_TOOLS=y
+ BR2_PACKAGE_GOOGLE_BREAKPAD_EXAMPLE=y
+ """
+
+ def check_google_breakpad(self):
+ cpio_file = os.path.join(self.builddir, "images", "rootfs.cpio")
+ self.emulator.boot(arch="armv5",
+ kernel="builtin",
+ options=["-initrd", cpio_file])
+ self.emulator.login()
+ output, exit_code = self.emulator.run("google-breakpad-example")
+
+ # google-breakpad-example is expected to exit SIGSEGV.
+ self.assertEqual(exit_code, 139)
+ dump_path = output[0].split(' ')[2]
+ output, exit_code = self.emulator.run(f"minidump_stackwalk {dump_path} /root/google-breakpad-symbols/")
+ self.assertEqual(exit_code, 0)
+
+ # Ensure that minidump_stackwalk properly loaded the google-breakpad-example symbols
+ if not any("Loading symbols for module /usr/bin/google-breakpad-example" in line for line in output):
+ self.fail("Failed to load symbols from /usr/bin/google-breakpad-example")
+
+ # Ensure that the crash method is found and printed by minidump_stackwalk
+ if not any("google-breakpad-example!crash()" in line for line in output):
+ self.fail("google-breakpad-example!crash() not in minidump_stackwalk output!")
+
+
+class TestGoogleBreakPadGlibC(GoogelBreakPadBase):
+ config = GoogelBreakPadBase.config + "BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_ARMV5_EABI_GLIBC_STABLE=y"
+
+ def test_run(self):
+ self.check_google_breakpad()
--
2.43.0
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 18+ messages in thread* Re: [Buildroot] [PATCH 4/6] support/testing/tests/package/test_google_breakpad.py: new runtime test
2023-12-03 4:18 ` [Buildroot] [PATCH 4/6] support/testing/tests/package/test_google_breakpad.py: new runtime test Adam Duskett
@ 2023-12-24 11:09 ` Thomas Petazzoni via buildroot
2024-01-09 12:58 ` Peter Korsgaard
0 siblings, 1 reply; 18+ messages in thread
From: Thomas Petazzoni via buildroot @ 2023-12-24 11:09 UTC (permalink / raw)
To: Adam Duskett; +Cc: Julien Olivain, Pascal Huerst, buildroot
Hello,
Julien (Olivain, there is some question for you towards the end).
On Sat, 2 Dec 2023 21:18:37 -0700
Adam Duskett <adam.duskett@amarulasolutions.com> wrote:
> Add a test that does the following:
>
> - Builds the example code found here:
> https://chromium.googlesource.com/breakpad/breakpad/+/master/docs/linux_starter_guide.md
>
> - runs the google-breakpad-example program and checks to ensure the exit
> code is 139 (SIGSEGV)
>
> - Runs the minidump_stackwalk tool against the google-breakpad-example
> symbols and checks for the following:
> - That the google-breakpad-examples symbols loaded properly.
> - That the crash() method in the google-breakpad-example.cpp file is
> printed.
>
> Signed-off-by: Adam Duskett <adam.duskett@amarulasolutions.com>
Very nice test case! Clearly not the simplest test case. I have some
suggestions below.
> diff --git a/support/testing/tests/package/br2-external/google-breakpad/package/google-breakpad-example/google-breakpad-example.mk b/support/testing/tests/package/br2-external/google-breakpad/package/google-breakpad-example/google-breakpad-example.mk
> new file mode 100644
> index 0000000000..17ddd68716
> --- /dev/null
> +++ b/support/testing/tests/package/br2-external/google-breakpad/package/google-breakpad-example/google-breakpad-example.mk
> @@ -0,0 +1,24 @@
> +################################################################################
> +#
> +# google-breakpad-example
> +#
> +################################################################################
> +
> +GOOGLE_BREAKPAD_EXAMPLE_DEPENDENCIES = google-breakpad
> +
> +define GOOGLE_BREAKPAD_EXAMPLE_BUILD_CMDS
> + $(INSTALL) -D $(GOOGLE_BREAKPAD_EXAMPLE_PKGDIR)/google-breakpad-example.cpp \
> + $(@D)/google-breakpad-example.cpp
Trivial: I think this particular command should go into
GOOGLE_BREAKPAD_EXAMPLE_EXTRACT_CMDS.
> +
> + $(TARGET_MAKE_ENV) $(TARGET_CXX) $(TARGET_CPPFLAGS) \
> + -I$(STAGING_DIR)/usr/include/breakpad \
> + $(@D)/google-breakpad-example.cpp \
> + $(STAGING_DIR)/usr/lib/libbreakpad_client.a -o $(@D)/google-breakpad-example
Perhaps you can use -lbreakpad_client instead of
$(STAGING_DIR)/usr/lib/libbreakpad_client.a ?
> diff --git a/support/testing/tests/package/br2-external/google-breakpad/post-build.sh b/support/testing/tests/package/br2-external/google-breakpad/post-build.sh
> new file mode 100755
> index 0000000000..6778aae339
> --- /dev/null
> +++ b/support/testing/tests/package/br2-external/google-breakpad/post-build.sh
> @@ -0,0 +1,5 @@
> +#!/usr/bin/env bash
> +set -e
> +
> +# We are going to run the minidump_stackwalk tool in the qemu instance.
> +cp -rf "${STAGING_DIR}"/usr/share/google-breakpad-symbols "${TARGET_DIR}"/root/
See below, I have a suggestion that I believe would make this
post-build script not necessary.
> diff --git a/support/testing/tests/package/test_google_breakpad.py b/support/testing/tests/package/test_google_breakpad.py
> new file mode 100644
> index 0000000000..646bdf6ee3
> --- /dev/null
> +++ b/support/testing/tests/package/test_google_breakpad.py
> @@ -0,0 +1,50 @@
> +import os
> +import infra.basetest
> +
> +
> +class GoogelBreakPadBase(infra.basetest.BRTest):
^^^ minor typo here
> + br2_external = [infra.filepath("tests/package/br2-external/google-breakpad")]
> + config = \
> + """
> + BR2_arm=y
> + BR2_TOOLCHAIN_EXTERNAL=y
> + BR2_TOOLCHAIN_EXTERNAL_BOOTLIN=y
> + BR2_ENABLE_DEBUG=y
> + BR2_ROOTFS_POST_BUILD_SCRIPT="support/testing/tests/package/br2-external/google-breakpad/post-build.sh"
> + BR2_STRIP_EXCLUDE_FILES="google-breakpad-example"
So the target exclude needs to have debugging symbols for
google-breakpad to work? I thought the whole idea was precisely that it
allowed to avoid the need for having debugging symbols on the target? I
must admit I am not very familiar with google-breakpad, so I might
totally wrong on this.
> + BR2_GOOGLE_BREAKPAD_ENABLE=y
> + BR2_GOOGLE_BREAKPAD_INCLUDE_FILES="/usr/bin/google-breakpad-example"
> + BR2_TARGET_ROOTFS_CPIO=y
> + BR2_PACKAGE_GOOGLE_BREAKPAD=y
> + BR2_PACKAGE_GOOGLE_BREAKPAD_TOOLS=y
With my proposal below, the tools on the target would not be needed.
> + BR2_PACKAGE_GOOGLE_BREAKPAD_EXAMPLE=y
> + """
> +
> + def check_google_breakpad(self):
> + cpio_file = os.path.join(self.builddir, "images", "rootfs.cpio")
> + self.emulator.boot(arch="armv5",
> + kernel="builtin",
> + options=["-initrd", cpio_file])
> + self.emulator.login()
> + output, exit_code = self.emulator.run("google-breakpad-example")
> +
> + # google-breakpad-example is expected to exit SIGSEGV.
> + self.assertEqual(exit_code, 139)
> + dump_path = output[0].split(' ')[2]
> + output, exit_code = self.emulator.run(f"minidump_stackwalk {dump_path} /root/google-breakpad-symbols/")
> + self.assertEqual(exit_code, 0)
> +
> + # Ensure that minidump_stackwalk properly loaded the google-breakpad-example symbols
> + if not any("Loading symbols for module /usr/bin/google-breakpad-example" in line for line in output):
> + self.fail("Failed to load symbols from /usr/bin/google-breakpad-example")
> +
> + # Ensure that the crash method is found and printed by minidump_stackwalk
> + if not any("google-breakpad-example!crash()" in line for line in output):
> + self.fail("google-breakpad-example!crash() not in minidump_stackwalk output!")
I think the analysis of the dump should happen on the host rather than
the target, because this is really the primary use-case for
google-breakpad: your target application is linked with
google-breakpad, so that when it crashes it creates a minidump, which
you can then retrieve for off-line analysis with the debugging symbols
that you have kept around in your build system.
So after the application is run and has crashed, I believe we should
transfer the crash data back to the host, and then use
minidump_stackwalk on the host.
As we discussed, I am just not sure what would be the right mechanism
to exchange data between the target system running in Qemu, and the
host running the test suite. Our default Busybox configuration doesn't
enable httpd or ftpd. One option would be dropbear of course. This
would in all cases require networking between host and target.
Julien: do you have some suggestions here?
> +class TestGoogleBreakPadGlibC(GoogelBreakPadBase):
> + config = GoogelBreakPadBase.config + "BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_ARMV5_EABI_GLIBC_STABLE=y"
> +
> + def test_run(self):
> + self.check_google_breakpad()
Since for now we're keeping breakpad glibc-only, let's keep things
simple and have the main test case use a glibc toolchain. We can always
rework this if uclibc (or musl) support gets enabled at some point in
the future.
Thomas
--
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Buildroot] [PATCH 5/6] package/google-breakpad: add 0002-dont-include-stab.h.patch
2023-12-03 4:18 [Buildroot] [PATCH 1/6] package/google-breakpad/gen-syms.sh: fix shellcheck warnings Adam Duskett
` (2 preceding siblings ...)
2023-12-03 4:18 ` [Buildroot] [PATCH 4/6] support/testing/tests/package/test_google_breakpad.py: new runtime test Adam Duskett
@ 2023-12-03 4:18 ` Adam Duskett
2023-12-24 10:59 ` Thomas Petazzoni via buildroot
2023-12-03 4:18 ` [Buildroot] [PATCH 6/6] package/google-breakpad: bump version to f49c2f1a2023da0cb055874fba050563dfea57db Adam Duskett
` (2 subsequent siblings)
6 siblings, 1 reply; 18+ messages in thread
From: Adam Duskett @ 2023-12-03 4:18 UTC (permalink / raw)
To: buildroot; +Cc: Adam Duskett, Pascal Huerst, Thomas Petazzoni
This patch is from openembedded. Unfortuantly, as it patches configure.ac,
we must add GOOGLE_BREAKPAD_AUTORECONF = YES to google-breakpad.mk.
We also add TestGoogleBreakPaduClibc.
Signed-off-by: Adam Duskett <adam.duskett@amarulasolutions.com>
---
Config.in | 2 +-
.../0002-dont-include-stab.h.patch | 103 ++++++++++++++++++
package/google-breakpad/Config.in | 6 +-
package/google-breakpad/google-breakpad.mk | 2 +
.../tests/package/test_google_breakpad.py | 7 ++
5 files changed, 116 insertions(+), 4 deletions(-)
create mode 100644 package/google-breakpad/0002-dont-include-stab.h.patch
diff --git a/Config.in b/Config.in
index 554b4062eb..27f5deb16a 100644
--- a/Config.in
+++ b/Config.in
@@ -589,7 +589,7 @@ config BR2_GOOGLE_BREAKPAD_ENABLE
depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 # C++11
depends on BR2_USE_WCHAR
depends on BR2_TOOLCHAIN_HAS_THREADS
- depends on BR2_TOOLCHAIN_USES_GLIBC
+ depends on (BR2_TOOLCHAIN_USES_GLIBC || BR2_TOOLCHAIN_USES_UCLIBC)
depends on BR2_PACKAGE_GOOGLE_BREAKPAD_ARCH_SUPPORTS
depends on BR2_PACKAGE_HOST_GOOGLE_BREAKPAD_ARCH_SUPPORTS
select BR2_PACKAGE_GOOGLE_BREAKPAD
diff --git a/package/google-breakpad/0002-dont-include-stab.h.patch b/package/google-breakpad/0002-dont-include-stab.h.patch
new file mode 100644
index 0000000000..0817f1928f
--- /dev/null
+++ b/package/google-breakpad/0002-dont-include-stab.h.patch
@@ -0,0 +1,103 @@
+From 569af712da94637091080943f6a0d69ccb35864e Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Thu, 14 Sep 2017 23:24:08 -0700
+Subject: [PATCH] don't include stab.h
+
+From openembeddeds patch found at the following path:
+meta-oe/recipes-devtools/breakpad/breakpad/0003-Dont-include-stab.h.patch
+
+ - Backported to c85eb4a59b618f3beaad5445ceb1f865ffa8efdf
+ - Added || defined(__UCLIBC__) in stabs_reader.h, as uClibc provides the
+ a.out.h file but does not include the N_* macros.
+
+Upstream: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+[Backported to c85eb4a59b618f3beaad5445ceb1f865ffa8efdf]
+Signed-off-by: Adam Duskett <adam.duskett@amarulasolutions.com>
+---
+ configure.ac | 2 +-
+ src/common/stabs_reader.cc | 2 ++
+ src/common/stabs_reader.h | 24 ++++++++++++++++++++++++
+ src/common/stabs_reader_unittest.cc | 2 ++
+ 4 files changed, 29 insertions(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index 20fb075..74aaf93 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -72,7 +72,7 @@ AC_ARG_ENABLE(m32,
+ AC_HEADER_STDC
+ AC_SYS_LARGEFILE
+ AX_PTHREAD
+-AC_CHECK_HEADERS([a.out.h sys/mman.h sys/random.h])
++AC_CHECK_HEADERS([a.out.h stab.h sys/mman.h sys/random.h])
+ AC_CHECK_FUNCS([arc4random getcontext getrandom memfd_create])
+ AM_CONDITIONAL([HAVE_GETCONTEXT], [test "x$ac_cv_func_getcontext" = xyes])
+ AM_CONDITIONAL([HAVE_MEMFD_CREATE], [test "x$ac_cv_func_memfd_create" = xyes])
+diff --git a/src/common/stabs_reader.cc b/src/common/stabs_reader.cc
+index 43c4040..d03c660 100644
+
+--- a/src/common/stabs_reader.cc
++++ b/src/common/stabs_reader.cc
+@@ -34,7 +34,9 @@
+ #include "common/stabs_reader.h"
+
+ #include <assert.h>
++#ifdef HAVE_STAB_H
+ #include <stab.h>
++#endif
+ #include <string.h>
+
+ #include <string>
+diff --git a/src/common/stabs_reader.h b/src/common/stabs_reader.h
+index 1e773f4..9154872 100644
+--- a/src/common/stabs_reader.h
++++ b/src/common/stabs_reader.h
+@@ -58,6 +58,30 @@
+ #elif defined(HAVE_A_OUT_H)
+ #include <a.out.h>
+ #endif
++// Definitions from <stab.h> and <a.out.h> for systems which
++// do not have them
++#if !defined(HAVE_A_OUT_H) || defined(__UCLIBC__)
++#undef N_UNDF
++#define N_UNDF 0x0
++#ifndef N_FUN
++#define N_FUN 0x24
++#endif
++#ifndef N_SLINE
++#define N_SLINE 0x44
++#endif
++#ifndef N_SO
++#define N_SO 0x64
++#endif
++#ifndef N_LSYM
++#define N_LSYM 0x80
++#endif
++#ifndef N_BINCL
++#define N_BINCL 0x82
++#endif
++#ifndef N_SOL
++#define N_SOL 0x84
++#endif
++#endif
+
+ #include <string>
+ #include <vector>
+diff --git a/src/common/stabs_reader_unittest.cc b/src/common/stabs_reader_unittest.cc
+index 24f3e1a..1a148bd 100644
+--- a/src/common/stabs_reader_unittest.cc
++++ b/src/common/stabs_reader_unittest.cc
+@@ -33,7 +33,9 @@
+
+ #include <assert.h>
+ #include <errno.h>
++#ifdef HAVE_STAB_H
+ #include <stab.h>
++#endif
+ #include <stdarg.h>
+ #include <stdlib.h>
+ #include <string.h>
+--
+2.43.0
diff --git a/package/google-breakpad/Config.in b/package/google-breakpad/Config.in
index 49d0bc06de..4320ad64aa 100644
--- a/package/google-breakpad/Config.in
+++ b/package/google-breakpad/Config.in
@@ -9,7 +9,7 @@ config BR2_PACKAGE_GOOGLE_BREAKPAD
depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 # C++11
depends on BR2_USE_WCHAR
depends on BR2_TOOLCHAIN_HAS_THREADS
- depends on BR2_TOOLCHAIN_USES_GLIBC
+ depends on (BR2_TOOLCHAIN_USES_GLIBC || BR2_TOOLCHAIN_USES_UCLIBC)
depends on BR2_PACKAGE_GOOGLE_BREAKPAD_ARCH_SUPPORTS
depends on BR2_PACKAGE_HOST_GOOGLE_BREAKPAD_ARCH_SUPPORTS
select BR2_PACKAGE_LINUX_SYSCALL_SUPPORT
@@ -34,12 +34,12 @@ config BR2_PACKAGE_GOOGLE_BREAKPAD
https://chromium.googlesource.com/breakpad/breakpad
-comment "google-breakpad requires a glibc toolchain w/ wchar, thread, C++, gcc >= 4.8"
+comment "google-breakpad requires a glibc or uClibc toolchain w/ wchar, thread, C++, gcc >= 4.8"
depends on BR2_PACKAGE_GOOGLE_BREAKPAD_ARCH_SUPPORTS
depends on BR2_PACKAGE_HOST_GOOGLE_BREAKPAD_ARCH_SUPPORTS
depends on !BR2_INSTALL_LIBSTDCPP || !BR2_USE_WCHAR || \
!BR2_TOOLCHAIN_HAS_THREADS || \
- !BR2_TOOLCHAIN_USES_GLIBC || \
+ !(BR2_TOOLCHAIN_USES_GLIBC || BR2_TOOLCHAIN_USES_UCLIBC) || \
!BR2_TOOLCHAIN_GCC_AT_LEAST_4_8
if BR2_PACKAGE_GOOGLE_BREAKPAD
diff --git a/package/google-breakpad/google-breakpad.mk b/package/google-breakpad/google-breakpad.mk
index 132323363b..154a5ed20e 100644
--- a/package/google-breakpad/google-breakpad.mk
+++ b/package/google-breakpad/google-breakpad.mk
@@ -12,6 +12,8 @@ GOOGLE_BREAKPAD_LICENSE = BSD-3-Clause, MIT
GOOGLE_BREAKPAD_LICENSE_FILES = LICENSE
GOOGLE_BREAKPAD_DEPENDENCIES = host-google-breakpad linux-syscall-support
+# Patching configure.ac
+GOOGLE_BREAKPAD_AUTORECONF = YES
HOST_GOOGLE_BREAKPAD_DEPENDENCIES = host-linux-syscall-support
ifeq ($(BR2_PACKAGE_GOOGLE_BREAKPAD_TOOLS),)
diff --git a/support/testing/tests/package/test_google_breakpad.py b/support/testing/tests/package/test_google_breakpad.py
index 646bdf6ee3..4d791bb79b 100644
--- a/support/testing/tests/package/test_google_breakpad.py
+++ b/support/testing/tests/package/test_google_breakpad.py
@@ -48,3 +48,10 @@ class TestGoogleBreakPadGlibC(GoogelBreakPadBase):
def test_run(self):
self.check_google_breakpad()
+
+
+class TestGoogleBreakPaduClibc(GoogelBreakPadBase):
+ config = GoogelBreakPadBase.config + "BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_ARMV5_EABI_UCLIBC_STABLE=y"
+
+ def test_run(self):
+ self.check_google_breakpad()
--
2.43.0
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 18+ messages in thread* Re: [Buildroot] [PATCH 5/6] package/google-breakpad: add 0002-dont-include-stab.h.patch
2023-12-03 4:18 ` [Buildroot] [PATCH 5/6] package/google-breakpad: add 0002-dont-include-stab.h.patch Adam Duskett
@ 2023-12-24 10:59 ` Thomas Petazzoni via buildroot
0 siblings, 0 replies; 18+ messages in thread
From: Thomas Petazzoni via buildroot @ 2023-12-24 10:59 UTC (permalink / raw)
To: Adam Duskett; +Cc: Pascal Huerst, buildroot
Hello Adam,
On Sat, 2 Dec 2023 21:18:38 -0700
Adam Duskett <adam.duskett@amarulasolutions.com> wrote:
> diff --git a/package/google-breakpad/0002-dont-include-stab.h.patch b/package/google-breakpad/0002-dont-include-stab.h.patch
> new file mode 100644
> index 0000000000..0817f1928f
> --- /dev/null
> +++ b/package/google-breakpad/0002-dont-include-stab.h.patch
> @@ -0,0 +1,103 @@
> +From 569af712da94637091080943f6a0d69ccb35864e Mon Sep 17 00:00:00 2001
> +From: Khem Raj <raj.khem@gmail.com>
> +Date: Thu, 14 Sep 2017 23:24:08 -0700
> +Subject: [PATCH] don't include stab.h
> +
> +From openembeddeds patch found at the following path:
> +meta-oe/recipes-devtools/breakpad/breakpad/0003-Dont-include-stab.h.patch
> +
> + - Backported to c85eb4a59b618f3beaad5445ceb1f865ffa8efdf
> + - Added || defined(__UCLIBC__) in stabs_reader.h, as uClibc provides the
> + a.out.h file but does not include the N_* macros.
> +
> +Upstream: Pending
> +
> +Signed-off-by: Khem Raj <raj.khem@gmail.com>
> +[Backported to c85eb4a59b618f3beaad5445ceb1f865ffa8efdf]
> +Signed-off-by: Adam Duskett <adam.duskett@amarulasolutions.com>
I am not too sure about wanting to include this patch. The patch has
been written in 2017 apparently, and it says "Upstream: Pending", but I
couldn't find it having been submitted anywhere. So it's really a patch
that apparently has never been submitted upstream, which we would carry
forever. So unless someone has a particular interested in getting
google-breakpad to work on uClibc systems, who would take care of
taking the time to upstream this change, I'd prefer to keep
google-breakpad available only for glibc configurations for now. If the
patch was being submitted upstream, I would be fully OK to include it
in Buildroot.
Best regards,
Thomas
--
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Buildroot] [PATCH 6/6] package/google-breakpad: bump version to f49c2f1a2023da0cb055874fba050563dfea57db
2023-12-03 4:18 [Buildroot] [PATCH 1/6] package/google-breakpad/gen-syms.sh: fix shellcheck warnings Adam Duskett
` (3 preceding siblings ...)
2023-12-03 4:18 ` [Buildroot] [PATCH 5/6] package/google-breakpad: add 0002-dont-include-stab.h.patch Adam Duskett
@ 2023-12-03 4:18 ` Adam Duskett
2023-12-24 10:56 ` Thomas Petazzoni via buildroot
2023-12-23 21:22 ` [Buildroot] [PATCH 1/6] package/google-breakpad/gen-syms.sh: fix shellcheck warnings Thomas Petazzoni via buildroot
2024-01-09 12:51 ` Peter Korsgaard
6 siblings, 1 reply; 18+ messages in thread
From: Adam Duskett @ 2023-12-03 4:18 UTC (permalink / raw)
To: buildroot; +Cc: Adam Duskett, Pascal Huerst, Thomas Petazzoni
- Drop no longer needed 0001-add-cstdint-to-minidump_descriptor.h.patch
- Rename 0002-dont-include-stab.h.patch to 0001-dont-include-stab.h.patch
and refactor so it applies cleanly.
- Updated license hash due to numerous additions of licenses, and updated
copyright years.
Signed-off-by: Adam Duskett <adam.duskett@amarulasolutions.com>
---
...add-cstdint-to-minidump_descriptor.h.patch | 32 -------------------
...h.patch => 0001-dont-include-stab.h.patch} | 12 +++----
package/google-breakpad/google-breakpad.hash | 4 +--
package/google-breakpad/google-breakpad.mk | 4 +--
4 files changed, 10 insertions(+), 42 deletions(-)
delete mode 100644 package/google-breakpad/0001-add-cstdint-to-minidump_descriptor.h.patch
rename package/google-breakpad/{0002-dont-include-stab.h.patch => 0001-dont-include-stab.h.patch} (95%)
diff --git a/package/google-breakpad/0001-add-cstdint-to-minidump_descriptor.h.patch b/package/google-breakpad/0001-add-cstdint-to-minidump_descriptor.h.patch
deleted file mode 100644
index f13bddc3bb..0000000000
--- a/package/google-breakpad/0001-add-cstdint-to-minidump_descriptor.h.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From dd7a6b28e75e765d45ce7ecab21060e845dd4088 Mon Sep 17 00:00:00 2001
-From: Adam Duskett <adam.duskett@amarulasolutions.com>
-Date: Fri, 1 Dec 2023 10:34:21 -0700
-Subject: [PATCH] add cstdint to minidump_descriptor.h
-
-Fixes builds on newer systems and resolves the following error:
-
-‘uintptr_t’ is defined in header ‘<cstdint>’; did you forget to
-‘#include <cstdint>’?
-
-Upstream: Not submitted. Fixed in later versions.
-
-Signed-off-by: Adam Duskett <adam.duskett@amarulasolutions.com>
----
- src/client/linux/handler/minidump_descriptor.h | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/src/client/linux/handler/minidump_descriptor.h b/src/client/linux/handler/minidump_descriptor.h
-index c7e4f2b..85e8c4b 100644
---- a/src/client/linux/handler/minidump_descriptor.h
-+++ b/src/client/linux/handler/minidump_descriptor.h
-@@ -30,6 +30,7 @@
- #ifndef CLIENT_LINUX_HANDLER_MINIDUMP_DESCRIPTOR_H_
- #define CLIENT_LINUX_HANDLER_MINIDUMP_DESCRIPTOR_H_
-
-+#include <cstdint>
- #include <assert.h>
- #include <sys/types.h>
-
---
-2.43.0
-
diff --git a/package/google-breakpad/0002-dont-include-stab.h.patch b/package/google-breakpad/0001-dont-include-stab.h.patch
similarity index 95%
rename from package/google-breakpad/0002-dont-include-stab.h.patch
rename to package/google-breakpad/0001-dont-include-stab.h.patch
index 0817f1928f..8efcb250c2 100644
--- a/package/google-breakpad/0002-dont-include-stab.h.patch
+++ b/package/google-breakpad/0001-dont-include-stab.h.patch
@@ -23,11 +23,11 @@ Signed-off-by: Adam Duskett <adam.duskett@amarulasolutions.com>
4 files changed, 29 insertions(+), 1 deletion(-)
diff --git a/configure.ac b/configure.ac
-index 20fb075..74aaf93 100644
+index bfee372..2f00a87 100644
--- a/configure.ac
+++ b/configure.ac
-@@ -72,7 +72,7 @@ AC_ARG_ENABLE(m32,
- AC_HEADER_STDC
+@@ -61,7 +61,7 @@ fi
+
AC_SYS_LARGEFILE
AX_PTHREAD
-AC_CHECK_HEADERS([a.out.h sys/mman.h sys/random.h])
@@ -40,7 +40,7 @@ index 43c4040..d03c660 100644
--- a/src/common/stabs_reader.cc
+++ b/src/common/stabs_reader.cc
-@@ -34,7 +34,9 @@
+@@ -38,7 +38,9 @@
#include "common/stabs_reader.h"
#include <assert.h>
@@ -54,7 +54,7 @@ diff --git a/src/common/stabs_reader.h b/src/common/stabs_reader.h
index 1e773f4..9154872 100644
--- a/src/common/stabs_reader.h
+++ b/src/common/stabs_reader.h
-@@ -58,6 +58,30 @@
+@@ -54,6 +54,30 @@
#elif defined(HAVE_A_OUT_H)
#include <a.out.h>
#endif
@@ -89,7 +89,7 @@ diff --git a/src/common/stabs_reader_unittest.cc b/src/common/stabs_reader_unitt
index 24f3e1a..1a148bd 100644
--- a/src/common/stabs_reader_unittest.cc
+++ b/src/common/stabs_reader_unittest.cc
-@@ -33,7 +33,9 @@
+@@ -36,7 +36,9 @@
#include <assert.h>
#include <errno.h>
diff --git a/package/google-breakpad/google-breakpad.hash b/package/google-breakpad/google-breakpad.hash
index 03719816b5..788978f08a 100644
--- a/package/google-breakpad/google-breakpad.hash
+++ b/package/google-breakpad/google-breakpad.hash
@@ -1,3 +1,3 @@
# Locally calculated
-sha256 52716d140ba528d36b40591ae2c7485b18023f6610414bba0057f0cc13caf256 google-breakpad-c85eb4a59b618f3beaad5445ceb1f865ffa8efdf-br1.tar.gz
-sha256 8d5d1311342ed55b486d778a6763f54a26002698ac0cbab64026b98033300dfd LICENSE
+sha256 29e147011bf6577df95ee3a50bf5ffd1941645dd414d569bd409a9035bcbb7f7 google-breakpad-f49c2f1a2023da0cb055874fba050563dfea57db-br1.tar.gz
+sha256 69b3d80c19a460e09716910d54d1ada5d800716e2b73751bebac44352590f646 LICENSE
diff --git a/package/google-breakpad/google-breakpad.mk b/package/google-breakpad/google-breakpad.mk
index 154a5ed20e..95b532347e 100644
--- a/package/google-breakpad/google-breakpad.mk
+++ b/package/google-breakpad/google-breakpad.mk
@@ -4,11 +4,11 @@
#
################################################################################
-GOOGLE_BREAKPAD_VERSION = c85eb4a59b618f3beaad5445ceb1f865ffa8efdf
+GOOGLE_BREAKPAD_VERSION = f49c2f1a2023da0cb055874fba050563dfea57db
GOOGLE_BREAKPAD_SITE = https://chromium.googlesource.com/breakpad/breakpad
GOOGLE_BREAKPAD_SITE_METHOD = git
GOOGLE_BREAKPAD_INSTALL_STAGING = YES
-GOOGLE_BREAKPAD_LICENSE = BSD-3-Clause, MIT
+GOOGLE_BREAKPAD_LICENSE = Apache-2.0, Clarified Artistic License, gedcurl, BSD-3-Clause, GPL-2.0, MIT
GOOGLE_BREAKPAD_LICENSE_FILES = LICENSE
GOOGLE_BREAKPAD_DEPENDENCIES = host-google-breakpad linux-syscall-support
--
2.43.0
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 18+ messages in thread* Re: [Buildroot] [PATCH 6/6] package/google-breakpad: bump version to f49c2f1a2023da0cb055874fba050563dfea57db
2023-12-03 4:18 ` [Buildroot] [PATCH 6/6] package/google-breakpad: bump version to f49c2f1a2023da0cb055874fba050563dfea57db Adam Duskett
@ 2023-12-24 10:56 ` Thomas Petazzoni via buildroot
0 siblings, 0 replies; 18+ messages in thread
From: Thomas Petazzoni via buildroot @ 2023-12-24 10:56 UTC (permalink / raw)
To: Adam Duskett; +Cc: Pascal Huerst, buildroot
Hello Adam,
Thanks for this patch! I have applied, but after doing a number of
changes because as-is the change was not building correctly (I will
provide more details below on what the issues were).
On Sat, 2 Dec 2023 21:18:39 -0700
Adam Duskett <adam.duskett@amarulasolutions.com> wrote:
> - Drop no longer needed 0001-add-cstdint-to-minidump_descriptor.h.patch
>
> - Rename 0002-dont-include-stab.h.patch to 0001-dont-include-stab.h.patch
> and refactor so it applies cleanly.
I dropped this part, because I did not include the fix that allows
building with uClibc at this point (I will reply separately to PATCH
5/6 about this).
> -GOOGLE_BREAKPAD_VERSION = c85eb4a59b618f3beaad5445ceb1f865ffa8efdf
> +GOOGLE_BREAKPAD_VERSION = f49c2f1a2023da0cb055874fba050563dfea57db
> GOOGLE_BREAKPAD_SITE = https://chromium.googlesource.com/breakpad/breakpad
> GOOGLE_BREAKPAD_SITE_METHOD = git
> GOOGLE_BREAKPAD_INSTALL_STAGING = YES
> -GOOGLE_BREAKPAD_LICENSE = BSD-3-Clause, MIT
> +GOOGLE_BREAKPAD_LICENSE = Apache-2.0, Clarified Artistic License, gedcurl, BSD-3-Clause, GPL-2.0, MIT
"gedcurl" wasn't a valid SPDX identifier, based on the LICENSE file, I
assumed it was for the curl license, which is known simply as "curl" in
the SPDX spec.
"Clarified Artistic License" is now as "ClArtistic" in the SPDX
specification.
However, some of those licenses are actually not relevant, because they
are used only for Mac code, or for the autotools machinery that doesn't
go into the target. So I looked at all the licenses of LICENSE one by
one, which gave this:
+# APSL-2.0, BSD-4-Clause, Apache-2.0, BSD-2-Clause not listed, only
+# used for Mac code, GPL-2.0 not listed, only used for autotools code
+GOOGLE_BREAKPAD_LICENSE = \
+ BSD-3-Clause, \
+ Unicode-DFS-2015 (UTF code), \
+ MIT (src/common/linux/breakpad_getcontext.S), \
+ curl (src/third_party/curl/), \
+ ClArtistic (src/third_party/libdisasm)
Hopefully I got it right, because it was a bit tricky. I'm definitely
open to review/suggestions on this as I might have gotten it wrong.
Now, to the things that were problematic:
- This new version has a mandatory dependency on zlib, without which
the build simply fails.
- This new version has an optional dependency on zstd, which needs to
be disabled explicitly to avoid build failures. And also AUTORECONF =
YES is needed because the pre-generated configure/Makefile.in is out
of date, and tries to link with -lzstd even if --disable-zstd is
passed.
So I had to add the following changes:
-GOOGLE_BREAKPAD_DEPENDENCIES = host-google-breakpad linux-syscall-support
+# Needed because the configure/Makefile.in provided in the Git
+# repository is out of date, and links with -lzstd even if
+# --disable-zstd is passed
+GOOGLE_BREAKPAD_AUTORECONF = YES
+GOOGLE_BREAKPAD_DEPENDENCIES = host-google-breakpad linux-syscall-support zlib
+GOOGLE_BREAKPAD_CONF_OPTS = --disable-zstd
-HOST_GOOGLE_BREAKPAD_DEPENDENCIES = host-linux-syscall-support
+HOST_GOOGLE_BREAKPAD_DEPENDENCIES = host-linux-syscall-support host-zlib
+HOST_GOOGLE_BREAKPAD_CONF_OPTS = --disable-zstd
To get breakpad to build properly in this new version (as well as
"select BR2_PACKAGE_ZLIB" in the Config.in).
Applied with those fixes. Thanks for the contribution!
Thomas
--
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [Buildroot] [PATCH 1/6] package/google-breakpad/gen-syms.sh: fix shellcheck warnings
2023-12-03 4:18 [Buildroot] [PATCH 1/6] package/google-breakpad/gen-syms.sh: fix shellcheck warnings Adam Duskett
` (4 preceding siblings ...)
2023-12-03 4:18 ` [Buildroot] [PATCH 6/6] package/google-breakpad: bump version to f49c2f1a2023da0cb055874fba050563dfea57db Adam Duskett
@ 2023-12-23 21:22 ` Thomas Petazzoni via buildroot
2024-01-09 12:51 ` Peter Korsgaard
6 siblings, 0 replies; 18+ messages in thread
From: Thomas Petazzoni via buildroot @ 2023-12-23 21:22 UTC (permalink / raw)
To: Adam Duskett; +Cc: Pascal Huerst, buildroot
On Sat, 2 Dec 2023 21:18:34 -0700
Adam Duskett <adam.duskett@amarulasolutions.com> wrote:
> Fixes warning SC2068
>
> Signed-off-by: Adam Duskett <adam.duskett@amarulasolutions.com>
> ---
> package/google-breakpad/gen-syms.sh | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Applied to master, thanks.
Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 18+ messages in thread* Re: [Buildroot] [PATCH 1/6] package/google-breakpad/gen-syms.sh: fix shellcheck warnings
2023-12-03 4:18 [Buildroot] [PATCH 1/6] package/google-breakpad/gen-syms.sh: fix shellcheck warnings Adam Duskett
` (5 preceding siblings ...)
2023-12-23 21:22 ` [Buildroot] [PATCH 1/6] package/google-breakpad/gen-syms.sh: fix shellcheck warnings Thomas Petazzoni via buildroot
@ 2024-01-09 12:51 ` Peter Korsgaard
6 siblings, 0 replies; 18+ messages in thread
From: Peter Korsgaard @ 2024-01-09 12:51 UTC (permalink / raw)
To: Adam Duskett; +Cc: Pascal Huerst, Thomas Petazzoni, buildroot
>>>>> "Adam" == Adam Duskett <adam.duskett@amarulasolutions.com> writes:
> Fixes warning SC2068
> Signed-off-by: Adam Duskett <adam.duskett@amarulasolutions.com>
Committed to 2023.02.x and 2023.11.x, thanks.
--
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 18+ messages in thread