CMake Generate step failed rhel8

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}
echo ${CMAKE_PREFIX_PATH}