OpenMC source update/installation error

Please I have openmc 13.0 installed and I was updating to openmc 13.2. However, I am having a number of issues. I did follow the installation instructions and used mamba install openmc which worked Ok and when I run mamba list I can see it updated:
openmc 0.13.2 dagmc_nompi_py311hd9f6019_102 conda-forge

But when I run openmc calculations I get the following error:

Traceback (most recent call last):
File “/home/daniel/Desktop/MY_Openmc_Runs/Uni_Work/MacroScopicX_fast/Activation_example/ploting.py”, line 2, in
import openmc.deplete
File “/home/daniel/anaconda3/envs/openmc-env/lib/python3.10/site-packages/openmc/deplete/init.py”, line 11, in
from .coupled_operator import *
File “/home/daniel/anaconda3/envs/openmc-env/lib/python3.10/site-packages/openmc/deplete/coupled_operator.py”, line 21, in
import openmc.lib
File “/home/daniel/anaconda3/envs/openmc-env/lib/python3.10/site-packages/openmc/lib/init.py”, line 32, in
_dll = CDLL(_filename)
File “/home/daniel/anaconda3/envs/openmc-env/lib/python3.10/ctypes/init.py”, line 374, in init
self._handle = _dlopen(self._name, mode)
OSError: /home/daniel/anaconda3/envs/openmc-env/lib/python3.10/site-packages/openmc/lib/libopenmc.so: undefined symbol: _ZN3fmt2v812format_errorD1Ev

I then tried to install from source by and followed all the instructions which when I type make in the build directory it compiles up to some point and give the following error:

[ 98%] Built target libopenmc
[ 99%] Linking CXX executable bin/openmc
/usr/bin/ld: lib/libopenmc.so: undefined reference to fmt::v8::detail::error_handler::on_error(char const*)' /usr/bin/ld: lib/libopenmc.so: undefined reference to fmt::v8::vformat[abi:cxx11](fmt::v8::basic_string_view, fmt::v8::basic_format_args<fmt::v8::basic_format_context<fmt::v8::appender, char> >)’
/usr/bin/ld: lib/libopenmc.so: undefined reference to int fmt::v8::detail::snprintf_float<double>(double, int, fmt::v8::detail::float_specs, fmt::v8::detail::buffer<char>&)' /usr/bin/ld: lib/libopenmc.so: undefined reference to typeinfo for fmt::v8::format_error’
/usr/bin/ld: lib/libopenmc.so: undefined reference to fmt::v8::format_error::~format_error()' /usr/bin/ld: lib/libopenmc.so: undefined reference to fmt::v8::detail::thousands_sep_result fmt::v8::detail::thousands_sep_impl(fmt::v8::detail::locale_ref)’
/usr/bin/ld: lib/libopenmc.so: undefined reference to fmt::v8::vprint(_IO_FILE*, fmt::v8::basic_string_view<char>, fmt::v8::basic_format_args<fmt::v8::basic_format_context<fmt::v8::appender, char> >)' /usr/bin/ld: lib/libopenmc.so: undefined reference to char fmt::v8::detail::decimal_point_impl(fmt::v8::detail::locale_ref)’
/usr/bin/ld: lib/libopenmc.so: undefined reference to fmt::v8::detail::dragonbox::decimal_fp<float> fmt::v8::detail::dragonbox::to_decimal<float>(float)' /usr/bin/ld: lib/libopenmc.so: undefined reference to vtable for fmt::v8::format_error’
/usr/bin/ld: lib/libopenmc.so: undefined reference to int fmt::v8::detail::snprintf_float<long double>(long double, int, fmt::v8::detail::float_specs, fmt::v8::detail::buffer<char>&)' /usr/bin/ld: lib/libopenmc.so: undefined reference to fmt::v8::vprint(fmt::v8::basic_string_view, fmt::v8::basic_format_args<fmt::v8::basic_format_context<fmt::v8::appender, char> >)’
/usr/bin/ld: lib/libopenmc.so: undefined reference to fmt::v8::detail::dragonbox::decimal_fp<double> fmt::v8::detail::dragonbox::to_decimal<double>(double)' /usr/bin/ld: lib/libopenmc.so: undefined reference to int fmt::v8::detail::format_float(double, int, fmt::v8::detail::float_specs, fmt::v8::detail::buffer&)’
/usr/bin/ld: lib/libopenmc.so: undefined reference to `int fmt::v8::detail::format_float(long double, int, fmt::v8::detail::float_specs, fmt::v8::detail::buffer&)’
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/openmc.dir/build.make:108: bin/openmc] Error 1
make[1]: *** [CMakeFiles/Makefile2:111: CMakeFiles/openmc.dir/all] Error 2
make: *** [Makefile:136: all] Error 2

Any assistance will be much appreciated.
Thank you for your expert help.

Hi Daniel, sorry you’re having issues with this. Can you share what OS you are using and also the Cmake command that you tried that led to this cmake error?

@kkiesling I am using Linux Mint 21.1 “Vera”. I have still not been able to compile it. However, I have managed to uninstall and reinstall openmc 0.13.2 using mamba. Hence, I can now run openmc successfully. The command I did run for the compilation are as follows:
mkdir build && cd build
cmake …
make
After the make command I then encountered an error.
Thank you so much for getting back to me.

1 Like

Glad you have a working version now. I am not sure on the cause of that CMake error unfortunately.

Thanks for looking at the issue.