Skip to content

[Qt] The _debug suffix added to .pc files renders them undetectable by pkg-config #14225

@wrobelda

Description

@wrobelda

Describe the bug

I have filed a MR for GpgMe libraries (#13950), which work fine except if built with additional Qt feature.

The build fails at Configuring x64-osx-dbg with:

checking for GPGME_QT... no

, which corresponds to these lines in configure script:

PKG_CONFIG --exists --print-errors \"Qt5Core >= 5.0.0\"

, and to these lines in config.log:

configure:19242: checking for GPGME_QT
configure:19250: $PKG_CONFIG --exists --print-errors "Qt5Core >= 5.0.0"
Package Qt5Core was not found in the pkg-config search path.
Perhaps you should add the directory containing `Qt5Core.pc'
to the PKG_CONFIG_PATH environment variable
No package 'Qt5Core' found
configure:19253: $? = 1

The PKG_CONFIG variable is defined by vcpkg_configure_make as following at the runtime:

set(ENV{PKG_CONFIG} "${PKGCONFIG} --define-variable=prefix=${_VCPKG_INSTALLED}${PATH_SUFFIX_${_buildtype}}")

, which for x64-osx-dbg buildtype resolves to:

PKG_CONFIG_PATH=/vcpkg_installed/x64-osx/debug/lib/pkgconfig:/vcpkg_installed/x64-osx/share/pkgconfig

Now, the /vcpkg_installed/x64-osx/debug/lib/pkgconfig has all of Qt pkgconfig files needed, except all of them have a _debug suffix added, e.g. Qt5Core_debug.pc, which explains why pkgconfig cannot find them. For the record, according to the pkgconfig spec, the filenames must correspond to the module name, so in this case Qt5Core_debug != Qt5Core.

Environment

  • OS: macOS

To Reproduce
Steps to reproduce the behavior:

  1. ./vcpkg install gpgme[qt]
  2. See error

Expected behavior
.pc files in /vcpkg_installed/*/debug/lib/pkgconfig should not have their names changed in order for pkgconfig to correctly detect them when executed by ports depending on Qt.

Metadata

Metadata

Assignees

Labels

category:port-featureThe issue is with a library, which is requesting new capabilities that didn’t exist

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions