From 2fe75ab31d7eb45e3615cd5bad1be6131d314dda Mon Sep 17 00:00:00 2001 From: Marvin Scholz Date: Mon, 15 Jul 2019 12:14:59 +0200 Subject: [PATCH] dependencies/pkgconfig: Log pkg-config exceptions This means that when either cflags or libs lookup fails, this will be logged always in the log, leading to much easier to debug messages like: Called `/usr/local/bin/pkg-config --cflags gnutls` -> 1 pkg-config error with 'gnutls': Could not generate cargs for gnutls: Package nettle was not found in the pkg-config search path. Perhaps you should add the directory containing `nettle.pc' to the PKG_CONFIG_PATH environment variable Package 'nettle', required by 'gnutls', not found Run-time dependency gnutls found: NO (tried pkgconfig) --- mesonbuild/dependencies/base.py | 1 + 1 file changed, 1 insertion(+) diff --git a/mesonbuild/dependencies/base.py b/mesonbuild/dependencies/base.py index 4b2bfee6d..e2ee09284 100644 --- a/mesonbuild/dependencies/base.py +++ b/mesonbuild/dependencies/base.py @@ -657,6 +657,7 @@ class PkgConfigDependency(ExternalDependency): # Fetch the libraries and library paths needed for using this self._set_libs() except DependencyException as e: + mlog.debug("pkg-config error with '%s': %s" % (name, e)) if self.required: raise else: