From 902c79608c7936c4f357e16f03aa620da8218ec7 Mon Sep 17 00:00:00 2001 From: Yorgos Thessalonikefs Date: Wed, 19 Jun 2024 15:27:50 +0200 Subject: [PATCH] - Fix #1092: Ubuntu 22.04 Jammy fails to compile unbound 1.20.0; by adding helpful text for the Python interpreter version and allowing the default pkg-config unavailability error message to be shown. - autoconf. --- acx_python.m4 | 2 +- configure | 52 ++++++++++++++++++++++++++++++++++++++++++++++----- doc/Changelog | 5 +++++ systemd.m4 | 6 ++++-- 4 files changed, 57 insertions(+), 8 deletions(-) diff --git a/acx_python.m4 b/acx_python.m4 index c945d6c89..4ed298cf9 100644 --- a/acx_python.m4 +++ b/acx_python.m4 @@ -9,7 +9,7 @@ AC_DEFUN([AC_PYTHON_DEVEL],[ AC_PATH_PROG([PYTHON],[python[$PYTHON_VERSION]]) if test -z "$PYTHON"; then - AC_MSG_ERROR([Cannot find python$PYTHON_VERSION in your system path]) + AC_MSG_ERROR([Cannot find 'python$PYTHON_VERSION' in your system path. You can use the environment variable 'PYTHON_VERSION=version_number' for an explicit version.]) PYTHON_VERSION="" fi diff --git a/configure b/configure index d62837be8..195172c16 100755 --- a/configure +++ b/configure @@ -17625,6 +17625,7 @@ if test "x$enable_systemd" != xno then : + have_systemd=no pkg_failed=no { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for SYSTEMD" >&5 @@ -17684,11 +17685,31 @@ fi # Put the nasty error message in config.log where it belongs echo "$SYSTEMD_PKG_ERRORS" >&5 - have_systemd=no + as_fn_error $? "Package requirements (libsystemd) were not met: + +$SYSTEMD_PKG_ERRORS + +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. + +Alternatively, you may set the environment variables SYSTEMD_CFLAGS +and SYSTEMD_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details." "$LINENO" 5 elif test $pkg_failed = untried; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } - have_systemd=no + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +Alternatively, you may set the environment variables SYSTEMD_CFLAGS +and SYSTEMD_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. + +To get pkg-config, see . +See \`config.log' for more details" "$LINENO" 5; } else SYSTEMD_CFLAGS=$pkg_cv_SYSTEMD_CFLAGS SYSTEMD_LIBS=$pkg_cv_SYSTEMD_LIBS @@ -17699,6 +17720,7 @@ fi if test "x$have_systemd" != "xyes" then : + have_systemd_daemon=no pkg_failed=no { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for SYSTEMD_DAEMON" >&5 @@ -17758,11 +17780,31 @@ fi # Put the nasty error message in config.log where it belongs echo "$SYSTEMD_DAEMON_PKG_ERRORS" >&5 - have_systemd_daemon=no + as_fn_error $? "Package requirements (libsystemd-daemon) were not met: + +$SYSTEMD_DAEMON_PKG_ERRORS + +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. + +Alternatively, you may set the environment variables SYSTEMD_DAEMON_CFLAGS +and SYSTEMD_DAEMON_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details." "$LINENO" 5 elif test $pkg_failed = untried; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } - have_systemd_daemon=no + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +Alternatively, you may set the environment variables SYSTEMD_DAEMON_CFLAGS +and SYSTEMD_DAEMON_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. + +To get pkg-config, see . +See \`config.log' for more details" "$LINENO" 5; } else SYSTEMD_DAEMON_CFLAGS=$pkg_cv_SYSTEMD_DAEMON_CFLAGS SYSTEMD_DAEMON_LIBS=$pkg_cv_SYSTEMD_DAEMON_LIBS @@ -19185,7 +19227,7 @@ fi if test -z "$PYTHON"; then - as_fn_error $? "Cannot find python$PYTHON_VERSION in your system path" "$LINENO" 5 + as_fn_error $? "Cannot find 'python$PYTHON_VERSION' in your system path. You can use the environment variable 'PYTHON_VERSION=version_number' for an explicit version." "$LINENO" 5 PYTHON_VERSION="" fi diff --git a/doc/Changelog b/doc/Changelog index b3092e0b1..60fdf5bc5 100644 --- a/doc/Changelog +++ b/doc/Changelog @@ -1,3 +1,8 @@ +19 June 2024: Yorgos + - Fix #1092: Ubuntu 22.04 Jammy fails to compile unbound 1.20.0; by + adding helpful text for the Python interpreter version and allowing + the default pkg-config unavailability error message to be shown. + 17 June 2024: Wouter - Fix #1091: Build fails with OpenSSL >= 3.0 built with OPENSSL_NO_DEPRECATED. diff --git a/systemd.m4 b/systemd.m4 index e5d4e27f6..f93fe0659 100644 --- a/systemd.m4 +++ b/systemd.m4 @@ -8,11 +8,13 @@ have_systemd=no AS_IF([test "x$enable_systemd" != xno], [ ifdef([PKG_CHECK_MODULES], [ dnl systemd v209 or newer - PKG_CHECK_MODULES([SYSTEMD], [libsystemd], [have_systemd=yes], [have_systemd=no]) + have_systemd=no + PKG_CHECK_MODULES([SYSTEMD], [libsystemd], [have_systemd=yes], []) dnl old systemd library AS_IF([test "x$have_systemd" != "xyes"], [ + have_systemd_daemon=no PKG_CHECK_MODULES([SYSTEMD_DAEMON], [libsystemd-daemon], - [have_systemd_daemon=yes], [have_systemd_daemon=no]) + [have_systemd_daemon=yes], []) AS_IF([test "x$have_systemd_daemon" = "xyes"], [have_systemd=yes]) ])