# CMAKE Error while building ROOT

**URL:** <https://root-forum.cern.ch/t/cmake-error-while-building-root/45241>\
**Category:** Newbie\
**Tags:** build, cmake\
**Created:** [June 4, 2021, 2:01am UTC](https://root-forum.cern.ch/t/cmake-error-while-building-root/45241 "2021-06-04T02:01:31Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alberto\_Navarro](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/alberto_navarro/32/24039_2.png) [@Alberto\_Navarro](https://root-forum.cern.ch/u/Alberto_Navarro)\
**Post date:** [June 4, 2021, 2:01am UTC](https://root-forum.cern.ch/t/cmake-error-while-building-root/45241/1 "2021-06-04T02:01:32Z")

</div>

Hello,

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

```auto
(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](https://root-forum.cern.ch/t/root-6-08-06-on-ubuntu-16-10-error-error-in-cling-cifactory-createci-cannot-extract-standard-library-include-paths/23958), so I tried to build ROOT again but I got this error

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

* * *

---

<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 4, 2021, 8:36am UTC](https://root-forum.cern.ch/t/cmake-error-while-building-root/45241/2 "2021-06-04T08:36:31Z")

</div>

@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`?

---

<div class="post-metadata">

**Author:** ![Alberto\_Navarro](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/alberto_navarro/32/24039_2.png) [@Alberto\_Navarro](https://root-forum.cern.ch/u/Alberto_Navarro)\
**Post date:** [June 5, 2021, 1:47am UTC](https://root-forum.cern.ch/t/cmake-error-while-building-root/45241/3 "2021-06-05T01:47:15Z")

</div>

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`

---

<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 7, 2021, 8:55am UTC](https://root-forum.cern.ch/t/cmake-error-while-building-root/45241/4 "2021-06-07T08:55:12Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Alberto\_Navarro](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/alberto_navarro/32/24039_2.png) [@Alberto\_Navarro](https://root-forum.cern.ch/u/Alberto_Navarro)\
**Post date:** [June 7, 2021, 9:05pm UTC](https://root-forum.cern.ch/t/cmake-error-while-building-root/45241/5 "2021-06-07T21:05:06Z")

</div>

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.
