* [Buildroot] [PATCH 1/1] package/ltrace: fix musl build
@ 2023-11-04 15:58 Fabrice Fontaine
2023-11-04 17:41 ` Thomas Petazzoni via buildroot
0 siblings, 1 reply; 3+ messages in thread
From: Fabrice Fontaine @ 2023-11-04 15:58 UTC (permalink / raw)
To: buildroot; +Cc: Fabrice Fontaine
Fix the following musl build failure raised since commit
bf9583a50276f52edbc37d9f85df5f2cc7fdb5dc:
checking host system type... mips-buildroot-linux-musl
Fixes:
- http://autobuild.buildroot.org/results/a3a5c46e8562d3f091a9b4b205322168fbf9d16b
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
package/ltrace/0004-fix-musl-build.patch | 71 ++++++++++++++++++++++++
1 file changed, 71 insertions(+)
create mode 100644 package/ltrace/0004-fix-musl-build.patch
diff --git a/package/ltrace/0004-fix-musl-build.patch b/package/ltrace/0004-fix-musl-build.patch
new file mode 100644
index 0000000000..0dceb08ec3
--- /dev/null
+++ b/package/ltrace/0004-fix-musl-build.patch
@@ -0,0 +1,71 @@
+From 2070162fef54fceeb62fd2a6989dde4948f807d7 Mon Sep 17 00:00:00 2001
+From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+Date: Thu, 2 Nov 2023 16:59:41 +0100
+Subject: [PATCH] fix musl build
+
+Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+Upstream: unsent yet
+---
+ configure.ac | 1 +
+ sysdeps/linux-gnu/mips/plt.c | 2 ++
+ sysdeps/linux-gnu/ppc/regs.c | 2 ++
+ sysdeps/linux-gnu/xtensa/plt.c | 2 ++
+ 4 files changed, 7 insertions(+)
+
+diff --git a/configure.ac b/configure.ac
+index c83dd02..8015f0d 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -33,6 +33,7 @@ AC_CANONICAL_HOST
+
+ case "${host_os}" in
+ linux-gnu*) HOST_OS="linux-gnu" ;;
++ linux-musl*) HOST_OS="linux-gnu" ;;
+ linux-uclibc*) HOST_OS="linux-gnu" ;;
+ *) AC_MSG_ERROR([unkown host-os ${host_os}]) ;;
+ esac
+diff --git a/sysdeps/linux-gnu/mips/plt.c b/sysdeps/linux-gnu/mips/plt.c
+index c7c10ac..ab96961 100644
+--- a/sysdeps/linux-gnu/mips/plt.c
++++ b/sysdeps/linux-gnu/mips/plt.c
+@@ -23,7 +23,9 @@
+
+ #include <sys/ptrace.h>
+ #include <errno.h>
++#ifdef __GLIBC__
+ #include <error.h>
++#endif
+ #include <gelf.h>
+ #include <inttypes.h>
+ #include <string.h>
+diff --git a/sysdeps/linux-gnu/ppc/regs.c b/sysdeps/linux-gnu/ppc/regs.c
+index 40d7e7a..71a0d35 100644
+--- a/sysdeps/linux-gnu/ppc/regs.c
++++ b/sysdeps/linux-gnu/ppc/regs.c
+@@ -27,7 +27,9 @@
+ #include <sys/ptrace.h>
+ #include <asm/ptrace.h>
+ #include <errno.h>
++#ifdef __GLIBC__
+ #include <error.h>
++#endif
+
+ #include "proc.h"
+ #include "common.h"
+diff --git a/sysdeps/linux-gnu/xtensa/plt.c b/sysdeps/linux-gnu/xtensa/plt.c
+index dd0a0f1..b281510 100644
+--- a/sysdeps/linux-gnu/xtensa/plt.c
++++ b/sysdeps/linux-gnu/xtensa/plt.c
+@@ -19,7 +19,9 @@
+ */
+
+ #include <errno.h>
++#ifdef __GLIBC__
+ #include <error.h>
++#endif
+ #include <gelf.h>
+ #include <inttypes.h>
+ #include <string.h>
+--
+2.42.0
+
--
2.42.0
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [Buildroot] [PATCH 1/1] package/ltrace: fix musl build
2023-11-04 15:58 [Buildroot] [PATCH 1/1] package/ltrace: fix musl build Fabrice Fontaine
@ 2023-11-04 17:41 ` Thomas Petazzoni via buildroot
2024-10-26 17:05 ` Thomas Petazzoni via buildroot
0 siblings, 1 reply; 3+ messages in thread
From: Thomas Petazzoni via buildroot @ 2023-11-04 17:41 UTC (permalink / raw)
To: Fabrice Fontaine; +Cc: buildroot
On Sat, 4 Nov 2023 16:58:57 +0100
Fabrice Fontaine <fontaine.fabrice@gmail.com> wrote:
> Fix the following musl build failure raised since commit
> bf9583a50276f52edbc37d9f85df5f2cc7fdb5dc:
>
> checking host system type... mips-buildroot-linux-musl
>
> Fixes:
> - http://autobuild.buildroot.org/results/a3a5c46e8562d3f091a9b4b205322168fbf9d16b
>
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Thanks for solving this issue.
> +Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> +Upstream: unsent yet
Doesn't that defeat the purpose of the Upstream: flag entirely? Isn't
the idea precisely to strongly encourage (not to say "require") that
patches be sent upstream?
Thanks!
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] 3+ messages in thread
* Re: [Buildroot] [PATCH 1/1] package/ltrace: fix musl build
2023-11-04 17:41 ` Thomas Petazzoni via buildroot
@ 2024-10-26 17:05 ` Thomas Petazzoni via buildroot
0 siblings, 0 replies; 3+ messages in thread
From: Thomas Petazzoni via buildroot @ 2024-10-26 17:05 UTC (permalink / raw)
To: Thomas Petazzoni via buildroot, Fabrice Fontaine; +Cc: Thomas Petazzoni
Hello Fabrice,
On Sat, 4 Nov 2023 18:41:42 +0100
Thomas Petazzoni via buildroot <buildroot@buildroot.org> wrote:
> Doesn't that defeat the purpose of the Upstream: flag entirely? Isn't
> the idea precisely to strongly encourage (not to say "require") that
> patches be sent upstream?
There has still been no feedback from you on this, so I looked into
this a bit more, and it's messy.
ltrace.org points to https://gitlab.com/cespedes/ltrace as being the
Git repo, and this Git repo has changes from a year ago, but absolutely
no tags.
On the other side, Buildroot uses https://github.com/dkogan/ltrace/tree/master
as the upstream... which hasn't seen any commit for the last 8 years.
Though this one has tags, including a 0.7.3 tag, which it the latest
version according to ltrace.org.
And when trying to figure if one if a fork from the other... it's not
clear.
Regarding your patch, you made the inclusion of <error.h> conditional
on __GLIBC__, but what if the code is using functions from <error.h>?
If it builds without <error.h>, then presumably it means the code is no
longer using any function from <error.h>, and those includes can be
dropped?
Alpine had a different patch, that adds a configure.ac check for
<error.h>: https://git.alpinelinux.org/aports/plain/main/ltrace/musl.patch
However, their patch is for 0.7.3, while we use the "latest" commit
from master.
So overall, quite messy stuff, so I decided to mark ltrace as
unavailable for musl:
https://gitlab.com/buildroot.org/buildroot/-/commit/859bd545821a838454577c4c1c9106837cda51cb
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] 3+ messages in thread
end of thread, other threads:[~2024-10-26 17:05 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-04 15:58 [Buildroot] [PATCH 1/1] package/ltrace: fix musl build Fabrice Fontaine
2023-11-04 17:41 ` Thomas Petazzoni via buildroot
2024-10-26 17:05 ` Thomas Petazzoni via buildroot
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.