Skip to contentSkip to conversation

package/rng-tools: needs argp-standalone with musl toolchains

PATCH New Romain Naour 2 participants 10 messages Aug 7, 2015 – Aug 8, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/7 package/rng-tools: needs argp-standalone with musl toolchains

Since argp-standalone is only available for uClibc-ng and musl toolchains, it's safe to link with it when the package is selected.

---
v2: fix argp-standalone dependency in rng-tools.mk
(Yann E.Morin)

---
 package/rng-tools/Config.in    | 2 +-
 package/rng-tools/rng-tools.mk | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)
package/rng-tools/Config.in +1 -1
index 43c5a1c..469b60e 100644
@@ -1,6 +1,6 @@
 config BR2_PACKAGE_RNG_TOOLS
 	bool "rng-tools"
-	select BR2_PACKAGE_ARGP_STANDALONE if BR2_TOOLCHAIN_USES_UCLIBC
+	select BR2_PACKAGE_ARGP_STANDALONE if BR2_TOOLCHAIN_USES_UCLIBC || BR2_TOOLCHAIN_USES_MUSL
 	# For rdrand ligcrypt is required and it's not obvious to users
 	select BR2_PACKAGE_LIBGCRYPT if BR2_i386 || BR2_x86_64
 	help
package/rng-tools/rng-tools.mk +2 -2
index 8648c4f..1b83afa 100644
@@ -9,8 +9,8 @@ RNG_TOOLS_SITE = http://downloads.sourceforge.net/project/gkernel/rng-tools/$(RN
 RNG_TOOLS_LICENSE = GPLv2
 RNG_TOOLS_LICENSE_FILES = COPYING
 
-# Work around for uClibc's lack of argp_*() functions
-ifeq ($(BR2_TOOLCHAIN_USES_UCLIBC),y)
+# Work around for uClibc or musl toolchains which lack of argp_*() functions.
+ifeq ($(BR2_PACKAGE_ARGP_STANDALONE),y)
 RNG_TOOLS_CONF_ENV += LIBS="-largp"
 RNG_TOOLS_DEPENDENCIES += argp-standalone
 endif
Signature · 1 line
2.4.3
#1 lore raw

PATCH 2/7 package/libv4l: needs argp-standalone with musl toolchains

---
 package/libv4l/Config.in | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
package/libv4l/Config.in +1 -1
index 0437ba1..0ae12d1 100644
@@ -5,7 +5,7 @@ config BR2_PACKAGE_LIBV4L
 	depends on !BR2_STATIC_LIBS # dlopen()
 	depends on BR2_INSTALL_LIBSTDCPP
 	depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_0 # media headers
-	select BR2_PACKAGE_ARGP_STANDALONE if BR2_TOOLCHAIN_USES_UCLIBC
+	select BR2_PACKAGE_ARGP_STANDALONE if BR2_TOOLCHAIN_USES_UCLIBC || BR2_TOOLCHAIN_USES_MUSL
 	select BR2_PACKAGE_LIBICONV if !BR2_ENABLE_LOCALE
 	help
 	  libv4l is a collection of libraries which adds a thin abstraction
Signature · 1 line
2.4.3
#2 lore raw

PATCH 3/7 package/libv4l: disable for musl toolchains

In reply to Romain Naour

musl toolchains are not supported yet in libv4l but it's a work in progress.

see:
http://git.linuxtv.org/cgit.cgi/v4l-utils.git/commit/?id=70570c6095fa5859cecd0f9522fe7fd749f1d554
http://git.linuxtv.org/cgit.cgi/v4l-utils.git/commit/?id=403a4e2697a1ff96fe2fa16589039595f21cadf0

But it's not enough.

Disable musl toolchains for libv4l 1.6.3 and wait for a new release.

---
 package/libv4l/Config.in | 1 +
 1 file changed, 1 insertion(+)
package/libv4l/Config.in +1 -0
index 0ae12d1..89e9270 100644
@@ -5,6 +5,7 @@ config BR2_PACKAGE_LIBV4L
 	depends on !BR2_STATIC_LIBS # dlopen()
 	depends on BR2_INSTALL_LIBSTDCPP
 	depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_0 # media headers
+	depends on !BR2_TOOLCHAIN_USES_MUSL # wait for libv4l 1.7+
 	select BR2_PACKAGE_ARGP_STANDALONE if BR2_TOOLCHAIN_USES_UCLIBC || BR2_TOOLCHAIN_USES_MUSL
 	select BR2_PACKAGE_LIBICONV if !BR2_ENABLE_LOCALE
 	help
