# Running into errors when running 'make'

**URL:** <https://openmc.discourse.group/t/running-into-errors-when-running-make/2402>\
**Category:** User Support\
**Created:** [October 28, 2022, 4:25pm UTC](https://openmc.discourse.group/t/running-into-errors-when-running-make/2402 "2022-10-28T16:25:48Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![n0xn4me](https://avatars.discourse-cdn.com/v4/letter/n/b487fb/32.png) [@n0xn4me](https://openmc.discourse.group/u/n0xn4me)\
**Post date:** [October 28, 2022, 4:25pm UTC](https://openmc.discourse.group/t/running-into-errors-when-running-make/2402/1 "2022-10-28T16:25:48Z")

</div>

Hi all, I am running into an error when trying to compile OpenMC. I can successfully run the ‘ **cmake …** ’ command per the install documentation, however, when I get to the ‘ **make** ’ command, I run into the following:

_make[2]: \*\*\* [CMakeFiles/libopenmc.dir/src/bank.cpp.o] Error 1_  
_make[1]: \*\*\* [CMakeFiles/libopenmc.dir/all] Error 2_  
_make: \*\*\* [all] Error 2_

I checked the **/build/CMakeFiles/libopenmc.dir/** and do not see the ‘ **all** ’ file/dir. In the **/src** dir, there is no ‘ **bank.cpp.o** ’ file/dir either.

I used git clone to get the root directory of OpenMC. Any help with this would be appreciated!

Thank you.

---

<div class="post-metadata">

**Author:** ![paulromano](https://yyz2.discourse-cdn.com/free1/user_avatar/openmc.discourse.group/paulromano/32/486_2.png) [@paulromano](https://openmc.discourse.group/u/paulromano)\
**Post date:** [October 29, 2022, 1:36am UTC](https://openmc.discourse.group/t/running-into-errors-when-running-make/2402/2 "2022-10-29T01:36:36Z")

</div>

@n0xn4me welcome to the community! Sorry to hear you’re having trouble compiling. Can you provide a little more information? To start with – what operating system are you on, and what compiler are you using?

---

<div class="post-metadata">

**Author:** ![n0xn4me](https://avatars.discourse-cdn.com/v4/letter/n/b487fb/32.png) [@n0xn4me](https://openmc.discourse.group/u/n0xn4me)\
**Post date:** [November 1, 2022, 5:39pm UTC](https://openmc.discourse.group/t/running-into-errors-when-running-make/2402/3 "2022-11-01T17:39:20Z")

</div>

Hi Paul, thanks for the quick response. Here are the steps I did:

**git clone --recurse-submodules [GitHub - openmc-dev/openmc: OpenMC Monte Carlo Code](https://github.com/openmc-dev/openmc.git)**  
**cd openmc**  
**git checkout master**  
**mkdir build && cd build**  
**cmake …** (using cmake 3.16.2)  
**make** (this is where I run into the error)

OS: RHEL 7.9

---

<div class="post-metadata">

**Author:** ![paulromano](https://yyz2.discourse-cdn.com/free1/user_avatar/openmc.discourse.group/paulromano/32/486_2.png) [@paulromano](https://openmc.discourse.group/u/paulromano)\
**Post date:** [November 23, 2022, 7:59pm UTC](https://openmc.discourse.group/t/running-into-errors-when-running-make/2402/4 "2022-11-23T19:59:30Z")

</div>

@n0xn4me sorry for the delay. Were you ever able to get a build successfully working? If you’re able to post the full output from cmake/make, that might help narrow things down.

---

<div class="post-metadata">

**Author:** ![Shailja](https://avatars.discourse-cdn.com/v4/letter/s/4bbf92/32.png) [@Shailja](https://openmc.discourse.group/u/Shailja)\
**Post date:** [January 28, 2025, 11:50am UTC](https://openmc.discourse.group/t/running-into-errors-when-running-make/2402/7 "2025-01-28T11:50:22Z")

</div>

Hii  
I am also facing same problem here. i am able to run build successfully but while going for make command it is getting error.

I am posting here my output starting with build folder

[shailja@login1 build]$ cmake -DCMAKE\_INSTALL\_PREFIX=$HOME/.local ..  
– The C compiler identification is GNU 8.2.0  
– The CXX compiler identification is GNU 8.2.0  
– Detecting C compiler ABI info  
– Detecting C compiler ABI info - done  
– Check for working C compiler: /home/application/gcc/8.2.0/bin/gcc - skipped  
– Detecting C compile features  
– Detecting C compile features - done  
– Detecting CXX compiler ABI info  
– Detecting CXX compiler ABI info - done  
– Check for working CXX compiler: /home/application/gcc/8.2.0/bin/c++ - skipped  
– Detecting CXX compile features  
– Detecting CXX compile features - done  
– No build type selected, defaulting to RelWithDebInfo  
– Found ZLIB: /home/application/STARCCM2021/16.02.009-R8/STAR-View+16.02.009/bi n/libz.so (found version “1.2.11”)  
– Found PNG: /usr/lib64/libpng.so (found version “1.5.13”)  
– Found HDF5: /home/application/hdf5/gcc-4.8.5/1.10.1/lib/libhdf5.so;/home/appl ication/STARCCM2021/16.02.009-R8/STAR-View+16.02.009/bin/libz.so;/usr/lib64/libd l.so;/usr/lib64/libm.so (found version “1.10.1”) found components: C HL  
– Found OpenMP\_C: -fopenmp (found version “4.5”)  
– Found OpenMP\_CXX: -fopenmp (found version “4.5”)  
– Found OpenMP: TRUE (found version “4.5”)  
– OpenMC C++ flags: -fopenmp  
– OpenMC Linker flags: -fopenmp  
– Found Git: /home/application/git225/bin/git (found version “2.25.0”)  
– Found pugixml: /home/shailja/.local/lib64/cmake/pugixml (version 1.12)  
– Found fmt: /home/shailja/.local/lib64/cmake/fmt (version 8.0.0)  
– Performing Test arch\_native\_supported  
– Performing Test arch\_native\_supported - Success  
– Found xtensor: /home/shailja/.local/lib64/cmake/xtensor (version 0.24.2)  
– Found gsl-lite: /home/shailja/.local/lib64/cmake/gsl-lite (version 0.40.0)  
– Configuring done  
– Generating done  
– Build files have been written to: /home/shailja/openmc-develop/build

[shailja@login1 build]$ make  
[1%] Building CXX object CMakeFiles/libopenmc.dir/src/bank.cpp.o  
In file included from /home/shailja/openmc-develop/include/openmc/capi.h:6,  
from /home/shailja/openmc-develop/src/bank.cpp:2:  
/home/application/intel2018u4/compilers\_and\_libraries/linux/include/stdint.h:79: 10: warning: undefining “\_\_STDC\_LIMIT\_MACROS\_DEFINED\_BY\_CLANG”

# undef \_\_STDC\_LIMIT\_MACROS\_DEFINED\_BY\_CLANG

```
      ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

```

/home/application/intel2018u4/compilers\_and\_libraries/linux/include/stdint.h:83: 10: warning: undefining “\_\_STDC\_CONSTANT\_MACROS\_DEFINED\_BY\_CLANG”

# undef \_\_STDC\_CONSTANT\_MACROS\_DEFINED\_BY\_CLANG

```
      ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

```

In file included from /home/shailja/.local/include/xtl/xtype\_traits.hpp:13,  
from /home/shailja/.local/include/xtl/xfunctional.hpp:16,  
from /home/shailja/.local/include/xtl/xmeta\_utils.hpp:17,  
from /home/shailja/.local/include/xtl/xsequence.hpp:20,  
from /home/shailja/.local/include/xtensor/xexception.hpp:20,  
from /home/shailja/.local/include/xtensor/xstorage.hpp:21,  
from /home/shailja/.local/include/xtensor/xbuffer\_adaptor.hpp:2 2,  
from /home/shailja/.local/include/xtensor/xtensor.hpp:19,  
from /home/shailja/openmc-develop/include/openmc/mesh.h:11,  
from /home/shailja/openmc-develop/include/openmc/simulation.h: ,  
from /home/shailja/openmc-develop/src/bank.cpp:5:  
/home/application/intel2018u4/compilers\_and\_libraries/linux/include/complex:53:3 : error: #error “This Intel is for use only with the Intel C++ compile rs!”

# error “This Intel is for use only with the Intel C++ compilers!”

^ ~~~~  
/home/application/intel2018u4/compilers\_and\_libraries/linux/include/complex: In member function ‘std::complex& std::complex::operator=(const std:: complex\<\_Tp\>&) [with \_Tp = double]’:  
/home/application/intel2018u4/compilers\_and\_libraries/linux/include/complex:69:2 4: error: ‘std::complex::\_ComplexT std::complex::\_M\_value’ is pr ivate within this context  
\_M\_value = \_\_z.\_M\_value;  
^ ~~~~~~~  
In file included from /home/application/intel2018u4/compilers\_and\_libraries/linu x/include/complex:30,  
from /home/shailja/.local/include/xtl/xtype\_traits.hpp:13,  
from /home/shailja/.local/include/xtl/xfunctional.hpp:16,  
from /home/shailja/.local/include/xtl/xmeta\_utils.hpp:17,  
from /home/shailja/.local/include/xtl/xsequence.hpp:20,  
from /home/shailja/.local/include/xtensor/xexception.hpp:20,  
from /home/shailja/.local/include/xtensor/xstorage.hpp:21,  
from /home/shailja/.local/include/xtensor/xbuffer\_adaptor.hpp:2 2,  
from /home/shailja/.local/include/xtensor/xtensor.hpp:19,  
from /home/shailja/openmc-develop/include/openmc/mesh.h:11,  
from /home/shailja/openmc-develop/include/openmc/simulation.h: ,  
from /home/shailja/openmc-develop/src/bank.cpp:5:  
/home/application/gcc/8.2.0/include/c++/8.2.0/complex:1365:17: note: declared pr ivate here  
\_ComplexT \_M\_value;  
^ ~~~~~~~  
In file included from /home/shailja/.local/include/xtl/xtype\_traits.hpp:13,  
from /home/shailja/.local/include/xtl/xfunctional.hpp:16,  
from /home/shailja/.local/include/xtl/xmeta\_utils.hpp:17,  
from /home/shailja/.local/include/xtl/xsequence.hpp:20,  
from /home/shailja/.local/include/xtensor/xexception.hpp:20,  
from /home/shailja/.local/include/xtensor/xstorage.hpp:21,  
from /home/shailja/.local/include/xtensor/xbuffer\_adaptor.hpp:2 2,  
from /home/shailja/.local/include/xtensor/xtensor.hpp:19,  
from /home/shailja/openmc-develop/include/openmc/mesh.h:11,  
from /home/shailja/openmc-develop/include/openmc/simulation.h: ,  
from /home/shailja/openmc-develop/src/bank.cpp:5:  
/home/application/intel2018u4/compilers\_and\_libraries/linux/include/complex:69:2 4: note: field ‘std::complex::\_ComplexT std::complex::\_M\_value’ can be accessed via ‘constexpr std::complex::\_ComplexT std::complex::\_\_rep() const’  
\_M\_value = \_\_z.\_M\_value;  
^ ~~~~~~~  
\_\_rep()  
/home/application/intel2018u4/compilers\_and\_libraries/linux/include/complex: In member function ‘std::complex& std::complex::operator=(const std ::complex\<\_Tp\>&) [with \_Tp = float]’:  
/home/application/intel2018u4/compilers\_and\_libraries/linux/include/complex:77:2 4: error: ‘std::complex::\_ComplexT std::complex::\_M\_value’ is priv ate within this context  
\_M\_value = \_\_z.\_M\_value;  
^ ~~~~~~~  
In file included from /home/application/intel2018u4/compilers\_and\_libraries/linu x/include/complex:30,  
from /home/shailja/.local/include/xtl/xtype\_traits.hpp:13,  
from /home/shailja/.local/include/xtl/xfunctional.hpp:16,  
from /home/shailja/.local/include/xtl/xmeta\_utils.hpp:17,  
from /home/shailja/.local/include/xtl/xsequence.hpp:20,  
from /home/shailja/.local/include/xtensor/xexception.hpp:20,  
from /home/shailja/.local/include/xtensor/xstorage.hpp:21,  
from /home/shailja/.local/include/xtensor/xbuffer\_adaptor.hpp:2 2,  
from /home/shailja/.local/include/xtensor/xtensor.hpp:19,  
from /home/shailja/openmc-develop/include/openmc/mesh.h:11,  
from /home/shailja/openmc-develop/include/openmc/simulation.h: ,  
from /home/shailja/openmc-develop/src/bank.cpp:5:  
/home/application/gcc/8.2.0/include/c++/8.2.0/complex:1215:17: note: declared pr ivate here  
\_ComplexT \_M\_value;  
^ ~~~~~~~  
In file included from /home/shailja/.local/include/xtl/xtype\_traits.hpp:13,  
from /home/shailja/.local/include/xtl/xfunctional.hpp:16,  
from /home/shailja/.local/include/xtl/xmeta\_utils.hpp:17,  
from /home/shailja/.local/include/xtl/xsequence.hpp:20,  
from /home/shailja/.local/include/xtensor/xexception.hpp:20,  
from /home/shailja/.local/include/xtensor/xstorage.hpp:21,  
from /home/shailja/.local/include/xtensor/xbuffer\_adaptor.hpp:2 2,  
from /home/shailja/.local/include/xtensor/xtensor.hpp:19,  
from /home/shailja/openmc-develop/include/openmc/mesh.h:11,  
from /home/shailja/openmc-develop/include/openmc/simulation.h: ,  
from /home/shailja/openmc-develop/src/bank.cpp:5:  
/home/application/intel2018u4/compilers\_and\_libraries/linux/include/complex:77:2 4: note: field ‘std::complex::\_ComplexT std::complex::\_M\_value’ ca n be accessed via ‘constexpr std::complex::\_ComplexT std::complex: :\_\_rep() const’  
\_M\_value = \_\_z.\_M\_value;  
^ ~~~~~~~  
\_\_rep()  
/home/application/intel2018u4/compilers\_and\_libraries/linux/include/complex: In function ‘std::complex std::operator+(const std::complex&, const s td::complex&)’:  
/home/application/intel2018u4/compilers\_and\_libraries/linux/include/complex:115: 20: error: ‘std::complex::\_ComplexT std::complex::\_M\_value’ is pri vate within this context  
return \_\_x.\_M\_value + \_\_y.\_M\_value;  
^ ~~~~~~~  
In file included from /home/application/intel2018u4/compilers\_and\_libraries/linu x/include/complex:30,  
from /home/shailja/.local/include/xtl/xtype\_traits.hpp:13,  
from /home/shailja/.local/include/xtl/xfunctional.hpp:16,  
from /home/shailja/.local/include/xtl/xmeta\_utils.hpp:17,  
from /home/shailja/.local/include/xtl/xsequence.hpp:20,  
from /home/shailja/.local/include/xtensor/xexception.hpp:20,  
from /home/shailja/.local/include/xtensor/xstorage.hpp:21,  
from /home/shailja/.local/include/xtensor/xbuffer\_adaptor.hpp:2 2,  
from /home/shailja/.local/include/xtensor/xtensor.hpp:19,  
from /home/shailja/openmc-develop/include/openmc/mesh.h:11,  
from /home/shailja/openmc-develop/include/openmc/simulation.h: ,  
from /home/shailja/openmc-develop/src/bank.cpp:5:  
/home/application/gcc/8.2.0/include/c++/8.2.0/complex:1215:17: note: declared pr ivate here  
\_ComplexT \_M\_value;  
^ ~~~~~~~  
In file included from /home/shailja/.local/include/xtl/xtype\_traits.hpp:13,  
from /home/shailja/.local/include/xtl/xfunctional.hpp:16,  
from /home/shailja/.local/include/xtl/xmeta\_utils.hpp:17,  
from /home/shailja/.local/include/xtl/xsequence.hpp:20,  
from /home/shailja/.local/include/xtensor/xexception.hpp:20,  
from /home/shailja/.local/include/xtensor/xstorage.hpp:21,  
from /home/shailja/.local/include/xtensor/xbuffer\_adaptor.hpp:2 2,  
from /home/shailja/.local/include/xtensor/xtensor.hpp:19,  
from /home/shailja/openmc-develop/include/openmc/mesh.h:11,  
from /home/shailja/openmc-develop/include/openmc/simulation.h: ,  
from /home/shailja/openmc-develop/src/bank.cpp:5:  
/home/application/intel2018u4/compilers\_and\_libraries/linux/include/complex:115: 20: note: field ‘std::complex::\_ComplexT std::complex::\_M\_value’ c an be accessed via ‘constexpr std::complex::\_ComplexT std::complex ::\_\_rep() const’  
return \_\_x.\_M\_value + \_\_y.\_M\_value;  
^ ~~~~~~~  
\_\_rep()  
/home/application/intel2018u4/compilers\_and\_libraries/linux/include/complex:115: 35: error: ‘std::complex::\_ComplexT std::complex::\_M\_value’ is pri vate within this context  
return \_\_x.\_M\_value + \_\_y.\_M\_value;  
^ ~~~~~~~  
In file included from /home/application/intel2018u4/compilers\_and\_libraries/linu x/include/complex:30,  
from /home/shailja/.local/include/xtl/xtype\_traits.hpp:13,  
from /home/shailja/.local/include/xtl/xfunctional.hpp:16,  
from /home/shailja/.local/include/xtl/xmeta\_utils.hpp:17,  
from /home/shailja/.local/include/xtl/xsequence.hpp:20,  
from /home/shailja/.local/include/xtensor/xexception.hpp:20,  
from /home/shailja/.local/include/xtensor/xstorage.hpp:21,  
from /home/shailja/.local/include/xtensor/xbuffer\_adaptor.hpp:2 2,  
from /home/shailja/.local/include/xtensor/xtensor.hpp:19,  
from /home/shailja/openmc-develop/include/openmc/mesh.h:11,  
from /home/shailja/openmc-develop/include/openmc/simulation.h: ,  
from /home/shailja/openmc-develop/src/bank.cpp:5:  
/home/application/gcc/8.2.0/include/c++/8.2.0/complex:1215:17: note: declared pr ivate here  
\_ComplexT \_M\_value;  
^ ~~~~~~~  
In file included from /home/shailja/.local/include/xtl/xtype\_traits.hpp:13,  
from /home/shailja/.local/include/xtl/xfunctional.hpp:16,  
from /home/shailja/.local/include/xtl/xmeta\_utils.hpp:17,  
from /home/shailja/.local/include/xtl/xsequence.hpp:20,  
from /home/shailja/.local/include/xtensor/xexception.hpp:20,  
from /home/shailja/.local/include/xtensor/xstorage.hpp:21,  
from /home/shailja/.local/include/xtensor/xbuffer\_adaptor.hpp:2 2,  
from /home/shailja/.local/include/xtensor/xtensor.hpp:19,  
from /home/shailja/openmc-develop/include/openmc/mesh.h:11,  
from /home/shailja/openmc-develop/include/openmc/simulation.h: ,  
from /home/shailja/openmc-develop/src/bank.cpp:5:  
/home/application/intel2018u4/compilers\_and\_libraries/linux/include/complex:115: 35: note: field ‘std::complex::\_ComplexT std::complex::\_M\_value’ c an be accessed via ‘constexpr std::complex::\_ComplexT std::complex ::\_\_rep() const’  
return \_\_x.\_M\_value + \_\_y.\_M\_value;  
^ ~~~~~~~  
\_\_rep()  
/home/application/intel2018u4/compilers\_and\_libraries/linux/include/complex: In function ‘std::complex std::operator-(const std::complex&, const s td::complex&)’:  
/home/application/intel2018u4/compilers\_and\_libraries/linux/include/complex:120: 20: error: ‘std::complex::\_ComplexT std::complex::\_M\_value’ is pri vate within this context  
return \_\_x.\_M\_value - \_\_y.\_M\_value;  
^ ~~~~~~~  
In file included from /home/application/intel2018u4/compilers\_and\_libraries/linu x/include/complex:30,  
from /home/shailja/.local/include/xtl/xtype\_traits.hpp:13,  
from /home/shailja/.local/include/xtl/xfunctional.hpp:16,  
from /home/shailja/.local/include/xtl/xmeta\_utils.hpp:17,  
from /home/shailja/.local/include/xtl/xsequence.hpp:20,  
from /home/shailja/.local/include/xtensor/xexception.hpp:20,  
from /home/shailja/.local/include/xtensor/xstorage.hpp:21,  
from /home/shailja/.local/include/xtensor/xbuffer\_adaptor.hpp:2 2,  
from /home/shailja/.local/include/xtensor/xtensor.hpp:19,  
from /home/shailja/openmc-develop/include/openmc/mesh.h:11,  
from /home/shailja/openmc-develop/include/openmc/simulation.h: ,  
from /home/shailja/openmc-develop/src/bank.cpp:5:  
/home/application/gcc/8.2.0/include/c++/8.2.0/complex:1215:17: note: declared pr ivate here  
\_ComplexT \_M\_value;  
^ ~~~~~~~  
…  
…  
…  
In file included from /home/shailja/.local/include/xtl/xtype\_traits.hpp:13,  
from /home/shailja/.local/include/xtl/xfunctional.hpp:16,  
from /home/shailja/.local/include/xtl/xmeta\_utils.hpp:17,  
from /home/shailja/.local/include/xtl/xsequence.hpp:20,  
from /home/shailja/.local/include/xtensor/xexception.hpp:20,  
from /home/shailja/.local/include/xtensor/xstorage.hpp:21,  
from /home/shailja/.local/include/xtensor/xbuffer\_adaptor.hpp:2 2,  
from /home/shailja/.local/include/xtensor/xtensor.hpp:19,  
from /home/shailja/openmc-develop/include/openmc/mesh.h:11,  
from /home/shailja/openmc-develop/include/openmc/simulation.h: ,  
from /home/shailja/openmc-develop/src/bank.cpp:5:  
/home/application/intel2018u4/compilers\_and\_libraries/linux/include/complex:310: 26: note: field ‘std::complex::\_ComplexT std::complex::\_M\_value’ can be accessed via ‘constexpr std::complex::\_ComplexT std::complex::\_\_rep() const’  
return \_\_x / \_\_y.\_M\_value;  
^ ~~~~~~~  
\_\_rep()  
_**make[2]: \*\*\* [CMakeFiles/libopenmc.dir/src/bank.cpp.o] Error 1**_  
_**make[1]: \*\*\* [CMakeFiles/libopenmc.dir/all] Error 2**_  
_**make: \*\*\* [all] Error 2**_

sorry it is long post but before it was working on cluster rhel 7.5 version and now I need to reinstall it but it is not working.
