All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] lttng-libust: disable on musl
@ 2017-02-21  9:08 Thomas Petazzoni
  2017-02-21 16:18 ` Peter Korsgaard
  0 siblings, 1 reply; 2+ messages in thread
From: Thomas Petazzoni @ 2017-02-21  9:08 UTC (permalink / raw)
  To: buildroot

Since version v2.9.0, lttng-libust has a tracepoint for the C library
dlmopen() function, and uses some types such as Lmid_t, related to
dlmopen(). However, musl doesn't provide dlmopen(), which causes a build
failure.

The Alpine Linux distribution has a patch [1] to remove this code
completely, but while this is a reasonable solution for a musl-only
distribution, it is not for a build system that also supports glibc and
uClibc. Therefore, we instead disable lttng-libust for the musl C
library.

The problem has been reported upstream (no mailing list archive link
available at the time of this commit).

Fixes:

  http://autobuild.buildroot.net/results/113fa95a054df183014b43ec36b329f9c59bd356/

[1] http://git.alpinelinux.org/cgit/aports/tree/testing/lttng-ust/musl-has-no-dlmopen.patch

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 package/lttng-libust/Config.in | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/package/lttng-libust/Config.in b/package/lttng-libust/Config.in
index 4aba188..8600888 100644
--- a/package/lttng-libust/Config.in
+++ b/package/lttng-libust/Config.in
@@ -8,6 +8,8 @@ config BR2_PACKAGE_LTTNG_LIBUST
 	depends on BR2_PACKAGE_LIBURCU_ARCH_SUPPORTS
 	depends on BR2_TOOLCHAIN_HAS_THREADS
 	depends on !BR2_STATIC_LIBS
+	# musl doesn't provide dlmopen() functionality
+	depends on !BR2_TOOLCHAIN_USES_MUSL
 	help
 	  Userspace tracing library for the LTTng 2.x tracing
 	  infrastructure. It allows userspace programs to create
@@ -16,6 +18,7 @@ config BR2_PACKAGE_LTTNG_LIBUST
 
 	  http://lttng.org
 
-comment "lttng-libust needs a toolchain w/ dynamic library, wchar, threads"
+comment "lttng-libust needs a glibc or uClibc toolchain w/ dynamic library, wchar, threads"
 	depends on BR2_PACKAGE_LIBURCU_ARCH_SUPPORTS
-	depends on BR2_STATIC_LIBS || !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS
+	depends on BR2_STATIC_LIBS || !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS || \
+		BR2_TOOLCHAIN_USES_MUSL
-- 
2.7.4

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

* [Buildroot] [PATCH] lttng-libust: disable on musl
  2017-02-21  9:08 [Buildroot] [PATCH] lttng-libust: disable on musl Thomas Petazzoni
@ 2017-02-21 16:18 ` Peter Korsgaard
  0 siblings, 0 replies; 2+ messages in thread
From: Peter Korsgaard @ 2017-02-21 16:18 UTC (permalink / raw)
  To: buildroot

>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes:

 > Since version v2.9.0, lttng-libust has a tracepoint for the C library
 > dlmopen() function, and uses some types such as Lmid_t, related to
 > dlmopen(). However, musl doesn't provide dlmopen(), which causes a build
 > failure.

 > The Alpine Linux distribution has a patch [1] to remove this code
 > completely, but while this is a reasonable solution for a musl-only
 > distribution, it is not for a build system that also supports glibc and
 > uClibc. Therefore, we instead disable lttng-libust for the musl C
 > library.

 > The problem has been reported upstream (no mailing list archive link
 > available at the time of this commit).

 > Fixes:

 >   http://autobuild.buildroot.net/results/113fa95a054df183014b43ec36b329f9c59bd356/

I was confused why it worked on uclibc-ng which also doesn't provide
dlmopen / the Lmid_t type (well it does, but it is inside and #if 0) -
And it turns out that the dlmopen tracepoint doesn't get built when
building against uclibc-ng as dlfcn.h doesn't provide RTLD_DI_LINKMAP.

So an alternative is to convince the configure script that musl doesn't
have RTLD_DI_LINKMAP.

-- 
Bye, Peter Korsgaard

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

end of thread, other threads:[~2017-02-21 16:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-21  9:08 [Buildroot] [PATCH] lttng-libust: disable on musl Thomas Petazzoni
2017-02-21 16:18 ` Peter Korsgaard

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.