package/libnspr: disable for musl toolchains
PATCH 1/1 package/libnspr: disable for musl toolchains
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/
--- package/ecryptfs-utils/Config.in | 5 +++-- package/libnspr/Config.in | 5 +++-- package/libnss/Config.in | 5 +++-- 3 files changed, 9 insertions(+), 6 deletions(-)
package/ecryptfs-utils/Config.in +3 -2
@@ -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
package/libnspr/Config.in +3 -2
@@ -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
package/libnss/Config.in +3 -2
@@ -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
Signature · 1 line
2.4.3
PATCH 1/1 package/libnspr: disable for musl toolchains
Dear Romain Naour,
Quoted 10 lines · Romain Naour
libnspr use
getprotobyname_r()which is not available on musl.Also there is another error due to missing
_PR_HAVE_GETHOSTBYNAME2define: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_GETHOSTBYNAME2is only set inpr/include/md/_linux.hif__GLIBC__is defined.
Quoted 7 lines
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 <[email protected]>
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
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
PATCH 1/1 package/libnspr: disable for musl toolchains
Hi Thomas,
Le 29/08/2015 20:18, Thomas Petazzoni a ?crit :
Quoted 19 lines
Dear Romain Naour,
Quoted 16 lines · Romain Naour
libnspr use
getprotobyname_r()which is not available on musl.Also there is another error due to missing
_PR_HAVE_GETHOSTBYNAME2define: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_GETHOSTBYNAME2is only set inpr/include/md/_linux.hif__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/
Quoted 8 lines
Quoted 1 line
Signed-off-by Romain Naour <[email protected]>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
Quoted 5 lines
Thanks,
Thomas
PATCH 1/1 package/libnspr: disable for musl toolchains
In reply to Romain NaourRomain,
Quoted 16 lines · Romain Naour
libnspr use
getprotobyname_r()which is not available on musl.Also there is another error due to missing
_PR_HAVE_GETHOSTBYNAME2define: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_GETHOSTBYNAME2is only set inpr/include/md/_linux.hif__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/
Quoted 6 lines
Signed-off-by Romain Naour <[email protected]>--- 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
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com