Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] package/libnspr: disable for musl toolchains
@ 2015-08-29 17:42 Romain Naour
  2015-08-29 18:18 ` Thomas Petazzoni
  2015-12-24 10:21 ` Thomas Petazzoni
  0 siblings, 2 replies; 4+ messages in thread
From: Romain Naour @ 2015-08-29 17:42 UTC (permalink / raw)
  To: buildroot

libnspr use getprotobyname_r() which is not available on musl.

Also there is another error due to missing _PR_HAVE_GETHOSTBYNAME2 define:
prnetdb.c: In function ?PR_GetIPNodeByName?:
prnetdb.c:898:2: error: #error "Unknown name-to-address translation function"
 #error "Unknown name-to-address translation function"

_PR_HAVE_GETHOSTBYNAME2 is only set in pr/include/md/_linux.h if __GLIBC__
is defined.

To conclude, libnspr is not ready for musl.
Add reverse dependency on ecryptfs-utils and libnss.

Fixes:
http://autobuild.buildroot.net/results/c75/c756f82dfc49611fa3f650d9cf2a71b59d23c3d0/

Signed-off-by: Romain Naour <romain.naour@openwide.fr>
---
 package/ecryptfs-utils/Config.in | 5 +++--
 package/libnspr/Config.in        | 5 +++--
 package/libnss/Config.in         | 5 +++--
 3 files changed, 9 insertions(+), 6 deletions(-)

diff --git a/package/ecryptfs-utils/Config.in b/package/ecryptfs-utils/Config.in
index cb70e00..6c7ccbd 100644
--- a/package/ecryptfs-utils/Config.in
+++ b/package/ecryptfs-utils/Config.in
@@ -14,6 +14,7 @@ config BR2_PACKAGE_ECRYPTFS_UTILS
 	depends on BR2_PACKAGE_LIBNSPR_ARCH_SUPPORT # libnss -> libnspr
 	depends on !BR2_MIPS_NABI32 # libnss
 	depends on !BR2_STATIC_LIBS # libnss, keyutils
+	depends on !BR2_TOOLCHAIN_USES_MUSL # libnss -> libnspr
 	help
 	  eCryptfs is a POSIX-compliant enterprise cryptographic
 	  filesystem for Linux. It is stacked on top of any other
@@ -29,9 +30,9 @@ config BR2_PACKAGE_ECRYPTFS_UTILS
 
 	  http://ecryptfs.org
 
-comment "ecryptfs-utils needs a toolchain w/ threads, wchar, dynamic library"
+comment "ecryptfs-utils needs a uClibc or (e)glibc toolchain w/ threads, wchar, dynamic library"
 	depends on !BR2_microblaze
 	depends on BR2_PACKAGE_LIBNSPR_ARCH_SUPPORT
 	depends on BR2_USE_MMU
 	depends on !BR2_TOOLCHAIN_HAS_THREADS || !BR2_USE_WCHAR || \
-		BR2_STATIC_LIBS
+		BR2_STATIC_LIBS || BR2_TOOLCHAIN_USES_MUSL
diff --git a/package/libnspr/Config.in b/package/libnspr/Config.in
index ba1ea55..7f5b63c 100644
--- a/package/libnspr/Config.in
+++ b/package/libnspr/Config.in
@@ -8,6 +8,7 @@ config BR2_PACKAGE_LIBNSPR
 	bool "libnspr"
 	depends on BR2_TOOLCHAIN_HAS_THREADS
 	depends on !BR2_STATIC_LIBS
+	depends on !BR2_TOOLCHAIN_USES_MUSL
 	help
 	  NSPR is the Netscape Portable Runtime library which provides
 	  a platform-neutral API for system level and libc like
@@ -16,7 +17,7 @@ config BR2_PACKAGE_LIBNSPR
 
 	  http://www.mozilla.org/projects/nspr/
 
-comment "libnspr needs a toolchain w/ threads, dynamic library"
-	depends on !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS
+comment "libnspr needs a uClibc or (e)glibc toolchain w/ threads, dynamic library"
+	depends on !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS || BR2_TOOLCHAIN_USES_MUSL
 
 endif
