Hello, On Mon, 3 Dec 2018 12:54:45 +0100 Paolo Greppi wrote:
> Hi, in preparation for this switch I am building doxygen from source with: > > sudo apt install llvm-7-dev # for /usr/lib/llvm-7/lib/cmake/llvm/LLVMConfig.cmake > sudo apt install clang-7 # for /usr/lib/llvm-7/lib/cmake/clang/ClangConfig.cmake > git clone https://github.com/doxygen/doxygen > cd doxygen > mkdir build > cd build > LLVM_DIR=/usr/lib/llvm-7/lib/cmake/llvm/ Clang_DIR=/usr/lib/llvm-7/lib/cmake/clang/ cmake -Duse_libclang=ON -G "Unix Makefiles" .. > make > > It builds, but the resulting binary fails to start with: > ./bin/doxygen > : CommandLine Error: Option 'help-list' registered more than once! > LLVM ERROR: inconsistency in registered CommandLine options I have been able to build the package successfully without this problem by patching the source with the attached llvm-7 patch. That was with release version 1.8.15. I also needed an updated watch file and an updated no-rpath patch. I hope to see a new version of doxymacs built against llvm 7 in Debian soon. Regards Jiri Palecek
Index: doxygen-1.8.15/src/CMakeLists.txt =================================================================== --- doxygen-1.8.15.orig/src/CMakeLists.txt +++ doxygen-1.8.15/src/CMakeLists.txt @@ -279,4 +279,6 @@ target_link_libraries(doxygen ${CLANG_LIBS} ) +set_target_properties(doxygen PROPERTIES SKIP_BUILD_RPATH TRUE) + install(TARGETS doxygen DESTINATION bin)
Index: doxygen-1.8.15/src/CMakeLists.txt =================================================================== --- doxygen-1.8.15.orig/src/CMakeLists.txt +++ doxygen-1.8.15/src/CMakeLists.txt @@ -261,12 +261,13 @@ if (use_libclang) endif() include_directories(${LLVM_INCLUDE_DIRS}) add_definitions(${LLVM_DEFINITIONS}) - llvm_map_components_to_libnames(llvm_libs support core option) + llvm_config(doxygen USE_SHARED support core option) target_compile_definitions(doxygen PRIVATE ${LLVM_DEFINITIONS}) - set(CLANG_LIBS libclang clangTooling ${llvm_libs}) + set(CLANG_LIBS libclang clangTooling) endif() target_link_libraries(doxygen + PRIVATE _doxygen doxycfg qtools