Hi everyone,
That’s quite a long time time I struggle with the creation of a conda environment to compile OpenMC on MacOs without utilizing brew. I don’t like brew because I must work with a lot of different environments & code and it creates issues with conda.
So here is how I did it, if it can help some of you:
conda create -n openmc-dev compilers=1.9.0 cmake hdf5 python libpng
git clone --recurse-submodules https://github.com/openmc-dev/openmc.git
cd openmc
mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX=/path/to/conda/envs/openmc-dev ..
make
make install
cd ..
python -m pip install .
On more recent versions of compilers, clang is version 19 and is not able to pass cmake compilation checks.