OpenMC Install on Mac from source

I am currently trying to install OpenMC from source on a Mac using Terminal. Once I run the command ‘make’, I receive an error shown below. Has anyone been able to get it fully installed on a Mac? Thank you for the assistance.

/Users/daniel/projects/openmc/src/reaction.cpp:91:68: error: no member named 'front' in 'gsl::span<const double>' int i_low = lower_bound_index(grid.cbegin(), grid.cend(), energy.front()); ~~~~~~ ^ 1 error generated. make[2]: *** [CMakeFiles/libopenmc.dir/src/reaction.cpp.o] Error 1 make[2]: *** Waiting for unfinished jobs.... make[1]: *** [CMakeFiles/libopenmc.dir/all] Error 2 make: *** [all] Error 2

@dracz Could you paste the output from when you run cmake? Based on the error, I’m wondering if it’s picking up an old version of gsl-lite, which is a library we rely on.

I first ran cmake using the ‘Quick Install Guide’ process suggested via OpenMC documentation. Then I used installation advice from an individual who had installation notes which could be out-dated and added HDF5_ROOT=/Users/daniel/hdf5-install cmake … . The output then ran with no errors. Once I ran the ‘make’ command, the error showed at 43% of running. I greatly appreciate you taking the time to look into this and hopefully there could be a solution to this issue.

So it looks like when you run cmake, it’s picking up a version of gsl-lite installed in /usr/local/lib/cmake/gsl-lite, namely version 0.35.5. However, the front() method on gsl::span wasn’t added until version 0.37.0, hence the compile error you’re seeing. I think you’ll need either need to 1) install a new version of gsl-lite in /usr/local, or 2) remove that installation and let OpenMC use its internal version of gsl-lite.