Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] package/libtraceevent: needs dynamic library
@ 2024-01-08 20:43 Fabrice Fontaine
  2024-01-08 21:24 ` Yann E. MORIN
  0 siblings, 1 reply; 2+ messages in thread
From: Fabrice Fontaine @ 2024-01-08 20:43 UTC (permalink / raw)
  To: buildroot
  Cc: Giulio Benetti, Fabrice Fontaine, Yann E . MORIN,
	Maxime Chevallier

Fix the following build failure raised since the addition of the package
in commit 1474f1b34b178defca1d16d18a2446fadda9a12b:

../src/event-plugin.c:10:10: fatal error: dlfcn.h: No such file or directory
   10 | #include <dlfcn.h>
      |          ^~~~~~~~~

Fixes:
 - http://autobuild.buildroot.org/results/7802d1ad00293147edda39683f6d3f614dd48263

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
 package/libtraceevent/Config.in | 4 ++++
 package/libtracefs/Config.in    | 4 ++++
 package/linux-tools/Config.in   | 4 ++++
 3 files changed, 12 insertions(+)

diff --git a/package/libtraceevent/Config.in b/package/libtraceevent/Config.in
index 399238eef1..28a5b32576 100644
--- a/package/libtraceevent/Config.in
+++ b/package/libtraceevent/Config.in
@@ -1,5 +1,6 @@
 config BR2_PACKAGE_LIBTRACEEVENT
 	bool "libtraceevent"
+	depends on !BR2_STATIC_LIBS # dlfcn.h
 	help
 	  libtraceevent is a library that interfaces with the ftrace
 	  subsystem in the linux kernel.
@@ -9,3 +10,6 @@ config BR2_PACKAGE_LIBTRACEEVENT
 	  rtla.
 
 	  https://git.kernel.org/pub/scm/libs/libtrace/libtraceevent.git/
+
+comment "libtraceevent needs a toolchain w/ dynamic library"
+	depends on BR2_STATIC_LIBS
diff --git a/package/libtracefs/Config.in b/package/libtracefs/Config.in
index 81a2e962ea..bb0777b16c 100644
--- a/package/libtracefs/Config.in
+++ b/package/libtracefs/Config.in
@@ -1,8 +1,12 @@
 config BR2_PACKAGE_LIBTRACEFS
 	bool "libtracefs"
+	depends on !BR2_STATIC_LIBS # libtraceevent
 	select BR2_PACKAGE_LIBTRACEEVENT
 	help
 	  libtracefs is used to easily interface with the ftrace
 	  interface through the tracefs virtual filesystem.
 
 	  https://git.kernel.org/pub/scm/libs/libtrace/libtraceevent.git/
+
+comment "libtracefs needs a toolchain w/ dynamic library"
+	depends on BR2_STATIC_LIBS
diff --git a/package/linux-tools/Config.in b/package/linux-tools/Config.in
index adfca4dbe3..62adae4463 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_STATIC_LIBS # libtracefs -> libtraceevent
 	select BR2_PACKAGE_LINUX_TOOLS
 	select BR2_PACKAGE_LIBTRACEFS
 	help
@@ -123,6 +124,9 @@ 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
+
 config BR2_PACKAGE_LINUX_TOOLS_SELFTESTS
 	bool"selftests"
 	depends on BR2_PACKAGE_BUSYBOX_SHOW_OTHERS # bash
-- 
2.43.0

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH 1/1] package/libtraceevent: needs dynamic library
  2024-01-08 20:43 [Buildroot] [PATCH 1/1] package/libtraceevent: needs dynamic library Fabrice Fontaine
@ 2024-01-08 21:24 ` Yann E. MORIN
  0 siblings, 0 replies; 2+ messages in thread
From: Yann E. MORIN @ 2024-01-08 21:24 UTC (permalink / raw)
  To: Fabrice Fontaine; +Cc: Giulio Benetti, Maxime Chevallier, buildroot

Fabrice, All,

On 2024-01-08 21:43 +0100, Fabrice Fontaine spake thusly:
> Fix the following build failure raised since the addition of the package
> in commit 1474f1b34b178defca1d16d18a2446fadda9a12b:
> 
> ../src/event-plugin.c:10:10: fatal error: dlfcn.h: No such file or directory
>    10 | #include <dlfcn.h>
>       |          ^~~~~~~~~
> 
> Fixes:
>  - http://autobuild.buildroot.org/results/7802d1ad00293147edda39683f6d3f614dd48263
> 
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> ---
[--SNIP--]
> diff --git a/package/linux-tools/Config.in b/package/linux-tools/Config.in
> index adfca4dbe3..62adae4463 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_STATIC_LIBS # libtracefs -> libtraceevent

In the past, we used to indeed list the full dependency chain that
caused the inherited dependency.

However, there never a good reasoning behind that (unwritten) rule.

Recently, we've started to drop the full chain to only keep the
first-level inheritance.

Indeed, if one of the package further in the dependency chain loses that
dependency, but the first-level package keeps it, it's going to be
tricky to track and update all those comments.

So, I believe it is better to just list the first-level inheritance.

I think the new reasoning is more sound than the previous one.
That's still an unwritten rule, though... :-(

Applied to master with this little fix, thanks.

Regards,
Yann E. MORIN.

>  	select BR2_PACKAGE_LINUX_TOOLS
>  	select BR2_PACKAGE_LIBTRACEFS
>  	help
> @@ -123,6 +124,9 @@ 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
> +
>  config BR2_PACKAGE_LINUX_TOOLS_SELFTESTS
>  	bool"selftests"
>  	depends on BR2_PACKAGE_BUSYBOX_SHOW_OTHERS # bash
> -- 
> 2.43.0
> 
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

end of thread, other threads:[~2024-01-08 21:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-08 20:43 [Buildroot] [PATCH 1/1] package/libtraceevent: needs dynamic library Fabrice Fontaine
2024-01-08 21:24 ` Yann E. MORIN

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