[Buildroot] [PATCH 1/1] package/libnetconf2: add libxcrypt optional dependency

Fabrice Fontaine fontaine.fabrice at gmail.com
Mon Apr 8 19:29:53 UTC 2024


Fix the following build failure raised since bump of glibc to version
2.39 in commit b5680f53d60acf8ff6010082f873438a39bd5d97:

/home/buildroot/instance-0/output-1/host/opt/ext-toolchain/bin/../lib/gcc/sparc64-buildroot-linux-gnu/12.3.0/../../../../sparc64-buildroot-linux-gnu/bin/ld: cannot find -lcrypt: No such file or directory

Fixes: b5680f53d60acf8ff6010082f873438a39bd5d97
 - http://autobuild.buildroot.org/results/c84e27815cc607ad78a1901cb2be591df2686ac7

Signed-off-by: Fabrice Fontaine <fontaine.fabrice at gmail.com>
---
 package/libnetconf2/Config.in      | 1 +
 package/libnetconf2/libnetconf2.mk | 4 ++++
 2 files changed, 5 insertions(+)

diff --git a/package/libnetconf2/Config.in b/package/libnetconf2/Config.in
index 7865f9e487..34934325fa 100644
--- a/package/libnetconf2/Config.in
+++ b/package/libnetconf2/Config.in
@@ -4,6 +4,7 @@ config BR2_PACKAGE_LIBNETCONF2
 	depends on BR2_TOOLCHAIN_HAS_THREADS
 	depends on !BR2_STATIC_LIBS
 	depends on BR2_USE_MMU
+	select BR2_PACKAGE_LIBXCRYPT if BR2_TOOLCHAIN_USES_GLIBC
 	select BR2_PACKAGE_LIBYANG
 	help
 	  libnetconf2 is a NETCONF library in C intended for building
diff --git a/package/libnetconf2/libnetconf2.mk b/package/libnetconf2/libnetconf2.mk
index e349c1bce4..88163926c0 100644
--- a/package/libnetconf2/libnetconf2.mk
+++ b/package/libnetconf2/libnetconf2.mk
@@ -30,6 +30,10 @@ else
 LIBNETCONF2_CONF_OPTS += -DENABLE_TLS=OFF
 endif
 
+ifeq ($(BR2_PACKAGE_LIBXCRYPT),y)
+LIBNETCONF2_DEPENDENCIES += libxcrypt
+endif
+
 HOST_LIBNETCONF2_CONF_OPTS = \
 	-DENABLE_TESTS=OFF \
 	-DENABLE_VALGRIND_TESTS=OFF \
-- 
2.43.0




More information about the buildroot mailing list