# CMake Generate step failed rhel8

**URL:** <https://root-forum.cern.ch/t/cmake-generate-step-failed-rhel8/45400>\
**Category:** ROOT\
**Tags:** cmake\
**Created:** [June 15, 2021, 6:47am UTC](https://root-forum.cern.ch/t/cmake-generate-step-failed-rhel8/45400 "2021-06-15T06:47:29Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![aurelien](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/a/67e7ee/32.png) [@aurelien](https://root-forum.cern.ch/u/aurelien)\
**Post date:** [June 15, 2021, 6:47am UTC](https://root-forum.cern.ch/t/cmake-generate-step-failed-rhel8/45400/1 "2021-06-15T06:47:29Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![couet](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/couet/32/12037_2.png) [@couet](https://root-forum.cern.ch/u/couet)\
**Post date:** [June 15, 2021, 6:52am UTC](https://root-forum.cern.ch/t/cmake-generate-step-failed-rhel8/45400/2 "2021-06-15T06:52:11Z")

</div>

I guess @oshadura can help you.

---

<div class="post-metadata">

**Author:** ![aurelien](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/a/67e7ee/32.png) [@aurelien](https://root-forum.cern.ch/u/aurelien)\
**Post date:** [June 15, 2021, 12:52pm UTC](https://root-forum.cern.ch/t/cmake-generate-step-failed-rhel8/45400/3 "2021-06-15T12:52:22Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![oshadura](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/oshadura/32/14460_2.png) [@oshadura](https://root-forum.cern.ch/u/oshadura)\
**Post date:** [June 15, 2021, 1:13pm UTC](https://root-forum.cern.ch/t/cmake-generate-step-failed-rhel8/45400/4 "2021-06-15T13:13:45Z")

</div>

> [@aurelien](#):
>
> 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)

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

---

<div class="post-metadata">

**Author:** ![aurelien](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/a/67e7ee/32.png) [@aurelien](https://root-forum.cern.ch/u/aurelien)\
**Post date:** [June 15, 2021, 2:32pm UTC](https://root-forum.cern.ch/t/cmake-generate-step-failed-rhel8/45400/5 "2021-06-15T14:32:12Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![aurelien](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/a/67e7ee/32.png) [@aurelien](https://root-forum.cern.ch/u/aurelien)\
**Post date:** [June 16, 2021, 5:50am UTC](https://root-forum.cern.ch/t/cmake-generate-step-failed-rhel8/45400/6 "2021-06-16T05:50:28Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Wile\_E\_Coyote](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/wile_e_coyote/32/12417_2.png) [@Wile\_E\_Coyote](https://root-forum.cern.ch/u/Wile_E_Coyote)\
**Post date:** [June 16, 2021, 6:05am UTC](https://root-forum.cern.ch/t/cmake-generate-step-failed-rhel8/45400/7 "2021-06-16T06:05:05Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![aurelien](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/a/67e7ee/32.png) [@aurelien](https://root-forum.cern.ch/u/aurelien)\
**Post date:** [June 17, 2021, 6:18am UTC](https://root-forum.cern.ch/t/cmake-generate-step-failed-rhel8/45400/8 "2021-06-17T06:18:45Z")

</div>

> [@Wile\_E\_Coyote](#):
>
> set | grep CMAKE

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

```auto
# echo ${CMAKE_PREFIX_PATH}
#

# set |grep CMAKE
#

```

---

<div class="post-metadata">

**Author:** ![Wile\_E\_Coyote](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/wile_e_coyote/32/12417_2.png) [@Wile\_E\_Coyote](https://root-forum.cern.ch/u/Wile_E_Coyote)\
**Post date:** [June 17, 2021, 7:14am UTC](https://root-forum.cern.ch/t/cmake-generate-step-failed-rhel8/45400/9 "2021-06-17T07:14:10Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![aurelien](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/a/67e7ee/32.png) [@aurelien](https://root-forum.cern.ch/u/aurelien)\
**Post date:** [June 17, 2021, 7:25am UTC](https://root-forum.cern.ch/t/cmake-generate-step-failed-rhel8/45400/10 "2021-06-17T07:25:35Z")

</div>

> [@Wile\_E\_Coyote](#):
>
> export | grep DIR

```auto
# 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

---

<div class="post-metadata">

**Author:** ![Wile\_E\_Coyote](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/wile_e_coyote/32/12417_2.png) [@Wile\_E\_Coyote](https://root-forum.cern.ch/u/Wile_E_Coyote)\
**Post date:** [June 17, 2021, 7:32am UTC](https://root-forum.cern.ch/t/cmake-generate-step-failed-rhel8/45400/11 "2021-06-17T07:32:56Z")

</div>

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

```bash
which root
which rootcint
echo ${ROOTSYS}
echo ${PATH}
echo ${LD_LIBRARY_PATH}
echo ${PYTHONPATH}
echo ${CMAKE_PREFIX_PATH}

```

---

<div class="post-metadata">

**Author:** ![aurelien](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/a/67e7ee/32.png) [@aurelien](https://root-forum.cern.ch/u/aurelien)\
**Post date:** [June 17, 2021, 7:35am UTC](https://root-forum.cern.ch/t/cmake-generate-step-failed-rhel8/45400/12 "2021-06-17T07:35:38Z")

</div>

```auto
# 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}

#

```

---

<div class="post-metadata">

**Author:** ![Wile\_E\_Coyote](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/wile_e_coyote/32/12417_2.png) [@Wile\_E\_Coyote](https://root-forum.cern.ch/u/Wile_E_Coyote)\
**Post date:** [June 17, 2021, 7:42am UTC](https://root-forum.cern.ch/t/cmake-generate-step-failed-rhel8/45400/13 "2021-06-17T07:42:35Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![aurelien](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/a/67e7ee/32.png) [@aurelien](https://root-forum.cern.ch/u/aurelien)\
**Post date:** [June 17, 2021, 7:54am UTC](https://root-forum.cern.ch/t/cmake-generate-step-failed-rhel8/45400/14 "2021-06-17T07:54:48Z")

</div>

Yes it is the clean uncompressed stuff. But ok I redraw all from 0 here is the result:

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

```

---

<div class="post-metadata">

**Author:** ![eguiraud](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/eguiraud/32/32217_2.png) [@eguiraud](https://root-forum.cern.ch/u/eguiraud)\
**Post date:** [June 17, 2021, 8:09am UTC](https://root-forum.cern.ch/t/cmake-generate-step-failed-rhel8/45400/15 "2021-06-17T08:09:26Z")

</div>

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](https://root.cern/install/build_from_source) ).

Does this help?  
Enrico

---

<div class="post-metadata">

**Author:** ![aurelien](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/a/67e7ee/32.png) [@aurelien](https://root-forum.cern.ch/u/aurelien)\
**Post date:** [June 17, 2021, 8:24am UTC](https://root-forum.cern.ch/t/cmake-generate-step-failed-rhel8/45400/16 "2021-06-17T08:24:20Z")

</div>

The instruction in the README.md

```auto
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

```

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

```

---

<div class="post-metadata">

**Author:** ![aurelien](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/a/67e7ee/32.png) [@aurelien](https://root-forum.cern.ch/u/aurelien)\
**Post date:** [June 17, 2021, 8:33am UTC](https://root-forum.cern.ch/t/cmake-generate-step-failed-rhel8/45400/17 "2021-06-17T08:33:48Z")

</div>

```auto
# 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

```

---

<div class="post-metadata">

**Author:** ![eguiraud](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/eguiraud/32/32217_2.png) [@eguiraud](https://root-forum.cern.ch/u/eguiraud)\
**Post date:** [June 17, 2021, 8:34am UTC](https://root-forum.cern.ch/t/cmake-generate-step-failed-rhel8/45400/18 "2021-06-17T08:34:18Z")

</div>

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](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

---

<div class="post-metadata">

**Author:** ![aurelien](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/a/67e7ee/32.png) [@aurelien](https://root-forum.cern.ch/u/aurelien)\
**Post date:** [June 17, 2021, 8:40am UTC](https://root-forum.cern.ch/t/cmake-generate-step-failed-rhel8/45400/19 "2021-06-17T08:40:10Z")

</div>

```auto
# 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

```

---

<div class="post-metadata">

**Author:** ![eguiraud](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/eguiraud/32/32217_2.png) [@eguiraud](https://root-forum.cern.ch/u/eguiraud)\
**Post date:** [June 17, 2021, 9:02am UTC](https://root-forum.cern.ch/t/cmake-generate-step-failed-rhel8/45400/20 "2021-06-17T09:02:29Z")

</div>

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

[Next page](https://root-forum.cern.ch/t/cmake-generate-step-failed-rhel8/45400.md?page=2)
