-
Notifications
You must be signed in to change notification settings - Fork 7.5k
[Qt] The _debug suffix added to .pc files renders them undetectable by pkg-config #14225
Description
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:
- ./vcpkg install gpgme[qt]
- 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.