Signature · 1 line
2.4.3
#3 lore raw

PATCH 3/7 package/libv4l: disable for musl toolchains

Dear Romain Naour,

Quoted 22 lines · Romain Naour

musl toolchains are not supported yet in libv4l but it's a work in progress.

see:
http://git.linuxtv.org/cgit.cgi/v4l-utils.git/commit/?id=70570c6095fa5859cecd0f9522fe7fd749f1d554
http://git.linuxtv.org/cgit.cgi/v4l-utils.git/commit/?id=403a4e2697a1ff96fe2fa16589039595f21cadf0

But it's not enough.

Disable musl toolchains for libv4l 1.6.3 and wait for a new release.

---
 package/libv4l/Config.in | 1 +
 1 file changed, 1 insertion(+)
package/libv4l/Config.in +0 -0
index 0ae12d1..89e9270 100644

package/libv4l/Config.in config BR2_PACKAGE_LIBV4L · line 11

Quoted 7 lines
package/libv4l/Config.in +1 -0
@@ -5,6 +5,7 @@ config BR2_PACKAGE_LIBV4L
 	depends on !BR2_STATIC_LIBS # dlopen()
 	depends on BR2_INSTALL_LIBSTDCPP
 	depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_0 # media headers
+	depends on !BR2_TOOLCHAIN_USES_MUSL # wait for libv4l 1.7+
 	select BR2_PACKAGE_ARGP_STANDALONE if BR2_TOOLCHAIN_USES_UCLIBC || BR2_TOOLCHAIN_USES_MUSL
 	select BR2_PACKAGE_LIBICONV if !BR2_ENABLE_LOCALE
 	help

You forgot to update the Config.in comment, so I've done so before applying. Thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#4 lore raw

PATCH 4/7 package/cpio: add argp-standalone dependency with musl

In reply to Romain Naour

Since argp-standalone is only available for uClibc-ng and musl toolchains, add the dependendy only if it's selected.

---
 package/cpio/Config.in | 2 +-
 package/cpio/cpio.mk   | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)
package/cpio/Config.in +1 -1
index df40fac..1210a0b 100644
@@ -1,7 +1,7 @@
 config BR2_PACKAGE_CPIO
 	bool "cpio"
 	# Need argp.h support
-	select BR2_PACKAGE_ARGP_STANDALONE if BR2_TOOLCHAIN_USES_UCLIBC
+	select BR2_PACKAGE_ARGP_STANDALONE if BR2_TOOLCHAIN_USES_UCLIBC || BR2_TOOLCHAIN_USES_MUSL
 	depends on BR2_USE_WCHAR
 	help
 	  cpio archive utility for creation and extraction.
package/cpio/cpio.mk +2 -2
index aa9dace..e18af81 100644
@@ -15,10 +15,10 @@ CPIO_PATCH = \
 	https://projects.archlinux.org/svntogit/packages.git/plain/cpio/trunk/cpio-2.11-check_for_symlinks-CVE-2015-1197.patch \
 	https://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/app-arch/cpio/files/cpio-2.11-stat.patch
 
-# cpio uses argp.h which is not provided by uclibc by default.
+# cpio uses argp.h which is not provided by uclibc or musl by default.
 # Use the argp-standalone package to provide this but make sure
 # the host package does not try to use the host version.
-ifeq ($(BR2_TOOLCHAIN_USES_UCLIBC),y)
+ifeq ($(BR2_PACKAGE_ARGP_STANDALONE),y)
 CPIO_DEPENDENCIES += argp-standalone
 endif
 
Signature · 1 line
2.4.3
#5 lore raw

PATCH 5/7 package/cpio: remove useless comment

In reply to Romain Naour

This comment is about host-cpio which hasn't
been added in Buildroot.

---
 package/cpio/cpio.mk | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
package/cpio/cpio.mk +1 -2
index e18af81..c29305e 100644
@@ -16,8 +16,7 @@ CPIO_PATCH = \
 	https://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/app-arch/cpio/files/cpio-2.11-stat.patch
 
 # cpio uses argp.h which is not provided by uclibc or musl by default.