diff --git a/package/libnss/Config.in b/package/libnss/Config.in
index f07bb04..e056fe1 100644
--- a/package/libnss/Config.in
+++ b/package/libnss/Config.in
@@ -6,6 +6,7 @@ config BR2_PACKAGE_LIBNSS
 	depends on BR2_TOOLCHAIN_HAS_THREADS # libnspr
 	depends on BR2_PACKAGE_LIBNSPR_ARCH_SUPPORT # libnspr
 	depends on !BR2_STATIC_LIBS
+	depends on !BR2_TOOLCHAIN_USES_MUSL # libnspr
 	help
 	  Network Security Services (NSS) is a set of libraries designed
 	  to support development of security-enabled client and server
@@ -15,6 +16,6 @@ config BR2_PACKAGE_LIBNSS
 
 	  http://www.mozilla.org/projects/security/pki/nss/
 
-comment "libnss needs a toolchain w/ threads, dynamic library"
+comment "libnss needs a uClibc or (e)glibc toolchain w/ threads, dynamic library"
 	depends on BR2_PACKAGE_LIBNSPR_ARCH_SUPPORT
-	depends on !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS
+	depends on !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS || BR2_TOOLCHAIN_USES_MUSL
-- 
2.4.3

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

* [Buildroot] [PATCH] package/libnspr: disable for musl toolchains
  2015-08-29 17:42 [Buildroot] [PATCH] package/libnspr: disable for musl toolchains Romain Naour
@ 2015-08-29 18:18 ` Thomas Petazzoni
  2015-08-29 18:36   ` Romain Naour
  2015-12-24 10:21 ` Thomas Petazzoni
  1 sibling, 1 reply; 4+ messages in thread
From: Thomas Petazzoni @ 2015-08-29 18:18 UTC (permalink / raw)
  To: buildroot

Dear Romain Naour,

On Sat, 29 Aug 2015 19:42:11 +0200, Romain Naour wrote:
> libnspr use getprotobyname_r() which is not available on musl.
> 
> Also there is another error due to missing _PR_HAVE_GETHOSTBYNAME2 define:
> prnetdb.c: In function ?PR_GetIPNodeByName?:
> prnetdb.c:898:2: error: #error "Unknown name-to-address translation function"
>  #error "Unknown name-to-address translation function"
> 
> _PR_HAVE_GETHOSTBYNAME2 is only set in pr/include/md/_linux.h if __GLIBC__
> is defined.
> 
> To conclude, libnspr is not ready for musl.
> Add reverse dependency on ecryptfs-utils and libnss.
> 
> Fixes:
> http://autobuild.buildroot.net/results/c75/c756f82dfc49611fa3f650d9cf2a71b59d23c3d0/
> 
> Signed-off-by: Romain Naour <romain.naour@openwide.fr>

Could you instead give a try to
http://git.alpinelinux.org/cgit/aports/tree/main/nspr/fix-getproto.patch ?

Generally speaking, for musl compatibility issues, always look at
http://git.alpinelinux.org/cgit/aports/tree/main/, it very often
contains interesting patches.

Thanks,

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

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

* [Buildroot] [PATCH] package/libnspr: disable for musl toolchains
  2015-08-29 18:18 ` Thomas Petazzoni
