# Compiling a Geant4 based software, but get an error in root

**URL:** <https://root-forum.cern.ch/t/compiling-a-geant4-based-software-but-get-an-error-in-root/48041>\
**Category:** Newbie\
**Tags:** root\
**Created:** [December 13, 2021, 11:43am UTC](https://root-forum.cern.ch/t/compiling-a-geant4-based-software-but-get-an-error-in-root/48041 "2021-12-13T11:43:30Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![El\_Abbassi\_Abderezza](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/el_abbassi_abderezza/32/28170_2.png) [@El\_Abbassi\_Abderezza](https://root-forum.cern.ch/u/El_Abbassi_Abderezza)\
**Post date:** [December 13, 2021, 11:43am UTC](https://root-forum.cern.ch/t/compiling-a-geant4-based-software-but-get-an-error-in-root/48041/1 "2021-12-13T11:43:30Z")

</div>

Hi Root community,

Can you give me a hint about this compiling problem of a software that uses root and it’s Geant4 based, here I get a root compiling problem with make only. However it’s compiled fine in the first attempt, but I did a lot and forgot what I did wrong to get this error message. notice that I am using a binary distro but my ubuntu version is 21, that why you see the cling message.

ERROR in cling::CIFactory::createCI(): cannot extract standard library include paths!  
Invoking:  
x86\_64-linux-gnu-g+±9 -O3 -DNDEBUG -xc++ -E -v /dev/null 2\>&1 | sed -n -e ‘/^.include/,${’ -e ‘/^ /.\*++/p’ -e ‘}’  
Results was:  
With exit code 0  
Warning in cling::IncrementalParser::CheckABICompatibility():  
Possible C++ standard library mismatch, compiled with **GLIBCXX** ‘20200408’  
Extraction of runtime standard library version was: ‘20210923’  
In file included from input\_line\_11:3:  
In file included from /home/aelabass/Documents/root\_v6.20.06.Linux-ubuntu20-x86\_64-gcc9.3/root/include/TClonesArray.h:27:  
In file included from /home/aelabass/Documents/root\_v6.20.06.Linux-ubuntu20-x86\_64-gcc9.3/root/include/TObjArray.h:25:  
In file included from /home/aelabass/Documents/root\_v6.20.06.Linux-ubuntu20-x86\_64-gcc9.3/root/include/TSeqCollection.h:25:  
In file included from /home/aelabass/Documents/root\_v6.20.06.Linux-ubuntu20-x86\_64-gcc9.3/root/include/TCollection.h:29:  
In file included from /home/aelabass/Documents/root\_v6.20.06.Linux-ubuntu20-x86\_64-gcc9.3/root/include/TString.h:28:  
In file included from /home/aelabass/Documents/root\_v6.20.06.Linux-ubuntu20-x86\_64-gcc9.3/root/include/ROOT/RStringView.hxx:26:  
In file included from /home/aelabass/Documents/root\_v6.20.06.Linux-ubuntu20-x86\_64-gcc9.3/root/include/ROOT/RWrap\_libcpp\_string\_view.h:545:  
/home/aelabass/Documents/root\_v6.20.06.Linux-ubuntu20-x86\_64-gcc9.3/root/include/ROOT/libcpp\_string\_view.h:275:63: error: no member named ‘numeric\_limits’ in namespace ‘std’  
size\_type max\_size() const \_NOEXCEPT { return (\_VSTD::numeric\_li…  
~~~~~~~ ^  
/home/aelabass/Documents/root\_v6.20.06.Linux-ubuntu20-x86\_64-gcc9.3/root/include/ROOT/libcpp\_string\_view.h:275:78: error: unexpected type name ‘size\_type’: expected expression  
…max\_size() const \_NOEXCEPT { return (\_VSTD::numeric\_limits\<size\_type\>::m…  
^  
/home/aelabass/Documents/root\_v6.20.06.Linux-ubuntu20-x86\_64-gcc9.3/root/include/ROOT/libcpp\_string\_view.h:275:19: error: no return statement in constexpr function  
size\_type max\_size() const \_NOEXCEPT { return (\_VSTD::numeric\_li…  
^  
Error: /home/aelabass/Documents/root\_v6.20.06.Linux-ubuntu20-x86\_64-gcc9.3/root/bin/rootcling: compilation failure (/home/aelabass/Documents/HyperK/WCSim-build/mydev/libWCSimRootDict0f6572b63a\_dictUmbrella.h)  
make[2]: \*\*\* [CMakeFiles/WCSimRoot.dir/build.make:94: WCSimRootDict.cxx] Error 1  
make[1]: \*\*\* [CMakeFiles/Makefile2:126: CMakeFiles/WCSimRoot.dir/all] Error 2  
make: \*\*\* [Makefile:103: all] Error 2

\_ROOT Version:6.20.06  
\_Platform: ubuntu21.10  
\_Compiler:gcc11.2.0

* * *

---

<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:** [December 13, 2021, 11:56am UTC](https://root-forum.cern.ch/t/compiling-a-geant4-based-software-but-get-an-error-in-root/48041/2 "2021-12-13T11:56:10Z")

</div>

It seems to me that your ROOT binary distribution (uses gcc 9) is incompatible with your operating system (uses gcc 11).

---

<div class="post-metadata">

**Author:** ![Axel](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/axel/32/11084_2.png) [@Axel](https://root-forum.cern.ch/u/Axel)\
**Post date:** [December 16, 2021, 8:26am UTC](https://root-forum.cern.ch/t/compiling-a-geant4-based-software-but-get-an-error-in-root/48041/4 "2021-12-16T08:26:14Z")

</div>

There’s what @Wile_E_Coyote said, and there might be a mismatch in C++ standard versions used to compile these ROOT headers. IIRC in ROOT 6.22 we give a more helpful message for this case, and this isn’t an issue anymore in 6.24.

---

<div class="post-metadata">

**Author:** ![El\_Abbassi\_Abderezza](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/el_abbassi_abderezza/32/28170_2.png) [@El\_Abbassi\_Abderezza](https://root-forum.cern.ch/u/El_Abbassi_Abderezza)\
**Post date:** [January 5, 2022, 3:22pm UTC](https://root-forum.cern.ch/t/compiling-a-geant4-based-software-but-get-an-error-in-root/48041/5 "2022-01-05T15:22:08Z")

</div>

Hi Axel, sorry for late reply. I figured it out, by installing and configuring the appropriate gcc and g++ versions.

---

<div class="post-metadata">

**Author:** ![Axel](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/axel/32/11084_2.png) [@Axel](https://root-forum.cern.ch/u/Axel)\
**Post date:** [January 5, 2022, 4:03pm UTC](https://root-forum.cern.ch/t/compiling-a-geant4-based-software-but-get-an-error-in-root/48041/6 "2022-01-05T16:03:31Z")

</div>

No problem, thanks for letting us know!
