From patchwork Wed Dec 13 10:54:56 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Lichtenheld X-Patchwork-Id: 3524 Return-Path: Delivered-To: patchwork@openvpn.net Received: by 2002:a05:7300:8d12:b0:fc:24ac:f0cb with SMTP id i18csp6421505dys; Wed, 13 Dec 2023 02:56:06 -0800 (PST) X-Google-Smtp-Source: AGHT+IFKDYdVj45QXhl32SFV243UxTxtEcc1m7uNDE6PR+lsmdemo73th0Iwg6c8t31kJespbJkb X-Received: by 2002:a05:6a21:3281:b0:18f:cc5f:ffe with SMTP id yt1-20020a056a21328100b0018fcc5f0ffemr16414395pzb.4.1702464966589; Wed, 13 Dec 2023 02:56:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702464966; cv=none; d=google.com; s=arc-20160816; b=yVGCLCTmgLDEuTC5kt4WKKJIoyYfycf/xpiuxJDfEUH+TOY8Tuu0QURn1rDau9Hjl8 iG9XBGxoOZ63PKbDAhTeN4qwEsiwEWX8USiqMc3Xm3P9vV2MAKImJGB3aZgpbwyefCa8 GIbxBdegZMavbse2AOx8hQ6v/DklzJivITrO5ceThuRjNKZzxFwCtPRRQCkfeRuRGArc GDcL5IHvd4b/R6Gwb/jxvGR0cPwzPBDJmRLTIOROcfASGbz0PpqElEyV3I/2fkYwidKz zFGAiFeJ2EAGOMA8Mrv594pVQhB++7wifS4kxMXW2XinfzLKkde19Mh4YHl6YrpmjXqb T0VA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:content-transfer-encoding:list-subscribe:list-help :list-post:list-archive:list-unsubscribe:list-id:precedence:subject :mime-version:references:in-reply-to:message-id:date:to:from :dkim-signature:dkim-signature:dkim-signature; bh=Ifbpquf2fPJ9vQr0AR7P3U4nL9uOGx4JNYbIq/SkizU=; fh=4NbAC/LsuMLI0S0hprUlLSLCiHwg6SCAifhH718Jh0Q=; b=a6Tm2RdRBtoRhmNT+6EKchVUBhK1Mp/ZAZQyCadgBGFqJb7eSDhQny3YzofMfjqw20 +eN+VeFLK4QWzH+MaQTy0fbPRa0rXM4LxhGrER8KxoFgALDxpF/+4RFLrJy2Hmph2OUF wB+w9lwsng/ikBIB74K+0Wx/akNa+7mYx6126QQLrRbxr08C4xYmOLI6Tjhn0CTBGICZ URZr9C1tk0Xyf4EaGDd1gyZwouwPr8zfnLTnqHzF7WNS5UN7rfKACocOK8+hbI7vrQqc dC2HPkFYpTOltyRh6A9HSnUQHOoOoxY0KtiZ5Fpj7Y2mIBhHJR33HfWzJ6d5ESn3Yjcm g1UQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b="GkdmeN/8"; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=Ld7U6v2u; dkim=neutral (body hash did not verify) header.i=@lichtenheld.com header.s=MBO0001 header.b=GEaiQPyq; spf=pass (google.com: domain of openvpn-devel-bounces@lists.sourceforge.net designates 216.105.38.7 as permitted sender) smtp.mailfrom=openvpn-devel-bounces@lists.sourceforge.net Received: from lists.sourceforge.net (lists.sourceforge.net. [216.105.38.7]) by mx.google.com with ESMTPS id a7-20020a631a47000000b005c6707eedb1si9143787pgm.679.2023.12.13.02.56.06 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 13 Dec 2023 02:56:06 -0800 (PST) Received-SPF: pass (google.com: domain of openvpn-devel-bounces@lists.sourceforge.net designates 216.105.38.7 as permitted sender) client-ip=216.105.38.7; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b="GkdmeN/8"; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=Ld7U6v2u; dkim=neutral (body hash did not verify) header.i=@lichtenheld.com header.s=MBO0001 header.b=GEaiQPyq; spf=pass (google.com: domain of openvpn-devel-bounces@lists.sourceforge.net designates 216.105.38.7 as permitted sender) smtp.mailfrom=openvpn-devel-bounces@lists.sourceforge.net Received: from [127.0.0.1] (helo=sfs-ml-1.v29.lw.sourceforge.com) by sfs-ml-1.v29.lw.sourceforge.com with esmtp (Exim 4.95) (envelope-from ) id 1rDMtV-000221-7m; Wed, 13 Dec 2023 10:55:13 +0000 Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-1.v29.lw.sourceforge.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1rDMtU-00021u-SV for openvpn-devel@lists.sourceforge.net; Wed, 13 Dec 2023 10:55:13 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=Content-Transfer-Encoding:MIME-Version:References: In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=LBJbvua72ctV+SlEdrLVapA5b48KCossnEDKj3v8tns=; b=GkdmeN/8xCtTUlK1sM/RdtGiwU N6AydLZYY7PZoMu8oIvV7SnMiTsd1YvuQVIW17kv8DbzCTerrkRNqPot8yegsw3nRr+vGtDXgxf2g WyKcKNwmZRx4vA7e01Vcxajw1UuEmlFO09Kvtn9J+flDbzcCLAfed4fr89jXWs62IpFo=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Content-Transfer-Encoding:MIME-Version:References:In-Reply-To:Message-Id: Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=LBJbvua72ctV+SlEdrLVapA5b48KCossnEDKj3v8tns=; b=Ld7U6v2uyYoUMDu43A0vbVUC9s A30Qskgw/cEBqfGLKLjsNrBZIUL56i3csYDj5EWoPwUdtaoD1jlnfFP2kqT/cOWfKG0w3juS/Va94 PqPnLxVTH4ozHxijN05MnC+qjlGkdkvSD0aDY/X6YgI19c/xfvvpLKLGTzCdBELR9IvA=; Received: from mout-p-101.mailbox.org ([80.241.56.151]) by sfi-mx-2.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.95) id 1rDMtU-00054f-DL for openvpn-devel@lists.sourceforge.net; Wed, 13 Dec 2023 10:55:13 +0000 Received: from smtp1.mailbox.org (smtp1.mailbox.org [IPv6:2001:67c:2050:b231:465::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-101.mailbox.org (Postfix) with ESMTPS id 4SqsnY2mM4z9t3p; Wed, 13 Dec 2023 11:54:57 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lichtenheld.com; s=MBO0001; t=1702464897; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=LBJbvua72ctV+SlEdrLVapA5b48KCossnEDKj3v8tns=; b=GEaiQPyqxDky4ahqFTr2BONWWv9VRYCm5Fs/d0m1bQyCx2b05x/NYSBA4bNee+svGu+5IN ooCxQbPBEGyBGQDP3xBwZuE63lrJJXFp6ZY6e5mXTRmYO45i2unN047D7AMQ2N0EDbc8xa y3P/EzMf61vh3qsh5wdq51ULHug23KCUXqAIdaJhyuRo4sEuZyWltmM7/0/1uZm/LzhYwn 9p1W2ncHt8Mrk497Fux3Sa+gOm4TLa5NLUEbihWDIGc5gNFutKlq/bnaBCYBl0dRGZt2Ct tQAd2NF7a+3+RJ0K7sjE3AB+kU3ZONHblJH7AyQ+W4EBm5udEngb/sKhDAM2uQ== From: Frank Lichtenheld To: openvpn-devel@lists.sourceforge.net Date: Wed, 13 Dec 2023 11:54:56 +0100 Message-Id: <20231213105456.121609-1-frank@lichtenheld.com> In-Reply-To: References: MIME-Version: 1.0 X-Rspamd-Queue-Id: 4SqsnY2mM4z9t3p X-Spam-Score: -0.9 (/) X-Spam-Report: Spam detection software, running on the system "util-spamd-1.v13.lw.sourceforge.com", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: From: Arne Schwabe Users seem to struggle to read the full error message. This adds an indication if pkg-config is actually found to the warning/error message that use pkg-config. When found: Content analysis details: (-0.9 points, 6.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [80.241.56.151 listed in list.dnswl.org] -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.0 T_SCC_BODY_TEXT_LINE No description available. X-Headers-End: 1rDMtU-00054f-DL Subject: [Openvpn-devel] [PATCH v2] Make it more explicit and visible when pkg-config is not found X-BeenThere: openvpn-devel@lists.sourceforge.net X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: openvpn-devel-bounces@lists.sourceforge.net X-getmail-retrieved-from-mailbox: Inbox X-GMAIL-THRID: =?utf-8?q?1785163904632683307?= X-GMAIL-MSGID: =?utf-8?q?1785163904632683307?= From: Arne Schwabe Users seem to struggle to read the full error message. This adds an indication if pkg-config is actually found to the warning/error message that use pkg-config. When found: configure: error: libnl-genl-3.0 package not found or too old. Is the development package and pkg-config (using /usr/bin/pkg-config) installed? Must be version 3.4.0 or newer for DCO not found: configure: error: libnl-genl-3.0 package not found or too old. Is the development package and pkg-config (not found) installed? Must be version 3.4.0 or newer for DCO Change-Id: Iebaa35a23e217a4cd7739af229cbfc08a3d8854a Signed-off-by: Arne Schwabe Acked-by: Frank Lichtenheld --- This change was reviewed on Gerrit and approved by at least one developer. I request to merge it to master. Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/465 This mail reflects revision 2 of this Change. Acked-by according to Gerrit (reflected above): Frank Lichtenheld diff --git a/configure.ac b/configure.ac index 54f79ab..a80de7f 100644 --- a/configure.ac +++ b/configure.ac @@ -382,6 +382,14 @@ AM_CONDITIONAL([CROSS_COMPILING], test "${cross_compiling}" = "yes") PKG_PROG_PKG_CONFIG +# Add variable to print if pkg-config is found or not. Users often miss that +if test "${PKG_CONFIG}" = ""; then + pkg_config_found="(not found)" +else + pkg_config_found="(using ${PKG_CONFIG})" +fi + + AC_PROG_CPP AC_PROG_INSTALL AC_PROG_LN_S @@ -816,7 +824,7 @@ [libnl-genl-3.0 >= 3.4.0], [have_libnl="yes"], [ - AC_MSG_ERROR([libnl-genl-3.0 package not found or too old. Is the development package and pkg-config installed? Must be version 3.4.0 or newer for DCO]) + AC_MSG_ERROR([libnl-genl-3.0 package not found or too old. Is the development package and pkg-config ${pkg_config_found} installed? Must be version 3.4.0 or newer for DCO]) ] ) CFLAGS="${CFLAGS} ${LIBNL_GENL_CFLAGS}" @@ -860,10 +868,11 @@ dnl case "$host" in *-*-linux*) + # We require pkg-config PKG_CHECK_MODULES([LIBCAPNG], [libcap-ng], [], - [AC_MSG_ERROR([libcap-ng package not found. Is the development package and pkg-config installed?])] + [AC_MSG_ERROR([libcap-ng package not found. Is the development package and pkg-config ${pkg_config_found} installed?])] ) AC_CHECK_HEADER([sys/prctl.h],,[AC_MSG_ERROR([sys/prctl.h not found!])]) @@ -884,7 +893,7 @@ [OPENSSL], [openssl >= 1.0.2], [have_openssl="yes"], - [] # If this fails, we will do another test next + [AC_MSG_WARN([OpenSSL not found by pkg-config ${pkg_config_found}])] # If this fails, we will do another test next ) OPENSSL_LIBS=${OPENSSL_LIBS:--lssl -lcrypto} fi @@ -1089,7 +1098,7 @@ [WOLFSSL], [wolfssl], [], - [AC_MSG_ERROR([Could not find wolfSSL.])] + [AC_MSG_ERROR([Could not find wolfSSL using pkg-config ${pkg_config_found}])] ) PKG_CHECK_VAR( [WOLFSSL_INCLUDEDIR], @@ -1513,7 +1522,7 @@ PKG_CHECK_MODULES( [CMOCKA], [cmocka], [have_cmocka="yes"], - [AC_MSG_WARN([cmocka.pc not found on the system. Unit tests disabled])] + [AC_MSG_WARN([cmocka.pc not found on the system using pkg-config ${pkg_config_found}. Unit tests disabled])] ) AM_CONDITIONAL([ENABLE_UNITTESTS], [test "${enable_unit_tests}" = "yes" -a "${have_cmocka}" = "yes" ]) AC_SUBST([ENABLE_UNITTESTS])