Try to follow the procedure from this post (just replace the “6.10.08” version there with the current “6.14.02” and in case it breaks, attach here the created “cmake.out.txt” file):
See: ROOT Build Prerequisites
Try (note: the “build” subdirectory MUST be different from the “source code” subdirectory and in case of problems, attach the “cmake.out.txt” file here):
rm -rf root-6.10.08 # make sure no "remnants" from previous builds are present
mkdir root-6.10.08 # create the "build" subdirectory
cd root-6.10.08
unset ROOTSYS # nothing in your environment should point to another ROOT version
cmake -Dall="ON" -Dsoversion="ON" /source/code/of/root-6.10.08 > cmake.out.txt 2>&1
c…
Please note also that the ROOT Team provides ready to use binary distributions and maybe your “operating system version + compiler version” is one of the supported distributions.