* [Buildroot] [PATCH 1/1] package/libtracefs: needs threads
@ 2024-01-16 21:44 Fabrice Fontaine
2024-01-16 23:27 ` Giulio Benetti
2024-02-05 15:33 ` Thomas Petazzoni via buildroot
0 siblings, 2 replies; 5+ messages in thread
From: Fabrice Fontaine @ 2024-01-16 21:44 UTC (permalink / raw)
To: buildroot
Cc: Giulio Benetti, Fabrice Fontaine, Yann E . MORIN,
Maxime Chevallier
libtracefs needs threads resulting in the following build failure since
its addition in commit b1dbd3f679e6660325472e3fdca72127d74e6929:
In file included from /home/autobuild/autobuild/instance-2/output-1/host/xtensa-buildroot-linux-uclibc/sysroot/usr/include/stdio.h:27,
from ../src/tracefs-instance.c:10:
/home/autobuild/autobuild/instance-2/output-1/host/xtensa-buildroot-linux-uclibc/sysroot/usr/include/features.h:218:5: warning: #warning requested reentrant code, but thread support was disabled [-Wcpp]
218 | # warning requested reentrant code, but thread support was disabled
| ^~~~~~~
../src/tracefs-instance.c:20:10: fatal error: pthread.h: No such file or directory
20 | #include <pthread.h>
| ^~~~~~~~~~~
Fixes:
- http://autobuild.buildroot.org/results/e0a8dd0781a1d1824a4cb78f47dcff4055083959
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
package/libtracefs/Config.in | 5 +++--
package/linux-tools/Config.in | 5 +++--
2 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/package/libtracefs/Config.in b/package/libtracefs/Config.in
index bb0777b16c..a46bbe0bb1 100644
--- a/package/libtracefs/Config.in
+++ b/package/libtracefs/Config.in
@@ -1,5 +1,6 @@
config BR2_PACKAGE_LIBTRACEFS
bool "libtracefs"
+ depends on BR2_TOOLCHAIN_HAS_THREADS
depends on !BR2_STATIC_LIBS # libtraceevent
select BR2_PACKAGE_LIBTRACEEVENT
help
@@ -8,5 +9,5 @@ config BR2_PACKAGE_LIBTRACEFS
https://git.kernel.org/pub/scm/libs/libtrace/libtraceevent.git/
-comment "libtracefs needs a toolchain w/ dynamic library"
- depends on BR2_STATIC_LIBS
+comment "libtracefs needs a toolchain w/ threads, dynamic library"
+ depends on !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS
diff --git a/package/linux-tools/Config.in b/package/linux-tools/Config.in
index ce744663f1..fb158f84d4 100644
--- a/package/linux-tools/Config.in
+++ b/package/linux-tools/Config.in
@@ -104,6 +104,7 @@ endif
config BR2_PACKAGE_LINUX_TOOLS_RTLA
bool "rtla"
+ depends on BR2_TOOLCHAIN_HAS_THREADS # libtracefs
depends on !BR2_STATIC_LIBS # libtracefs
select BR2_PACKAGE_LINUX_TOOLS
select BR2_PACKAGE_LIBTRACEFS
@@ -124,8 +125,8 @@ config BR2_PACKAGE_LINUX_TOOLS_RTLA
not available in Buildroot, so only rtla in kernels 5.19
onwards is actually supported in Buildroot.
-comment "rtla needs a toolchain w/ dynamic library"
- depends on BR2_STATIC_LIBS
+comment "rtla needs a toolchain w/ threads, dynamic library"
+ depends on !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS
config BR2_PACKAGE_LINUX_TOOLS_SELFTESTS
bool"selftests"
--
2.43.0
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [Buildroot] [PATCH 1/1] package/libtracefs: needs threads
2024-01-16 21:44 [Buildroot] [PATCH 1/1] package/libtracefs: needs threads Fabrice Fontaine
@ 2024-01-16 23:27 ` Giulio Benetti
2024-02-05 15:33 ` Thomas Petazzoni via buildroot
1 sibling, 0 replies; 5+ messages in thread
From: Giulio Benetti @ 2024-01-16 23:27 UTC (permalink / raw)
To: Fabrice Fontaine, buildroot; +Cc: Yann E . MORIN, Maxime Chevallier
Hi Fabrice,
On 16/01/24 22:44, Fabrice Fontaine wrote:
> libtracefs needs threads resulting in the following build failure since
> its addition in commit b1dbd3f679e6660325472e3fdca72127d74e6929:
>
> In file included from /home/autobuild/autobuild/instance-2/output-1/host/xtensa-buildroot-linux-uclibc/sysroot/usr/include/stdio.h:27,
> from ../src/tracefs-instance.c:10:
> /home/autobuild/autobuild/instance-2/output-1/host/xtensa-buildroot-linux-uclibc/sysroot/usr/include/features.h:218:5: warning: #warning requested reentrant code, but thread support was disabled [-Wcpp]
> 218 | # warning requested reentrant code, but thread support was disabled
> | ^~~~~~~
> ../src/tracefs-instance.c:20:10: fatal error: pthread.h: No such file or directory
> 20 | #include <pthread.h>
> | ^~~~~~~~~~~
>
> Fixes:
> - http://autobuild.buildroot.org/results/e0a8dd0781a1d1824a4cb78f47dcff4055083959
>
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Thank you for the patch. I thought pthread was required only while
building samples instead you're right it's mandatory for libtracefs
itself so:
Reviewed-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
Best regards
--
Giulio Benetti
CEO&CTO@Benetti Engineering sas
> ---
> package/libtracefs/Config.in | 5 +++--
> package/linux-tools/Config.in | 5 +++--
> 2 files changed, 6 insertions(+), 4 deletions(-)
>
> diff --git a/package/libtracefs/Config.in b/package/libtracefs/Config.in
> index bb0777b16c..a46bbe0bb1 100644
> --- a/package/libtracefs/Config.in
> +++ b/package/libtracefs/Config.in
> @@ -1,5 +1,6 @@
> config BR2_PACKAGE_LIBTRACEFS
> bool "libtracefs"
> + depends on BR2_TOOLCHAIN_HAS_THREADS
> depends on !BR2_STATIC_LIBS # libtraceevent
> select BR2_PACKAGE_LIBTRACEEVENT
> help
> @@ -8,5 +9,5 @@ config BR2_PACKAGE_LIBTRACEFS
>
> https://git.kernel.org/pub/scm/libs/libtrace/libtraceevent.git/
>
> -comment "libtracefs needs a toolchain w/ dynamic library"
> - depends on BR2_STATIC_LIBS
> +comment "libtracefs needs a toolchain w/ threads, dynamic library"
> + depends on !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS
> diff --git a/package/linux-tools/Config.in b/package/linux-tools/Config.in
> index ce744663f1..fb158f84d4 100644
> --- a/package/linux-tools/Config.in
> +++ b/package/linux-tools/Config.in
> @@ -104,6 +104,7 @@ endif
>
> config BR2_PACKAGE_LINUX_TOOLS_RTLA
> bool "rtla"
> + depends on BR2_TOOLCHAIN_HAS_THREADS # libtracefs
> depends on !BR2_STATIC_LIBS # libtracefs
> select BR2_PACKAGE_LINUX_TOOLS
> select BR2_PACKAGE_LIBTRACEFS
> @@ -124,8 +125,8 @@ config BR2_PACKAGE_LINUX_TOOLS_RTLA
> not available in Buildroot, so only rtla in kernels 5.19
> onwards is actually supported in Buildroot.
>
> -comment "rtla needs a toolchain w/ dynamic library"
> - depends on BR2_STATIC_LIBS
> +comment "rtla needs a toolchain w/ threads, dynamic library"
> + depends on !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS
>
> config BR2_PACKAGE_LINUX_TOOLS_SELFTESTS
> bool"selftests"
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Buildroot] [PATCH 1/1] package/libtracefs: needs threads
2024-01-16 21:44 [Buildroot] [PATCH 1/1] package/libtracefs: needs threads Fabrice Fontaine
2024-01-16 23:27 ` Giulio Benetti
@ 2024-02-05 15:33 ` Thomas Petazzoni via buildroot
2024-02-05 15:36 ` Fabrice Fontaine
1 sibling, 1 reply; 5+ messages in thread
From: Thomas Petazzoni via buildroot @ 2024-02-05 15:33 UTC (permalink / raw)
To: Fabrice Fontaine
Cc: Giulio Benetti, Maxime Chevallier, Yann E . MORIN, buildroot
On Tue, 16 Jan 2024 22:44:27 +0100
Fabrice Fontaine <fontaine.fabrice@gmail.com> wrote:
> libtracefs needs threads resulting in the following build failure since
> its addition in commit b1dbd3f679e6660325472e3fdca72127d74e6929:
>
> In file included from /home/autobuild/autobuild/instance-2/output-1/host/xtensa-buildroot-linux-uclibc/sysroot/usr/include/stdio.h:27,
> from ../src/tracefs-instance.c:10:
> /home/autobuild/autobuild/instance-2/output-1/host/xtensa-buildroot-linux-uclibc/sysroot/usr/include/features.h:218:5: warning: #warning requested reentrant code, but thread support was disabled [-Wcpp]
> 218 | # warning requested reentrant code, but thread support was disabled
> | ^~~~~~~
> ../src/tracefs-instance.c:20:10: fatal error: pthread.h: No such file or directory
> 20 | #include <pthread.h>
> | ^~~~~~~~~~~
>
> Fixes:
> - http://autobuild.buildroot.org/results/e0a8dd0781a1d1824a4cb78f47dcff4055083959
>
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> ---
> package/libtracefs/Config.in | 5 +++--
> package/linux-tools/Config.in | 5 +++--
> 2 files changed, 6 insertions(+), 4 deletions(-)
Thanks a lot! It looks like you missed trace-cmd package, which also
selects libtracefs, so I fixed that up when applying. 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] 5+ messages in thread
* Re: [Buildroot] [PATCH 1/1] package/libtracefs: needs threads
2024-02-05 15:33 ` Thomas Petazzoni via buildroot
@ 2024-02-05 15:36 ` Fabrice Fontaine
2024-02-05 15:46 ` Thomas Petazzoni via buildroot
0 siblings, 1 reply; 5+ messages in thread
From: Fabrice Fontaine @ 2024-02-05 15:36 UTC (permalink / raw)
To: Thomas Petazzoni
Cc: Giulio Benetti, Maxime Chevallier, Yann E . MORIN, buildroot
Hi Thomas,
Le lun. 5 févr. 2024 à 16:34, Thomas Petazzoni
<thomas.petazzoni@bootlin.com> a écrit :
>
> On Tue, 16 Jan 2024 22:44:27 +0100
> Fabrice Fontaine <fontaine.fabrice@gmail.com> wrote:
>
> > libtracefs needs threads resulting in the following build failure since
> > its addition in commit b1dbd3f679e6660325472e3fdca72127d74e6929:
> >
> > In file included from /home/autobuild/autobuild/instance-2/output-1/host/xtensa-buildroot-linux-uclibc/sysroot/usr/include/stdio.h:27,
> > from ../src/tracefs-instance.c:10:
> > /home/autobuild/autobuild/instance-2/output-1/host/xtensa-buildroot-linux-uclibc/sysroot/usr/include/features.h:218:5: warning: #warning requested reentrant code, but thread support was disabled [-Wcpp]
> > 218 | # warning requested reentrant code, but thread support was disabled
> > | ^~~~~~~
> > ../src/tracefs-instance.c:20:10: fatal error: pthread.h: No such file or directory
> > 20 | #include <pthread.h>
> > | ^~~~~~~~~~~
> >
> > Fixes:
> > - http://autobuild.buildroot.org/results/e0a8dd0781a1d1824a4cb78f47dcff4055083959
> >
> > Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> > ---
> > package/libtracefs/Config.in | 5 +++--
> > package/linux-tools/Config.in | 5 +++--
> > 2 files changed, 6 insertions(+), 4 deletions(-)
>
> Thanks a lot! It looks like you missed trace-cmd package, which also
> selects libtracefs, so I fixed that up when applying. Thanks!
I didn't miss trace-cmd, it already has a dependency on
BR2_TOOLCHAIN_HAS_THREADS_NPTL.
>
> Thomas
> --
> Thomas Petazzoni, CTO, Bootlin
> Embedded Linux and Kernel engineering
> https://bootlin.com
Best Regards,
Fabrice
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Buildroot] [PATCH 1/1] package/libtracefs: needs threads
2024-02-05 15:36 ` Fabrice Fontaine
@ 2024-02-05 15:46 ` Thomas Petazzoni via buildroot
0 siblings, 0 replies; 5+ messages in thread
From: Thomas Petazzoni via buildroot @ 2024-02-05 15:46 UTC (permalink / raw)
To: Fabrice Fontaine
Cc: Giulio Benetti, Maxime Chevallier, Yann E . MORIN, buildroot
On Mon, 5 Feb 2024 16:36:45 +0100
Fabrice Fontaine <fontaine.fabrice@gmail.com> wrote:
> > Thanks a lot! It looks like you missed trace-cmd package, which also
> > selects libtracefs, so I fixed that up when applying. Thanks!
>
> I didn't miss trace-cmd, it already has a dependency on
> BR2_TOOLCHAIN_HAS_THREADS_NPTL.
It is totally true, but in general we try to propagate the dependencies
anyway so that we keep track of why we have those dependencies. I agree
it's not a 100% accurate rule in the way we apply it.
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] 5+ messages in thread
end of thread, other threads:[~2024-02-05 15:47 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-16 21:44 [Buildroot] [PATCH 1/1] package/libtracefs: needs threads Fabrice Fontaine
2024-01-16 23:27 ` Giulio Benetti
2024-02-05 15:33 ` Thomas Petazzoni via buildroot
2024-02-05 15:36 ` Fabrice Fontaine
2024-02-05 15:46 ` Thomas Petazzoni via buildroot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox