CLucene erroneously references "/usr/include/CLucene/ext"
Description:
cmake
throws an error as a result of CLucene including a non-existent path. The non-existent path is present in /src/core/libclucene-core.pc.cmake
line #4:
includedir=${prefix}/include:${prefix}/include/CLucene/ext
The error thrown by cmake is as follows:
CMake Error in CMakeLists.txt:
Imported target "PkgConfig::CLucene" includes non-existent path
"/usr/include/CLucene/ext"
in its INTERFACE_INCLUDE_DIRECTORIES. Possible reasons include:
* The path was deleted, renamed, or moved to another location.
* An install or uninstall procedure did not complete successfully.
* The installation package was faulty and references files it does not
provide.
CMake Error in CMakeLists.txt:
Imported target "PkgConfig::CLucene" includes non-existent path
"/usr/include/CLucene/ext"
in its INTERFACE_INCLUDE_DIRECTORIES. Possible reasons include:
* The path was deleted, renamed, or moved to another location.
* An install or uninstall procedure did not complete successfully.
* The installation package was faulty and references files it does not
provide.
-- Generating done (0.1s)
CMake Generate step failed. Build files cannot be regenerated correctly.
I have confirmed this is the issue by rebuilding CLucene omitting the erroneous include path, resulting in a successful build without the error. To do this I modified the existing clucene-core-2.3.3.4-pkgconfig.patch
so line #11 drops the reference to -I${prefix}/include/CLucene/ext
:
+Cflags: -I${prefix}/include -I@LUCENE_SYS_INCLUDES@
Additional info:
- package version(s): clucene 2.3.3.4-15
- link to upstream bug report, if any: The same issue was detailed and patched under Gentoo here: https://bugs.gentoo.org/show_bug.cgi?id=950316 https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cad74f9d9c05da27156aee3a733eb74fd8cfbe2d
Steps to reproduce:
- Attempt to build a package requiring CLucene, such as bibletime-git.
- Build will fail with
CMake Error in CMakeLists.txt
. - Rebuild and install clucene omitting the issue include path.
- Now retry building bibletime-git (should work).
Edited by David Armstrong