CMake Generate step failed rhel8

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.

Thanks for your help

ROOT Version: 6.24.00
Platform: rhel8.2
Compiler: cmake 3.18.2

1 Like

I guess @oshadura can help you.

Hi @oshadura
Tell me if you need more information.
Aurélien

I believe we don’t have any of these targets in root…

I have shared around me to find the way to make it fit as you explain and told you back about the evolution of the situation.
Kind regards

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)

Thanks

check / clean your “CMAKE_PREFIX_PATH”:
echo ${CMAKE_PREFIX_PATH}
set | grep CMAKE

Hi, I have done what you told me … but it seems empty.

# echo ${CMAKE_PREFIX_PATH}
#

# set |grep CMAKE
#

Try (see if there is anything suspicious): export | grep DIR

Can it be that you have a “system-provided” ROOT 5 version (e.g. in “/usr/[bin|lib]” or “/usr/local/[bin|lib]”) installed?

# export | grep DIR
declare -x XDG_RUNTIME_DIR="/run/user/0"

About ROOT 5 … possible, we are working on share directory for the installation.

/Shared-dir1/2/3/root/root_v6.24.00/root-6.24.00

Before trying to build a new ROOT version, make sure that nothing in your “environment” points to another ROOT version.
Check:

which root
which rootcint
echo ${ROOTSYS}
echo ${PATH}
echo ${LD_LIBRARY_PATH}
echo ${PYTHONPATH}
# 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 ).

Does this help?
Enrico

The instruction in the README.md

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.
#

# ll
total 284
drwxrwxr-x 10 root root  2048 Apr 14 16:29 bindings
drwxrwxr-x  7 root root  2048 Apr 14 16:29 build
drwxrwxr-x 13 root root  2048 Apr 14 16:29 builtins
drwxrwxr-x  5 root root  2048 Apr 14 16:29 cmake
-rw-rw-r--  1 root root 31520 Apr 14 16:29 CMakeLists.txt
drwxrwxr-x  2 root root  4096 Apr 14 16:29 config
-rwxrwxr-x  1 root root   182 Apr 14 16:29 configure
-rw-rw-r--  1 root root  2507 Apr 14 16:29 CONTRIBUTING.md
drwxrwxr-x 27 root root  4096 Apr 14 16:29 core
drwxrwxr-x 13 root root  2048 Apr 14 16:29 doc
drwxrwxr-x 10 root root  2048 Apr 14 16:29 documentation
drwxrwxr-x  8 root root  2048 Jun 17 09:50 etc
drwxrwxr-x  2 root root  6144 Apr 14 16:29 fonts
drwxrwxr-x  8 root root  2048 Apr 14 16:29 geom
drwxrwxr-x 18 root root  2048 Apr 14 16:29 graf2d
drwxrwxr-x 12 root root  2048 Apr 14 16:29 graf3d
drwxrwxr-x 18 root root  2048 Apr 14 16:29 gui
drwxrwxr-x 11 root root  2048 Apr 14 16:29 hist
drwxrwxr-x  5 root root  2048 Apr 14 16:29 html
drwxrwxr-x  2 root root 45056 Apr 14 16:29 icons
drwxrwxr-x  4 root root  2048 Apr 14 16:29 interpreter
drwxrwxr-x 11 root root  2048 Apr 14 16:29 io
drwxrwxr-x  6 root root  2048 Apr 14 16:29 js
-rw-rw-r--  1 root root 24448 Apr 14 16:29 LGPL2_1.txt
-rw-rw-r--  1 root root   847 Apr 14 16:29 LICENSE
drwxrwxr-x  2 root root  2048 Apr 14 16:29 macros
drwxrwxr-x  4 root root  2048 Apr 14 16:29 main
drwxrwxr-x  3 root root  2048 Apr 14 16:29 man
drwxrwxr-x 21 root root  2048 Apr 14 16:29 math
drwxrwxr-x  7 root root  2048 Apr 14 16:29 misc
drwxrwxr-x  7 root root  2048 Apr 14 16:29 montecarlo
drwxrwxr-x 13 root root  2048 Apr 14 16:29 net
drwxrwxr-x  9 root root  2048 Apr 14 16:29 proof
drwxrwxr-x  3 root root  2048 Apr 14 16:29 README
-rw-rw-r--  1 root root  4362 Apr 14 16:29 README.md
-rw-rw-r--  1 root root   321 Apr 14 16:29 requirements.txt
drwxrwxr-x  9 root root  2048 Apr 14 16:29 roofit
drwxrwxr-x  3 root root  2048 Apr 14 16:29 rootx
drwxrwxr-x  8 root root  2048 Apr 14 16:29 sql
drwxrwxr-x 11 root root 12288 Apr 14 16:29 test
drwxrwxr-x  7 root root  2048 Apr 14 16:29 tmva
drwxrwxr-x  8 root root  2048 Apr 14 16:29 tree
drwxrwxr-x 48 root root  6144 Apr 14 16:29 tutorials
drwxrwxr-x  7 root root  2048 Apr 14 16:29 ui5

Yes as I said the instructions in the README are not very accurate and I’ll remove them in favor of a link to https://root.cern/install/build_from_source . They expect:

  1. that you run those commands not from the ROOT source directory as you are doing, but from one level above
  2. 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.

Cheers,
Enrico