-# Use the argp-standalone package to provide this but make sure
-# the host package does not try to use the host version.
+# Use the argp-standalone package to provide this.
 ifeq ($(BR2_PACKAGE_ARGP_STANDALONE),y)
 CPIO_DEPENDENCIES += argp-standalone
 endif
Signature · 1 line
2.4.3
#6 lore raw

PATCH 6/7 package/libgpgme: add argp-standalone dependency with musl

In reply to Romain Naour

Since argp-standalone is only available for uClibc-ng and musl toolchains, it's safe to link with it when the package is selected.

---
 package/libgpgme/libgpgme.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
package/libgpgme/libgpgme.mk +1 -1
index ec64d37..1868099 100644
@@ -22,7 +22,7 @@ LIBGPGME_CONF_OPTS = --with-gpg=/usr/bin/gpg \
 	--disable-gpg-test
 
 # Handle argp-standalone or it errors out during build
-ifeq ($(BR2_PACKAGE_ARGP_STANDALONE)$(BR2_TOOLCHAIN_USES_UCLIBC),yy)
+ifeq ($(BR2_PACKAGE_ARGP_STANDALONE),y)
 LIBGPGME_CONF_ENV += LIBS="-largp"
 LIBGPGME_DEPENDENCIES += argp-standalone
 endif
Signature · 1 line
2.4.3
#7 lore raw

PATCH 7/7 package/wvstreams: disable for musl toolchains

In reply to Romain Naour

The project seems not maintained anymore since there is no commit since 2011:
https://github.com/wlach/wvstreams

So, let's mark it as not available for musl toolchains, until someone interested enough fixes it.

Fixes:
xplc/modulemgr.cc: In member function ?virtual IServiceHandler* ModuleManagerFactory::createModuleManager(const char*)?:
xplc/modulemgr.cc:90:14: error: ?PATH_MAX? was not declared in this scope
char fname[PATH_MAX];

---
 package/wvstreams/Config.in | 2 ++
 1 file changed, 2 insertions(+)
package/wvstreams/Config.in +2 -0
index 0cbe60a..cc1481a 100644
@@ -3,6 +3,8 @@ config BR2_PACKAGE_WVSTREAMS
 	depends on BR2_INSTALL_LIBSTDCPP
 	depends on !BR2_STATIC_LIBS
 	depends on BR2_USE_MMU # fork()
+        # musl not supported and no upstream activity since 2011.
+	depends on !BR2_TOOLCHAIN_USES_MUSL
 	select BR2_PACKAGE_OPENSSL
 	select BR2_PACKAGE_ZLIB
 	help
Signature · 1 line
2.4.3
#8 lore raw

PATCH 7/7 package/wvstreams: disable for musl toolchains

Dear Romain Naour,

Quoted 11 lines · Romain Naour

The project seems not maintained anymore since there is no commit since 2011:
https://github.com/wlach/wvstreams

So, let's mark it as not available for musl toolchains, until someone interested enough fixes it.

Fixes:
xplc/modulemgr.cc: In member function ?virtual IServiceHandler* ModuleManagerFactory::createModuleManager(const char*)?:
xplc/modulemgr.cc:90:14: error: ?PATH_MAX? was not declared in this scope
char fname[PATH_MAX];

This one is easy to solve, but then it fails due to __libc_stack_end. So I'm OK with disabling on musl. However, can you resend a proper patch that updates the Config.in comment and propagates the dependency to wvdial, which selects wvstreams?

Quoted 1 line

+ # musl not supported and no upstream activity since 2011.

Indentation is wrong.

package/wvstreams/Config.in config BR2_PACKAGE_WVSTREAMS · line 10

Quoted 4 lines
package/wvstreams/Config.in +1 -0
+	depends on !BR2_TOOLCHAIN_USES_MUSL
 	select BR2_PACKAGE_OPENSSL
 	select BR2_PACKAGE_ZLIB
 	help

I'll mark this patch as Changes Requested.

Thanks,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#9 lore raw

PATCH 1/7 package/rng-tools: needs argp-standalone with musl toolchains

In reply to Romain Naour

Dear Romain Naour,

Quoted 4 lines · Romain Naour

Since argp-standalone is only available for uClibc-ng and musl toolchains, it's safe to link with it when the package is selected.

Quoted 8 lines

---
v2: fix argp-standalone dependency in rng-tools.mk
(Yann E.Morin)

---
 package/rng-tools/Config.in    | 2 +-
 package/rng-tools/rng-tools.mk | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

I've applied patches 1 to 6, thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com