Hi here is the trouble during cmake installation following the README.md instructions.
cmake …/…/root
CMake Deprecation Warning at cmake/modules/RootNewMacros.cmake:8 (cmake_policy):
The OLD behavior for policy CMP0022 will be removed from a future version
of CMake.
The cmake-policies(7) manual explains that the OLD behaviors of all
policies are deprecated and that a policy should be set to OLD only under
specific short-term circumstances. Projects should be ported to the NEW
behavior and not rely on setting a policy to OLD.
Call Stack (most recent call first):
CMakeLists.txt:32 (include)
– Found GCC. Major version 8, minor version 8
– CMAKE_BUILD_TYPE: RelWithDebInfo
– Found a 64bit system
– Found GNU compiler collection
– ROOT Platform: linux
– ROOT Architecture: linuxx8664gcc
– Build Type: RelWithDebInfo
– Compiler Flags: -pipe -m64 -Wall -W -Woverloaded-virtual -fPIC
– Looking for ZLib
– Looking for Freetype
– Building LZMA version 5.0.3 included in ROOT itself
– Looking for X11
– Could NOT find GIF (missing: GIF_LIBRARY GIF_INCLUDE_DIR)
– Could NOT find TIFF (missing: TIFF_LIBRARY TIFF_INCLUDE_DIR)
– Looking for GCCXML
– Looking for Kerberos 5
CMake Warning (dev) at /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:273 (message):
The package name passed to find_package_handle_standard_args (KRB5) does
not match the name of the calling package (Kerberos5). This can lead to
problems in calling code that expects find_package result variables
(e.g., _FOUND) to follow a certain pattern.
Call Stack (most recent call first):
cmake/modules/FindKerberos5.cmake:36 (find_package_handle_standard_args)
cmake/modules/SearchInstalledSoftware.cmake:333 (find_package)
CMakeLists.txt:42 (include)
This warning is for project developers. Use -Wno-dev to suppress it.
– Looking for OpenSSL
– Enabled support for: asimage astiff builtin_afterimage builtin_ftgl builtin_glew builtin_pcre builtin_lzma cintex exceptions explicitlink fortran genvector krb5 memstat reflex shadowpw shared ssl tmva xft x11
– Configuring done
CMake Error: The inter-target dependency graph contains the following strongly connected component (cycle):
“IOSENUM_H” of type UTILITY
depends on “cint_tmp” (strong)
depends on “CINTTARGET” (strong)
“Cint_static” of type STATIC_LIBRARY
depends on “IOSENUM_H” (strong)
“cint_tmp” of type EXECUTABLE
depends on “Cint_static” (weak)
“CINTTARGET” of type UTILITY
depends on “cint_tmp” (strong)
At least one of these targets is not a STATIC_LIBRARY. Cyclic dependencies are allowed only among static libraries.
CMake Generate step failed. Build files cannot be regenerated correctly.
Can you please tell me how to unload the unecessary components ?
CMake Error: The inter-target dependency graph contains the following strongly connected component (cycle):
“IOSENUM_H” of type UTILITY
depends on “cint_tmp” (strong)
depends on “CINTTARGET” (strong)
“Cint_static” of type STATIC_LIBRARY
depends on “IOSENUM_H” (strong)
“cint_tmp” of type EXECUTABLE
depends on “Cint_static” (weak)
“CINTTARGET” of type UTILITY
depends on “cint_tmp” (strong)
# which root
/usr/bin/which: no root in (/usr/share/Modules/bin:/opt/lenovo/onecli:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/opt/pbs/bin:/opt/pbs/sbin:/root/bin)
# which rootcint
/usr/bin/which: no rootcint in (/usr/share/Modules/bin:/opt/lenovo/onecli:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/opt/pbs/bin:/opt/pbs/sbin:/root/bin)
# echo ${ROOTSYS}
# echo ${PATH}
/usr/share/Modules/bin:/opt/lenovo/onecli:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/opt/pbs/bin:/opt/pbs/sbin:/root/bin
# echo ${LD_LIBRARY_PATH}
# echo ${PYTHONPATH}
#
You run “cmake …/…/root”. Are sure that the “…/…/root” directory contains a clean source code of the ROOT version that you want to build?
Also, make sure that you start with a clean “build directory” (i.e. remove it and create anew).
Yes it is the clean uncompressed stuff. But ok I redraw all from 0 here is the result:
# pwd
/shared-dir1/appli/produits/root-6.24/root-6.24.00/build
# ls
ASan_blacklist.txt CMakeLists.txt gdbPrinters misc rmkdepend unix version_number win
# ls ../
bindings CMakeLists.txt core fonts gui interpreter LICENSE math proof roofit tmva
build config doc geom hist io macros misc README rootx tree
builtins configure documentation graf2d html js main montecarlo README.md sql tutorials
cmake CONTRIBUTING.md etc graf3d icons LGPL2_1.txt man net requirements.txt test ui5
# cmake ../root
CMake Error: The source directory "/shared-dir1/appli/produits/root-6.24/root-6.24.00/root" does not exist.
Specify --help for usage, or press the help button on the CMake GUI.
#
You cannot use the directory called build inside the ROOT sources as the build directory to build ROOT.
You need to create /shared-dir1/appli/produits/root-6.24/build and then run cmake -B /shared-dir1/appli/produits/root-6.24/build -S /shared-dir1/appli/produits/root-6.24/root-6.24.00 or equivalent.
The build instructions in the README on GitHub are not very clear, I will update them (or maybe remove them and simply point to the more complete and accurate https://root.cern/install/build_from_source ).
Make a directory for building
$ mkdir build
$ cd build
Run cmake and make
$ cmake ../root
$ make -j8
Setup and run ROOT
$ source bin/thisroot.sh
$ root
# pwd
/shared-dir1/appli/produits/root-6.24/root-6.24.00
# cmake ../root
CMake Error: The source directory "/shared-dir1/appli/produits/root-6.24/root" does not exist.
Specify --help for usage, or press the help button on the CMake GUI.
#
that you run those commands not from the ROOT source directory as you are doing, but from one level above
that the ROOT sources are stored in a directory called root, not root-6.24.00 like in your case
You can try this instead, which should work better:
create /shared-dir1/appli/produits/root-6.24/build (note that this build directory is not under root-6.24.00, and it should be empty
run cmake -B /shared-dir1/appli/produits/root-6.24/build -S /shared-dir1/appli/produits/root-6.24/root-6.24.0 which is independent of your pwd and specifies build directory and source directory explicitly
# mkdir build
# cd build/
# cmake ../root
CMake Error: The source directory "/shared-dir1/appli/produits/root-6.24/root" does not exist.
Specify --help for usage, or press the help button on the CMake GUI.
# cmake -B /shared-dir1/appli/produits/root-6.24/build -S /shared-dir1/appli/produits/root-6.24
CMake Error: The source directory "/shared-dir1/appli/produits/root-6.24" does not appear to contain CMakeLists.txt.
Specify --help for usage, or press the help button on the CMake GUI.
# updatedb
# locate CMakeLists.txt
/usr/share/cmake/Modules/FortranCInterface/CMakeLists.txt
/usr/share/cmake/Modules/FortranCInterface/Verify/CMakeLists.txt
/usr/share/cmake/Modules/IntelVSImplicitPath/CMakeLists.txt
# pwd
/shared-dir1/appli/produits/root-6.24/build
Hi, cmake ../root can’t work: there is no /shared-dir1/appli/produits/root-6.24/root directory on your system.
For the second command, you need to pass the source directory to the -S option (see man cmake), which if I understand correctly is /shared-dir1/appli/produits/root-6.24/root-6.24.00, not /shared-dir1/appli/produits/root-6.24 as you passed.