With recent ROOT, doing CMake failed when LLVM_ENABLE_SPHINX is enabled, as the following.

$ cmake -DLLVM_ENABLE_SPHINX=ON ../root.git/
-- Detected ROOT_VERSION 6.29.01
-- Checking internet connectivity
-- Checking internet connectivity - found
-- Looking for Python
-- Found Python3: /usr/bin/python3.11 (found version "3.11.4") found components: Interpreter Development NumPy Development.Module Development.Embed 
-- Could NOT find Python2 (missing: Python2_EXECUTABLE Python2_INCLUDE_DIRS Python2_LIBRARIES Python2_NumPy_INCLUDE_DIRS Interpreter Development NumPy Development.Module Development.Embed) 
    Reason given by package: 
        Interpreter: Wrong major version for the interpreter "/bin/python"

-- Found GCC. Major version 13, minor version 2
-- ROOT Platform: linux
-- ROOT Compiler: GNU 13.2.1
-- ROOT Processor: x86_64
-- ROOT Architecture: linuxx8664gcc
-- Build Type: 'Release' (flags = '-O3 -DNDEBUG')
-- Compiler Flags:  -std=c++17 -Wno-implicit-fallthrough -Wno-noexcept-type -pipe  -Wshadow -Wall -W -Woverloaded-virtual -fsigned-char -pthread -O3 -DNDEBUG
-- ROOT default compression algorithm: zlib
-- Cannot select cudnn without selecting cuda or tmva-gpu. Option is ignored
-- PyROOT will be built for version 3.11.4
-- Looking for ZLib
-- Looking for nlohmann/json.hpp
-- Found nlohmann/json.hpp in /usr/include;/usr/include (found version 3.11.2)
-- Looking for Freetype
-- Looking for PCRE
-- Looking for LZMA
-- Looking for ZSTD
-- Looking for LZ4
-- Looking for X11
-- Building AfterImage library included in ROOT itself
-- Looking for GSL
-- Looking for OpenGL
-- Looking for GLEW
-- Looking for LibXml2
-- Looking for MySQL
-- Looking for PostgreSQL
-- Looking for SQLite
-- Downloading and building XROOTD version 5.5.2
-- Looking for TBB
-- Looking for BLAS for optional parts of TMVA
-- Building LLVM in 'Release' mode.
-- clang project is enabled
-- clang-tools-extra project is disabled
-- compiler-rt project is disabled
-- cross-project-tests project is disabled
-- libc project is disabled
-- libclc project is disabled
-- libcxx project is disabled
-- libcxxabi project is disabled
-- libunwind project is disabled
-- lld project is disabled
-- lldb project is disabled
-- mlir project is disabled
-- openmp project is disabled
-- parallel-libs project is disabled
-- polly project is disabled
-- pstl project is disabled
-- flang project is disabled
-- Native target architecture is X86
-- Threads disabled.
-- Doxygen disabled.
-- Go bindings disabled.
-- OCaml bindings disabled.
-- LLVM host triple: x86_64-unknown-linux-gnu
-- LLVM default target triple: x86_64-unknown-linux-gnu
-- Building with -fPIC
-- Found Python3: /usr/bin/python3.11 (found suitable version "3.11.4", minimum required is "3.0") found components: Interpreter 
-- Targeting X86
-- Targeting NVPTX
-- Clang version: 13.0.0
-- Not building amdgpu-arch: hsa-runtime64 not found
-- Sphinx enabled.
-- Sphinx enabled.
-- Building Cling as part of ROOT
-- Cling version (from VERSION file): ROOT_1.0~dev
-- Cling will look for C++ headers in '/usr/lib/gcc/x86_64-redhat-linux/13/../../../../include/c++/13:/usr/lib/gcc/x86_64-redhat-linux/13/../../../../include/c++/13/x86_64-redhat-linux:/usr/lib/gcc/x86_64-redhat-linux/13/../../../../include/c++/13/backward' at runtime.
-- And then fallback to: 'c++'
CMake Error at interpreter/cling/docs/CMakeLists.txt:60 (include):
  include could not find requested file:


