Browse Source

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)
Marvin Scholz 5 months ago
parent
commit
2fe75ab31d
1 changed files with 1 additions and 0 deletions
  1. 1
    0
      mesonbuild/dependencies/base.py

+ 1
- 0
mesonbuild/dependencies/base.py View File

@@ -657,6 +657,7 @@ class PkgConfigDependency(ExternalDependency):
657 657
             # Fetch the libraries and library paths needed for using this
658 658
             self._set_libs()
659 659
         except DependencyException as e:
660
+            mlog.debug("pkg-config error with '%s': %s" % (name, e))
660 661
             if self.required:
661 662
                 raise
662 663
             else:

Loading…
Cancel
Save