Skip to content

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:

Steps to reproduce:

  1. Attempt to build a package requiring CLucene, such as bibletime-git.
  2. Build will fail with CMake Error in CMakeLists.txt.
  3. Rebuild and install clucene omitting the issue include path.
  4. Now retry building bibletime-git (should work).
Edited by David Armstrong
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information