install error openmc with dagmc

Hi everyone

I am having a little trouble installing the latest develop branch of openmc with dagmc and I was wondering if anyone else has the same issue

I have created a dockerfile (attached) to build openmc based on the travis.yml file and am building it with this command

docker build -t openmcworkshop/openmc_dagmc .

The error I am getting indicates that the target_link_libraries for dagmc were not found

CMake Error at CMakeLists.txt:45 (target_link_libraries):
Cannot specify link libraries for target “dagmc-imported” which is not
built by this project.

Has anyone else come across this or perhaps knows an answer or can see where I am going wrong

Many thanks

best

Jon

Dockerfile (2.1 KB)

Hi Jon,

I found a couple of issues in the Dockerfile you provided.

One is that the expansion of $HOME in the environment variables was empty, so the LD_LIBRARY_PATH was set to /MOAB/lib:/DAGMC/lib. The other is an issue related to the CMake version. We recently updated how DAGMC gets included in the OpenMC CMake build. It is now included as an imported target. The target_link_libraries and target_include_directories commands used to set the dependent libraries and includes don’t seem to be applicable to imported targets until CMake >= 3.12.x. Right now OpenMC requires that the CMake version is 3.3 or above. I’ll make an issue in the repo and resolve that, but for now I’ve simply updated the version of CMake in the Dockerfile.

The last detail I noticed is that the download-xs.sh script will need wget installed, so I included that in the attached Dockerfile too.

Let us know if you run into any other issues!

Patrick Shriwise
608-446-8173

Dockerfile (2.28 KB)

Thanks Patrick, it works brilliantly. I would never have caught that cmake version error

best

Jon