@ 2015-08-29 18:36   ` Romain Naour
  0 siblings, 0 replies; 4+ messages in thread
From: Romain Naour @ 2015-08-29 18:36 UTC (permalink / raw)
  To: buildroot

Hi Thomas,

Le 29/08/2015 20:18, Thomas Petazzoni a ?crit :
> Dear Romain Naour,
> 
> On Sat, 29 Aug 2015 19:42:11 +0200, Romain Naour wrote:
>> libnspr use getprotobyname_r() which is not available on musl.
>>
>> Also there is another error due to missing _PR_HAVE_GETHOSTBYNAME2 define:
>> prnetdb.c: In function ?PR_GetIPNodeByName?:
>> prnetdb.c:898:2: error: #error "Unknown name-to-address translation function"
>>  #error "Unknown name-to-address translation function"
>>
>> _PR_HAVE_GETHOSTBYNAME2 is only set in pr/include/md/_linux.h if __GLIBC__
>> is defined.
>>
>> To conclude, libnspr is not ready for musl.
>> Add reverse dependency on ecryptfs-utils and libnss.
>>
>> Fixes:
>> http://autobuild.buildroot.net/results/c75/c756f82dfc49611fa3f650d9cf2a71b59d23c3d0/
>>
>> Signed-off-by: Romain Naour <romain.naour@openwide.fr>
> 
> Could you instead give a try to
> http://git.alpinelinux.org/cgit/aports/tree/main/nspr/fix-getproto.patch ?
> 
> Generally speaking, for musl compatibility issues, always look at
> http://git.alpinelinux.org/cgit/aports/tree/main/, it very often
> contains interesting patches.

Ha! thanks.
But for this case it's not enough...

prnetdb.c: In function ?PR_GetIPNodeByName?:
prnetdb.c:895:2: error: #error "Unknown name-to-address translation function"
 #error "Unknown name-to-address translation function"

But the packaging add some define :
http://git.alpinelinux.org/cgit/aports/tree/main/nspr/APKBUILD#n40

# ./nspr/pr/include/md/_linux.h tests only __GLIBC__ version
# to detect c-library features, list musl features here for now.
CFLAGS="$CFLAGS -D_PR_POLL_AVAILABLE -D_PR_HAVE_OFF64_T -D_PR_INET6
-D_PR_HAVE_INET_NTOP -D_PR_HAVE_GETHOSTBYNAME2 -D_PR_HAVE_GETADDRINFO
-D_PR_INET6_PROBE

It build fine if (at least) -D_PR_HAVE_GETHOSTBYNAME2 is added to CFLAGS.

Best regards,
Romain

> 
> Thanks,
> 
> Thomas
> 

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

* [Buildroot] [PATCH] package/libnspr: disable for musl toolchains
  2015-08-29 17:42 [Buildroot] [PATCH] package/libnspr: disable for musl toolchains Romain Naour
  2015-08-29 18:18 ` Thomas Petazzoni
@ 2015-12-24 10:21 ` Thomas Petazzoni
  1 sibling, 0 replies; 4+ messages in thread
From: Thomas Petazzoni @ 2015-12-24 10:21 UTC (permalink / raw)
  To: buildroot

Romain,

On Sat, 29 Aug 2015 19:42:11 +0200, Romain Naour wrote:
> libnspr use getprotobyname_r() which is not available on musl.
> 
> Also there is another error due to missing _PR_HAVE_GETHOSTBYNAME2 define:
> prnetdb.c: In function ?PR_GetIPNodeByName?:
> prnetdb.c:898:2: error: #error "Unknown name-to-address translation function"
>  #error "Unknown name-to-address translation function"
> 
> _PR_HAVE_GETHOSTBYNAME2 is only set in pr/include/md/_linux.h if __GLIBC__
> is defined.
> 
> To conclude, libnspr is not ready for musl.
> Add reverse dependency on ecryptfs-utils and libnss.
> 
> Fixes:
> http://autobuild.buildroot.net/results/c75/c756f82dfc49611fa3f650d9cf2a71b59d23c3d0/
> 
> Signed-off-by: Romain Naour <romain.naour@openwide.fr>
> ---
>  package/ecryptfs-utils/Config.in | 5 +++--
>  package/libnspr/Config.in        | 5 +++--
>  package/libnss/Config.in         | 5 +++--
>  3 files changed, 9 insertions(+), 6 deletions(-)

At
https://git.busybox.net/buildroot/commit/?id=8c6bf50828ee2c027a37ddad0f655ddb1c8b4fd0,
I've committed a different fix, which consists in making libnspr build
properly with musl. This is simpler as we don't have to propagate the
reverse dependency to other packages. Consequently, I've marked your
patch as Rejected in patchwork.

Thanks!

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

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

end of thread, other threads:[~2015-12-24 10:21 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-29 17:42 [Buildroot] [PATCH] package/libnspr: disable for musl toolchains Romain Naour
2015-08-29 18:18 ` Thomas Petazzoni
2015-08-29 18:36   ` Romain Naour
2015-12-24 10:21 ` Thomas Petazzoni

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