CMAKE Error while building ROOT

Hello,

I updated Ubuntu recently from 20.04 to 20.10 and I started getting this error while running ROOT

(base) alberto@alberto-Inspiron-5558:~$ root
ERROR in cling::CIFactory::createCI(): cannot extract standard library include paths!
Invoking:
  LC_ALL=C x86_64-linux-gnu-g++-9   -xc++ -E -v /dev/null 2>&1 | sed -n -e '/^.include/,${' -e '/^ \/.*++/p' -e '}'
Results was:
With exit code 0
   ------------------------------------------------------------------
  | Welcome to ROOT 6.25/01                        https://root.cern |
  | (c) 1995-2021, The ROOT Team; conception: R. Brun, F. Rademakers |
  | Built for linuxx8664gcc on May 22 2021, 03:56:32                 |
  | From heads/master@v6-25-01-1030-g289d476d95                      |
  | With                                                             |
  | Try '.help', '.demo', '.license', '.credits', '.quit'/'.q'       |
   ------------------------------------------------------------------

root [0] 

I saw something similar in this post, so I tried to build ROOT again but I got this error

(base) alberto@alberto-Inspiron-5558:~/build_dir$ cmake -DCMAKE_INSTALL_PREFIX= /home/alberto/install_dir /home/alberto/root_src
-- The C compiler identification is GNU 10.2.0
-- The CXX compiler identification is GNU 10.2.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found Git: /usr/bin/git (found version "2.27.0") 
-- Detected ROOT_VERSION 6.24.00
-- Looking for Python
-- Found Python3: /home/alberto/anaconda3/bin/python3.8 (found version "3.8.8") found components: Interpreter Development NumPy 
-- Could NOT find Python2 (missing: Python2_NumPy_INCLUDE_DIRS NumPy) (found version "2.7.18")
-- Found GCC. Major version 10, minor version 2
CMake Error at cmake/modules/CheckCompiler.cmake:129 (if):
  if given arguments:

    "STRGREATER" "201703L"

  Unknown arguments specified
Call Stack (most recent call first):
  CMakeLists.txt:130 (include)


-- Configuring incomplete, errors occurred!

I haven’t found a solution to this problem, so I would appreciate any help.

Thanks,
Alberto

_ROOT Version: 6.24.00
_Platform: Ubuntu 20.10
_Compiler: Cmake


@Alberto_Navarro did you build from scratch (e.g. with empty build directory?)
Could you please check in your CMakeCache.txt what is a value of CXX_STANDARD_STRING?

Yes, I did it in a new build directory.
I do not see CXX_STANDARD_STRING in CMakeCache.txt, but I have this CMAKE_CXX_STANDARD-CACHED:STRING=11

I just used docker container ubuntu 20.10 and everything works for me…Maybe you are missing some package updates after upgrading OS (I installed apt install build-essential)

Build essential was installed, so I removed it, installed it again and I could build root. I don’t know why but that worked. Thank you.