From 8996fedefbba7e5dfded9b7389062aba4469deaa Mon Sep 17 00:00:00 2001 From: "Yann E. MORIN" Date: Wed, 1 May 2024 18:34:02 +0200 Subject: [PATCH] package/asterisk: needs libxcrypt with glibc We unconditionally configure asterisk with --with-crypt, so the build currently fails under glibc since it removed crypt in 2.39, and we explicitly remove it from external toolchains as well, whatever the version, causing build failures such as: checking for mandatory modules: OPENSSL BKTR CRYPT ILBC JANSSON LIBEDIT LIBJWT LIBXML2 PJPROJECT SQLITE3 ZLIB... fail configure: *** configure: *** The CRYPT installation appears to be missing or broken. configure: *** Either correct the installation, or run configure configure: *** including --without-crypt. Fixing this could be done in two ways: either make libxcrypt a mandatory dependency under glibc, and continue unconditionally enabling crypt support, or only enable crypt support when libxcrypt is available or this was a non-glibc toolchain. We chose the first option, to keep the existing behaviour (crypt support is always enabled), to be aligned with other packages (libxcrypt is selected under glibc toolchains), and because it is also the simplest. Signed-off-by: Yann E. MORIN --- package/asterisk/Config.in | 1 + package/asterisk/asterisk.mk | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/package/asterisk/Config.in b/package/asterisk/Config.in index ba5a574042..71c741acfd 100644 --- a/package/asterisk/Config.in +++ b/package/asterisk/Config.in @@ -12,6 +12,7 @@ config BR2_PACKAGE_ASTERISK select BR2_PACKAGE_LIBILBC select BR2_PACKAGE_LIBJWT select BR2_PACKAGE_LIBPJSIP + select BR2_PACKAGE_LIBXCRYPT if BR2_TOOLCHAIN_USES_GLIBC select BR2_PACKAGE_LIBXML2 select BR2_PACKAGE_SQLITE select BR2_PACKAGE_UTIL_LINUX diff --git a/package/asterisk/asterisk.mk b/package/asterisk/asterisk.mk index c37aa5ec9d..be27509441 100644 --- a/package/asterisk/asterisk.mk +++ b/package/asterisk/asterisk.mk @@ -238,6 +238,11 @@ else ASTERISK_CONF_OPTS += --without-ssl endif +ifeq ($(BR2_PACKAGE_LIBXCRYPT),y) +# --with-crypt is unconditional, relies on the C library if present +ASTERISK_DEPENDENCIES += libxcrypt +endif + ifeq ($(BR2_PACKAGE_SPEEX)$(BR2_PACKAGE_SPEEXDSP),yy) ASTERISK_DEPENDENCIES += speex ASTERISK_CONF_OPTS += --with-speex --with-speexdsp