Package: libpoco-dev Severity: important X-Debbugs-Cc: jay...@gmail.com Dear Maintainer,
I am attempting to use libpoco-dev cmake files on bullseye, but the problem encountered dates back to the addition of the cmake files to the libpoco-dev package as part of https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=880614 The CMakeLists.txt snippet which should work is: find_package(Poco COMPONENTS Foundation REQUIRED) However that looks for "Poco" cmake files and fails. This first problem is raised upstream as https://github.com/pocoproject/poco/issues/3244 I can workaround this by doing # ln -s /usr/lib/x86_64-linux-gnu/cmake/cmake/Poco/ /usr/lib/cmake/ Then we encounter the following error: CMake Error at /usr/share/cmake-3.18/Modules/CMakeFindDependencyMacro.cmake:47 (find_package): By not providing "FindPCRE.cmake" in CMAKE_MODULE_PATH this project has asked CMake to find a package configuration file provided by "PCRE", but CMake did not find one. Could not find a package configuration file provided by "PCRE" with any of the following names: PCREConfig.cmake pcre-config.cmake Add the installation prefix of "PCRE" to CMAKE_PREFIX_PATH or set "PCRE_DIR" to a directory containing one of the above files. If "PCRE" provides a separate development package or SDK, be sure it has been installed. Call Stack (most recent call first): /usr/lib/x86_64-linux-gnu/cmake/cmake/Poco/PocoFoundationConfig.cmake:5 (find_dependency) /usr/lib/x86_64-linux-gnu/cmake/cmake/Poco/PocoConfig.cmake:29 (find_package) CMakeLists.txt:48 (find_package) This is because libpcre2-dev and libpcre3-dev dont include any of those mentioned files (FindPCRE.cmake, PCREConfig.cmake, or pcre-config.cmake). Note pcre2 does has a pcre2-config.cmake.in file which presumably is used to generate a pcre2-config.cmake . https://sources.debian.org/src/pcre2/10.39-3/cmake/ This wont suffice, as it doesnt provide cmake library `Pcre::Pcre` which is needed by Poco. However I can workaround this by adding the followinfg to /usr/lib/cmake/Poco/ as set up previously. https://github.com/pocoproject/poco/blob/master/cmake/FindPCRE.cmake Note the contents of that file mention `Pcre::Pcre`. Worth noting vcpkg goes about fixing this a different way, by creating their own unofficial-pcre-config.cmake at https://github.com/ddc7451/vcpkg/tree/5746100fdc746523dd6cb1bac2cd1c0a50e0c253/ports/pcre and then patching poco to look for unofficial::pcre::pcre https://github.com/ddc7451/vcpkg/search?q=unofficial%3A%3Apcre%3A%3Apcre https://github.com/ddc7451/vcpkg/blob/5746100fdc746523dd6cb1bac2cd1c0a50e0c253/ports/poco/include_pcre.patch -- System Information (reportbug hacked to work on macos..): Architecture: darwin-amd64 (x86_64) Kernel: Darwin 21.1.0 Locale: LANG=en_AU.UTF-8, LC_CTYPE=en_AU.UTF-8 (charmap=UTF-8), LANGUAGE not set Init: unable to detect