There is a code I am forced to use, namely:
https://applgrid.hepforge.org/
which has root as a dependency. I would like to perform the minimal possible Cern-Root build that is able to serve as dependence for that piece of code. It requires essentially to be able to open and write a tree to disk. In particular, I am not interested in building cling or having things like openssl or krberos as a dependency.
I am however unable to configure root using cmake for that purpose.
I am trying to build:
root_v6.11.02
on a linux machine (ubunru 16.04)
mkdir bld
cmake .. -DCMAKE_INSTALL_PREFIX=${PREFIX} \
-Dx11=OFF \
-Dxrootd=OFF \
-Dxml=OFF \
-Dxft=OFF \
-Dtable=OFF \
-Dssl=OFF \
-Dsrp=OFF \
-Dsqlite=OFF \
-Dshadowpw=OFF \
-Dsapdb=OFF \
-Drfio=OFF \
-Droofit=OFF \
-Dqt=OFF \
-Dqtgsi=OFF \
-Dpython=OFF \
-Dpythia8=OFF \
-Dpythia6=OFF \
-Dpgsql=OFF \
-Doracle=OFF \
-Dopengl=OFF \
-Dodbc=OFF \
-Dmysql=OFF \
-Dmonalisa=OFF \
-Dminuit2=OFF \
-Dminimal=ON \
-Dmathmore=OFF \
-Dldap=OFF \
-Dkrb5=OFF \
-Dimt=OFF \
-Dhdfs=OFF \
-Dgviz=OFF \
-Dglite=OFF \
-Dgfal=OFF \
-Dgenvector=OFF \
-Dfitsio=OFF \
-Dfftw3=OFF \
-Dfail-on-missing=ON \
-Ddcache=OFF \
-Dcastor=OFF \
-Dbuiltin_llvm=OFF \
-Dbuiltin_glew=OFF \
-Dbuiltin_ftgl=ON \
-Dbuiltin_freetype=OFF \
-Dbuiltin_afterimage=OFF \
-Dbonjour=OFF \
-Dastiff=OFF \
-Dasimage=OFF \
-Dalien=OFF \
-Dtvma=OFF \
-Dcling=OFF
When I run this, different parts of cmake seem to disagree on whether cling or llvm should be build.
-- The C compiler identification is GNU 5.4.1
-- The CXX compiler identification is GNU 5.4.1
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found GCC. Major version 5, minor version 4
-- Performing Test HAS_CXX11
-- Performing Test HAS_CXX11 - Success
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- Found a 64bit system
-- Found GNU compiler collection
-- Performing Test GLIBCXX_USE_CXX11_ABI
-- Performing Test GLIBCXX_USE_CXX11_ABI - Success
-- ROOT Platform: linux
-- ROOT Architecture: linuxx8664gcc
-- Build Type: RelWithDebInfo
-- Compiler Flags: -pipe -m64 -Wshadow -Wall -W -Woverloaded-virtual -fsigned-char -fPIC -pthread -std=c++11 -O2 -g -DNDEBUG
-- Looking for ZLib
-- Found ZLIB: /home/zah/anaconda3/lib/libz.so (found version "1.2.11")
-- Looking for Unuran
-- Could NOT find UNURAN (missing: UNURAN_LIBRARY UNURAN_INCLUDE_DIR)
-- Unuran not found. Switching on builtin_unuran option
-- Looking for Freetype
-- Found Freetype: /home/zah/anaconda3/lib/libfreetype.so (found version "2.8.0")
-- Looking for PCRE
-- Found PCRE: /home/zah/anaconda3/include
-- Looking for LZMA
-- Found LZMA includes at /home/zah/anaconda3/include
-- Found LZMA library at /home/zah/anaconda3/lib/liblzma.so
-- Looking for LZ4
-- LZ4 not found. Switching on builtin_lz4 option
-- Building LZ4 version v1.7.5 included in ROOT itself
-- Looking for gl2ps
-- Could NOT find GL2PS (missing: GL2PS_LIBRARY)
-- gl2ps not found. Switching on builtin_gl2ps option
-- Enabled support for: builtin_ftgl builtin_gl2ps builtin_lz4 builtin_unuran cxx11 explicitlink thread
-- The ASM compiler identification is GNU
-- Found assembler: /usr/bin/cc
-- Looking for backtrace
-- Looking for backtrace - found
-- backtrace facility detected in default set of libraries
-- Found Backtrace: /usr/include
-- Native target architecture is X86
-- Threads disabled.
-- Doxygen disabled.
-- Go bindings enabled.
-- Could NOT find OCaml (missing: OCAMLFIND OCAML_VERSION OCAML_STDLIB_PATH)
-- Could NOT find OCaml (missing: OCAMLFIND OCAML_VERSION OCAML_STDLIB_PATH)
-- OCaml bindings disabled.
-- LLVM host triple: x86_64-unknown-linux-gnu
-- LLVM default target triple: x86_64-unknown-linux-gnu
-- Building with -fPIC
-- Found PythonInterp: /usr/bin/python2.7 (found version "2.7.12")
-- Constructing LLVMBuild project information
-- Targeting X86
-- Could NOT find Z3 (missing: Z3_LIBRARIES Z3_INCLUDE_DIR) (Required is at least version "4.5")
-- Clang version: 5.0.0
-- Cling version (from VERSION file): ROOT_0.5~dev
-- Cling will look for C++ headers in '/usr/include/c++/5:/usr/include/x86_64-linux-gnu/c++/5:/usr/include/c++/5/backward' at runtime.
-- And if not found, will invoke: 'g++-5' for them.
-- Performing Test CXX_HAS_Wno_maybe_uninitialized
-- Performing Test CXX_HAS_Wno_maybe_uninitialized - Success
-- Performing Test CXX_HAS_fno_rtti
-- Performing Test CXX_HAS_fno_rtti - Success
-- Performing Test C_HAS_Wno_strict_overflow
-- Performing Test C_HAS_Wno_strict_overflow - Success
-- Performing Test C_HAS_Wno_maybe_uninitialized
-- Performing Test C_HAS_Wno_maybe_uninitialized - Success
-- Performing Test C_HAS_Wno_parentheses_equality
-- Performing Test C_HAS_Wno_parentheses_equality - Success
-- Performing Test found_setresuid
-- Performing Test found_setresuid - Success
-- Performing Test found_stdstringview
-- Performing Test found_stdstringview - Failed
-- Performing Test found_stdexpstringview
-- Performing Test found_stdexpstringview - Failed
-- Performing Test found_stdapply
-- Performing Test found_stdapply - Failed
-- Performing Test found_stdinvoke
-- Performing Test found_stdinvoke - Failed
Running /home/zah/anaconda3/conda-bld/cern-root_1516216404501/work/build/unix/compiledata.sh
Making /home/zah/anaconda3/conda-bld/cern-root_1516216404501/work/bld3/include/compiledata.h
-- Configuring done
CMake Error at core/clingutils/CMakeLists.txt:24 (add_dependencies):
The dependency target "CLING" of target "ClingUtils" does not exist.
CMake Error at core/dictgen/CMakeLists.txt:31 (add_dependencies):
The dependency target "CLING" of target "Dictgen" does not exist.
CMake Error at core/metacling/src/CMakeLists.txt:30 (add_dependencies):
The dependency target "CLING" of target "MetaCling" does not exist.
CMake Error at core/rootcling_stage1/CMakeLists.txt:23 (add_dependencies):
The dependency target "CLING" of target "rootcling_stage1" does not exist.
-- Generating done
-- Build files have been written to: /home/zah/anaconda3/conda-bld/cern-root_1516216404501/work/bld3
And make ultimately fails trying to build some AST parser that I certainly donât want.
/home/zah/anaconda3/conda-bld/cern-root_1516216404501/work/core/clingutils/src/RStl.cxx:22:28: fatal error: clang/AST/Decl.h: No such file or directory
compilation terminated.
core/clingutils/CMakeFiles/ClingUtils.dir/build.make:62: recipe for target 'core/clingutils/CMakeFiles/ClingUtils.dir/src/RStl.cxx.o' failed
make[2]: *** [core/clingutils/CMakeFiles/ClingUtils.dir/src/RStl.cxx.o] Error 1
CMakeFiles/Makefile2:14204: recipe for target 'core/clingutils/CMakeFiles/ClingUtils.dir/all' failed
make[1]: *** [core/clingutils/CMakeFiles/ClingUtils.dir/all] Error 2
Makefile:149: recipe for target 'all' failed
make: *** [all] Error 2
Is there a way to disable all these extra features?