-- Use SSL API VERSION 3.0 for civetweb
-- Distributed RDataFrame enabled
-- Looking for RapidYAML (used by RooFit)
-- Could NOT find ryml (missing: RYML_LIBRARY RYML_INCLUDE_DIR) 
-- RapidYAML not found, only compiling RooFit with nlohmann-json parser
-- Performing Test found_stdstringview
-- Performing Test found_stdstringview - Success
-- Performing Test found_stod_stringview
-- Performing Test found_stod_stringview - Failed
-- Performing Test found_stdapply
-- Performing Test found_stdapply - Success
-- Performing Test found_stdinvoke
-- Performing Test found_stdinvoke - Success
-- Performing Test found_stdindexsequence
-- Performing Test found_stdindexsequence - Success
-- ROOT Configuration 

System          Linux-6.4.12-200.fc38.x86_64
Processor       8 core AMD Ryzen 7 5700G with Radeon Graphics (x86_64)
Build type      Release
Install path    /usr/local
Compiler        GNU 13.2.1
Compiler flags:
C                -Wno-implicit-fallthrough -pipe -Wall -W -pthread -O3 -DNDEBUG
C++              -std=c++17 -Wno-implicit-fallthrough -Wno-noexcept-type -pipe  -Wshadow -Wall -W -Woverloaded-virtual -fsigned-char -pthread -O3 -DNDEBUG
Linker flags:
Executable       -rdynamic
Shared           -Wl,--no-undefined -Wl,--hash-style="both"

-- Enabled support for:  asimage builtin_afterimage builtin_clang builtin_cling builtin_davix builtin_ftgl builtin_gl2ps builtin_llvm builtin_openui5 builtin_vdt builtin_xrootd builtin_xxhash clad dataframe davix exceptions gdml http imt mathmore mlp minuit2 mysql opengl pgsql pyroot roofit webgui root7 rpath runtime_cxxmodules shared sqlite ssl tmva tmva-cpu tmva-pymva spectrum vdt x11 xml xrootd
-- Configuring incomplete, errors occurred!

Tracing the cmake process, AddSphinxTarget is include()d at least three times,

interpreter/llvm-project/clang/docs/CMakeLists.txt(104):  include(AddSphinxTarget )
interpreter/llvm-project/llvm/docs/CMakeLists.txt(106):  include(AddSphinxTarget )
interpreter/cling/docs/CMakeLists.txt(60):  include(AddSphinxTarget )

but it seems the last one, for cling, is failing…

I couldn’t resolve the issue by myself and so just report…


Please read tips for efficient and successful posting and posting code

Please fill also the fields below. Note that root -b -q will tell you this info, and starting from 6.28/06 upwards, you can call .forum bug from the ROOT prompt to pre-populate a topic.

ROOT Version: 350d41b262, 6.28/06
Platform: Fedora release 38 (Thirty Eight)
Compiler: (cmake version 3.27.4)

Dear @furutaka ,

Thanks for your report. In general, I think there are some LLVM options that are not expected to work in a ROOT build. Just to understand better, have you always been using LLVM_ENABLE_SPHINX in your ROOT builds in the past and it has only recently started not working anymore? Or is this the first time you try to build with this option enabled?

I have invited @hahnjo to further comment on this topic.


Dear Vincenzo,

I usually build with the option ON (looking back at this post, at least for more than three years :slight_smile: ).

This time, hearing the announcement of the 6.28/06 and trying to build it, I found neither 6.28/06 nor the recent master cannot be configured with the option… (CMaking 6.28/04 with the option posed no problem!)


And also, I could build master branch of ROOT with the option on 27th of this July.


Hi @furutaka, thanks for the report. This was indeed a problem of a recent modification to improve the situation for building with external LLVM (as distributions do), which unfortunately caused Cling to not find one CMake module anymore and was also backported to 6.28/06. I opened CMake fails with `LLVM_ENABLE_SPHINX=ON` · Issue #13597 · root-project/root · GitHub with a boiled down description of the problem, and fixed it in [interpreter] Add builtin_llvm's CMake modules by hahnjo · Pull Request #13598 · root-project/root · GitHub (for master) and [interpreter] Add builtin_llvm's CMake modules [v6.28] by hahnjo · Pull Request #13599 · root-project/root · GitHub (for v6-28-00-patches). The fix will appear in the next version 6.28/08 (no timeline yet), or you can just apply the one line from the second PR to 6.28/06.



This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.