svalinn/DAGMC

CMake Error at cmake/FindMOAB.cmake:76

EarnestTrout opened this issue · 3 comments

Hello, sorry I am new to linux and am using OpenMC for a school project. I was attempting to use DAGMC to assist with geometry but run into issues when running the cmake ../src command. I suspect it was related to an issue I was running in when I installed MOAB as the guide that used autoreconf didn't work and I had to find a cmake workaround. Here's the entire terminal up to the error, sorry for any formatting issues, still getting used to this.

(base) ernest@ernest-TUF-GAMING-FX504GD-FX80GD:~/dagmc_bld/DAGMC$ git clone https://github.com/svalinn/DAGMC
Cloning into 'DAGMC'...
remote: Enumerating objects: 26648, done.
remote: Counting objects: 100% (3264/3264), done.
remote: Compressing objects: 100% (1468/1468), done.
remote: Total 26648 (delta 1819), reused 3064 (delta 1684), pack-reused 23384
Receiving objects: 100% (26648/26648), 124.98 MiB | 6.01 MiB/s, done.
Resolving deltas: 100% (16493/16493), done.
(base) ernest@ernest-TUF-GAMING-FX504GD-FX80GD:~/dagmc_bld/DAGMC$ cd DAGMC
(base) ernest@ernest-TUF-GAMING-FX504GD-FX80GD:~/dagmc_bld/DAGMC/DAGMC$ git checkout develop
Already on 'develop'
Your branch is up to date with 'origin/develop'.
(base) ernest@ernest-TUF-GAMING-FX504GD-FX80GD:~/dagmc_bld/DAGMC/DAGMC$ git submodule update --init
Submodule 'src/pyne/pyne' (https://github.com/pyne/pyne) registered for path 'src/pyne/pyne'
Cloning into '/home/ernest/dagmc_bld/DAGMC/DAGMC/src/pyne/pyne'...
Submodule path 'src/pyne/pyne': checked out '6481df465f5814e7653b9ca0195238dfe76828d6'
(base) ernest@ernest-TUF-GAMING-FX504GD-FX80GD:~/dagmc_bld/DAGMC/DAGMC$ cd ..
(base) ernest@ernest-TUF-GAMING-FX504GD-FX80GD:~/dagmc_bld/DAGMC$ ln -s DAGMC src
(base) ernest@ernest-TUF-GAMING-FX504GD-FX80GD:~/dagmc_bld/DAGMC$ mkdir bld
(base) ernest@ernest-TUF-GAMING-FX504GD-FX80GD:~/dagmc_bld/DAGMC$ cd bld
(base) ernest@ernest-TUF-GAMING-FX504GD-FX80GD:~/dagmc_bld/DAGMC/bld$ INSTALL_PATH=$HOME/dagmc_bld/DAGMC
(base) ernest@ernest-TUF-GAMING-FX504GD-FX80GD:~/dagmc_bld/DAGMC/bld$ cmake ../src -DMOAB_DIR=$HOME/dagmc_bld/MOAB \
>                -DBUILD_TALLY=ON \
>                -DCMAKE_INSTALL_PATH=$INSTALL_PATH
-- 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
-- Found Git: /usr/bin/git (found version "2.25.1") 
-- Submodule update

-- CMAKE_BUILD_TYPE not specified, defaulting to Release
-- CMAKE_BUILD_TYPE: Release


-- MOAB_CMAKE_CONFIG: /home/ernest/dagmc_bld/MOAB/lib/cmake/MOAB/MOABConfig.cmake
-- HDF5: Using hdf5 compiler wrapper to determine C configuration
-- Found HDF5: /usr/lib/x86_64-linux-gnu/hdf5/serial/libhdf5.so;/usr/lib/x86_64-linux-gnu/libpthread.so;/usr/lib/x86_64-linux-gnu/libsz.so;/usr/lib/x86_64-linux-gnu/libz.so;/usr/lib/x86_64-linux-gnu/libdl.so;/usr/lib/x86_64-linux-gnu/libm.so (found version "1.10.4")  
-- HDF5_INCLUDE_DIRS: /usr/include/hdf5/serial
-- HDF5_LIBRARIES_SHARED: /usr/lib/x86_64-linux-gnu/hdf5/serial/libhdf5.so;/usr/lib/x86_64-linux-gnu/libpthread.so;/usr/lib/x86_64-linux-gnu/libsz.so;/usr/lib/x86_64-linux-gnu/libz.so;/usr/lib/x86_64-linux-gnu/libdl.so;/usr/lib/x86_64-linux-gnu/libm.so
-- HDF5_LIBRARIES_STATIC: /usr/lib/x86_64-linux-gnu/hdf5/serial/libhdf5.a;/usr/lib/x86_64-linux-gnu/libpthread.a;/usr/lib/x86_64-linux-gnu/libsz.a;/usr/lib/x86_64-linux-gnu/libz.a;/usr/lib/x86_64-linux-gnu/libdl.a;/usr/lib/x86_64-linux-gnu/libm.a
-- MOAB_INCLUDE_DIRS: /home/ernest/dagmc_bld/MOAB/include;/usr/include/eigen3
-- MOAB_LIBRARY_DIRS: /home/ernest/dagmc_bld/MOAB/lib
-- MOAB_LIBRARIES_SHARED: /home/ernest/dagmc_bld/MOAB/lib/libMOAB.so
-- MOAB_LIBRARIES_STATIC: MOAB_LIBRARIES_STATIC-NOTFOUND
CMake Error at cmake/FindMOAB.cmake:76 (message):
  Could not find MOAB
Call Stack (most recent call first):
  CMakeLists.txt:62 (find_package)


-- Configuring incomplete, errors occurred!
See also "/home/ernest/dagmc_bld/DAGMC/bld/CMakeFiles/CMakeOutput.log".

Hi @EarnestTrout, great to hear you're using these tools in your coursework! Thanks for trying them out.

Often when we build DAGMC, we search for both the shared and static versions of the MOAB libraries. The static MOAB libraries are only necessary if one of the BUILD_STATIC_LIBS and BUILD_STATIC_EXE flags are on. Could you try turning these off by adding the following flags to your CMake command?

-DBUILD_STATIC_LIBS=OFF -DBUILD_STATIC_EXE=OFF

@pshriwise That worked perfectly, thank you so much for the help!!! I got through everything else without any other problems.

@EarnestTrout great to hear! Good luck and please let us know if you run into any other issues.

Another nice resource should you run into other issues setting up models etc. as you proceed is the DAGMC Google group.