Upstream xapian-core uses lowercase xapian module.
envgap__doxygen__doxygen-8038
01 / FAILURE SIGNATURE
As reported upstream
multimatch.cc:(.text+0x1212): undefined reference to `timer_delete'
Not a benchmark task.
- In a clean container the reported failure did not reproduce, or the known fix did not make the project run.
02 / ENVIRONMENT RECIPE
- Base commit
c1901d07755826803e92618e60d8af9720dbb1e7- Manifest
addon/doxysearch/CMakeLists.txt- Reproduce
Awaiting issue-specific recipe- Run under trace
Awaiting a meaningful runtime command
03 / ORIGINAL ISSUE TEXT
doxygen/doxygen #8038 · read the original issue
**Describe the bug**
I've created a conan package for doxygen at conan-io/conan-center-index#2912.
(conan is a C/C++ package manager)
Conan provides packages for all dependencies.
It will also generate FindXXX cmake scripts for all dependencies, using the *official* names of upstream.
[xapian](https://xapian.org/download) ([download link](https://oligarchy.co.uk/xapian/1.4.17/xapian-core-1.4.17.tar.xz)) provides a `xapian-config.cmake` script.
This is downcase, while the FindXapian.cmake script in doxygen is capitalized.
By renaming `FindXapian.cmake` to `Findxapian.cmake` (=all lowercase), it is possible to override the module by the official one or the one created by conan (conan is able to generate FindXXX.cmake scripts).
This change is required to build doxygen with a static xapian library on all platforms.
A static xapian library requires extra system libraries, which the FindXapian.cmake script of doxygen does not provide (or detect).
Thanks!
**Expected behavior**
Configure + build succeeds
**To Reproduce**
Try to build doxygen and link to a static built xapian (used by doxysearch) on Linux.
```sh
# Run from the root of the doxygen source tree
python -m pip install --user conan
mkdir -p build_conan
cd build_conan
cat >conanfile.txt <<EOF
[requires]
xapian-core/1.4.16
[generators]
cmake
cmake_find_package
EOF
cat >CMakeLists.txt <<EOF
cmake_minimum_required(VERSION 3.1)
project(wrapper)
include("\${CMAKE_BINARY_DIR}/conanbuildinfo.cmake")
conan_basic_setup()
add_subdirectory(.. doxygen)
EOF
mkdir -p build
cd build
conan install ..
echo "set(XAPIAN_LIBRARIES \${xapian_LIBRARIES})" >>Findxapian.cmake # Work around conan bug (it does not generate correct casings for variables)
cmake .. -Dbuild_search=ON -DCMAKE_MODULE_PATH=$PWD
cmake --build .
```
On current master, the following error occurs: (#8039 fixes this)
```
[ 99%] Linking CXX executable ../../../bin/doxysearch.cgi
/usr/bin/ld: /home/maarten/.conan/data/xapian-core/1.4.16/_/_/package/9a06a2acab1c746f80556aedd78e420138cb59ae/lib/libxapian.a(multimatch.o): in function `MultiMatch::get_mset(unsigned int, unsigned int, unsigned int, Xapian::MSet&, Xapian::Weight::Internal&, Xapian::MatchDecider const*, Xapian::KeyMaker const*)':
multimatch.cc:(.text+0x1212): undefined reference to `timer_delete'
/usr/bin/ld: multimatch.cc:(.text+0x136c): undefined reference to `timer_create'
/usr/bin/ld: multimatch.cc:(.text+0x13de): undefined reference to `timer_settime'
/usr/bin/ld: multimatch.cc:(.text+0x13f3): undefined reference to `timer_delete'
/usr/bin/ld: /home/maarten/.conan/data/xapian-core/1.4.16/_/_/package/9a06a2acab1c746f80556aedd78e420138cb59ae/lib/libxapian.a(multimatch.o): in function `MultiMatch::get_mset(unsigned int, unsigned int, unsigned int, Xapian::MSet&, Xapian::Weight::Internal&, Xapian::MatchDecider const*, Xapian::KeyMaker const*) [clone .cold]':
multimatch.cc:(.text.unlikely+0x403): undefined reference to `timer_delete'
/usr/bin/ld: /home/maarten/.conan/data/xapian-core/1.4.16/_/_/package/9a06a2acab1c746f80556aedd78e420138cb59ae/lib/libxapian.a(uuids.o): in function `Uuid::generate()':
uuids.cc:(.text+0x20): undefined reference to `uuid_generate'
collect2: error: ld returned 1 exit status
gmake[2]: *** [doxygen/addon/doxysearch/CMakeFiles/doxysearch.cgi.dir/build.make:106: bin/doxysearch.cgi] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:661: doxygen/addon/doxysearch/CMakeFiles/doxysearch.cgi.dir/all] Error 2
gmake: *** [Makefile:172: all] Error 2
```
**Version**
Current master 0fc06d657d596adcc289a5f228973ea268efd66d
**Additional context**
Used (and tested) in https://github.com/conan-io/conan-center-index/pull/291204 / LABELS
Labels from the report text only; not yet run
No supported category has been assigned.
Label rules and the text that matched
[]