# OpenMC source installation error

**URL:** <https://openmc.discourse.group/t/openmc-source-installation-error/2376>\
**Category:** User Support\
**Created:** [October 21, 2022, 6:05pm UTC](https://openmc.discourse.group/t/openmc-source-installation-error/2376 "2022-10-21T18:05:51Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Juan\_GaliciaA](https://avatars.discourse-cdn.com/v4/letter/j/ccd318/32.png) [@Juan\_GaliciaA](https://openmc.discourse.group/u/Juan_GaliciaA)\
**Post date:** [October 21, 2022, 6:05pm UTC](https://openmc.discourse.group/t/openmc-source-installation-error/2376/1 "2022-10-21T18:05:51Z")

</div>

Hello everyone, I am trying to install OpenMC from source using ubuntu bash (version 20.04) on windows 10. Following the steps, I am getting the following when arriving to “make”:

[98%] Linking CXX executable bin/openmc  
/usr/bin/ld: lib/libopenmc.so: undefined reference to `int fmt::v6::internal::snprintf_float<long double>(long double, int, fmt::v6::internal::float_specs, fmt::v6::internal::buffer<char>&)' /usr/bin/ld: lib/libopenmc.so: undefined reference to `fmt::v6::format\_error::~format\_error()’  
/usr/bin/ld: lib/libopenmc.so: undefined reference to `typeinfo for fmt::v6::format_error' /usr/bin/ld: lib/libopenmc.so: undefined reference to `fmt::v6::vprint(fmt::v6::basic\_string\_view, fmt::v6::format\_args)’  
/usr/bin/ld: lib/libopenmc.so: undefined reference to `fmt::v6::internal::error_handler::on_error(char const*)' /usr/bin/ld: lib/libopenmc.so: undefined reference to `char fmt::v6::internal::thousands\_sep\_impl(fmt::v6::internal::locale\_ref)’  
/usr/bin/ld: lib/libopenmc.so: undefined reference to `fmt::v6::internal::basic_data<void>::hex_digits' /usr/bin/ld: lib/libopenmc.so: undefined reference to `fmt::v6::vprint(\_IO\_FILE\*, fmt::v6::basic\_string\_view, fmt::v6::format\_args)’  
/usr/bin/ld: lib/libopenmc.so: undefined reference to `fmt::v6::internal::basic_data<void>::digits' /usr/bin/ld: lib/libopenmc.so: undefined reference to `int fmt::v6::internal::snprintf\_float(double, int, fmt::v6::internal::float\_specs, fmt::v6::internal::buffer&)’  
/usr/bin/ld: lib/libopenmc.so: undefined reference to `fmt::v6::internal::basic_data<void>::signs' /usr/bin/ld: lib/libopenmc.so: undefined reference to `fmt::v6::internal::basic\_data::zero\_or\_powers\_of\_10\_32’  
/usr/bin/ld: lib/libopenmc.so: undefined reference to `int fmt::v6::internal::format_float<double>(double, int, fmt::v6::internal::float_specs, fmt::v6::internal::buffer<char>&)' /usr/bin/ld: lib/libopenmc.so: undefined reference to `int fmt::v6::internal::format\_float(long double, int, fmt::v6::internal::float\_specs, fmt::v6::internal::buffer&)’  
/usr/bin/ld: lib/libopenmc.so: undefined reference to `fmt::v6::internal::basic_data<void>::zero_or_powers_of_10_64' /usr/bin/ld: lib/libopenmc.so: undefined reference to `std::\_\_cxx11::basic\_string\<char, std::char\_traits, std::allocator \> fmt::v6::internal::grouping\_impl(fmt::v6::internal::locale\_ref)’  
/usr/bin/ld: lib/libopenmc.so: undefined reference to `char fmt::v6::internal::decimal_point_impl<char>(fmt::v6::internal::locale_ref)' /usr/bin/ld: lib/libopenmc.so: undefined reference to `vtable for fmt::v6::format\_error’  
collect2: error: ld returned 1 exit status  
make[2]: \*\*\* [CMakeFiles/openmc.dir/build.make:96: bin/openmc] Error 1  
make[1]: \*\*\* [CMakeFiles/Makefile2:216: CMakeFiles/openmc.dir/all] Error 2  
make: \*\*\* [Makefile:130: all] Error 2

I do not know how to proceed with this. Hope you can help me and guide me to have a succesfull installation. Thank you.

Regards

Juan Galicia Aragón

---

<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:46am UTC](https://openmc.discourse.group/t/openmc-source-installation-error/2376/2 "2022-10-29T01:46:47Z")

</div>

Hi @Juan_GaliciaA and welcome to the community! Sorry to hear you’re running into trouble getting OpenMC compiled. Can you paste the output of running `cmake`? The errors shown here are related to fmtlib, which is a dependency we rely on for writing output, and the output from `cmake` will give some information about where it is finding `fmtlib`.

---

<div class="post-metadata">

**Author:** ![Juan\_GaliciaA](https://avatars.discourse-cdn.com/v4/letter/j/ccd318/32.png) [@Juan\_GaliciaA](https://openmc.discourse.group/u/Juan_GaliciaA)\
**Post date:** [October 29, 2022, 5:30pm UTC](https://openmc.discourse.group/t/openmc-source-installation-error/2376/3 "2022-10-29T17:30:40Z")

</div>

Hi Paul, thank you for your reply. Of course, I get the following after running cmake:

– The C compiler identification is GNU 9.3.0  
– The CXX compiler identification is GNU 9.3.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  
– No build type selected, defaulting to RelWithDebInfo  
– Found ZLIB: /usr/lib/x86\_64-linux-gnu/libz.so (found version “1.2.11”)  
– Found PNG: /usr/lib/x86\_64-linux-gnu/libpng.so (found version “1.6.37”)  
– HDF5: Using hdf5 compiler wrapper to determine C configuration  
– Found HDF5: /home/jgalicia/miniconda3/lib/libhdf5.so;/usr/lib/x86\_64-linux-gnu/librt.so;/usr/lib/x86\_64-linux-gnu/libpthread.so;/home/jgalicia/miniconda3/lib/libz.so;/usr/lib/x86\_64-linux-gnu/libdl.so;/usr/lib/x86\_64-linux-gnu/libm.so (found version “1.10.6”) 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: /usr/bin/git (found version “2.25.1”)  
– Submodule update  
– Did not find pugixml, will use submodule instead  
– Did not find fmt, will use submodule instead  
– Module support is disabled.  
– Version: 8.0.1  
– Build type: RelWithDebInfo  
– CXX\_STANDARD: 11  
– Performing Test has\_std\_11\_flag  
– Performing Test has\_std\_11\_flag - Success  
– Performing Test has\_std\_0x\_flag  
– Performing Test has\_std\_0x\_flag - Success  
– Performing Test SUPPORTS\_USER\_DEFINED\_LITERALS  
– Performing Test SUPPORTS\_USER\_DEFINED\_LITERALS - Success  
– Performing Test FMT\_HAS\_VARIANT  
– Performing Test FMT\_HAS\_VARIANT - Success  
– Required features: cxx\_variadic\_templates  
– Looking for strtod\_l  
– Looking for strtod\_l - not found  
– Did not find xtensor, will use submodule instead  
– xtl v0.6.13  
– Building xtensor v0.21.3  
– Found xtl v0.6.13  
– Did not find gsl-lite, will use submodule instead  
– Project ‘gsl\_lite’, package ‘gsl-lite’ version: ‘0.36.1’  
– Configuring done  
CMake Warning at CMakeLists.txt:501 (add\_executable):  
Cannot generate a safe runtime search path for target openmc because files  
in some directories may conflict with libraries in implicit directories:

```
runtime library [libpng16.so.16] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
  /home/jgalicia/miniconda3/lib
runtime library [libz.so.1] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
  /home/jgalicia/miniconda3/lib

```

Some of these libraries may not be found correctly.

CMake Warning at CMakeLists.txt:412 (add\_library):  
Cannot generate a safe runtime search path for target libopenmc because  
files in some directories may conflict with libraries in implicit  
directories:

```
runtime library [libpng16.so.16] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
  /home/jgalicia/miniconda3/lib
runtime library [libz.so.1] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
  /home/jgalicia/miniconda3/lib

```

Some of these libraries may not be found correctly.

– Generating done  
– Build files have been written to: /mnt/c/openmc/build

Thank you very much again

Regards

Juan Galicia Aragón

---

<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, 8:33pm UTC](https://openmc.discourse.group/t/openmc-source-installation-error/2376/4 "2022-11-23T20:33:36Z")

</div>

I don’t see anything obviously wrong here. It looks like there is no pre-existing installation of fmtlib and OpenMC is trying to use it’s own internal version. I would suggest updating your version of OpenMC from source (`git pull`) and trying again to see if that gets rid of the build errors.
