Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build issues with ASAGI #790

Open
seismo-mcfishin opened this issue Feb 8, 2023 · 5 comments
Open

build issues with ASAGI #790

seismo-mcfishin opened this issue Feb 8, 2023 · 5 comments

Comments

@seismo-mcfishin
Copy link

seismo-mcfishin commented Feb 8, 2023

Hello,

I am helping a developer build ASAGI on a cluster and when running cmake, it looks like the path to ASAGI isn't being found.

Speficically, we obtain an error that says:

Package 'asagi', required by 'virtual:world', not found

We are at the "Run cmake, and compile with:" point of this of the "Installing ASAGI" step https://seissol.readthedocs.io/en/latest/asagi.html#installing-asagi

thanks!

@sebwolf-de
Copy link
Contributor

sebwolf-de commented Feb 8, 2023

During the ASAGI build:

  • Did you specify -DCMAKE_INSTALL_PREFIX=$HOME for cmake?
  • If yes, can you please check if e.g. $HOME/lib/pkgconfig/asagi.pc exists and paste the content here.

During the SeisSol build:

  • Did you specify -DCMAKE_PREFIX_PATH=$HOME for cmake?

@krenzland
Copy link
Contributor

Asagi doesn't use the (sane) cmake FindPackage mechanism but rather uses pkg-config. So, you may need to include the file asagi.pc in the PKG_CONFIG_PATH.

@seismo-mcfishin
Copy link
Author

Thanks for the suggestions!

So we are building SeisSol as a container on a cluster.

Everything is being installed at /sw/pkgs/lsa/SeisSol/SeisSol-122022 and we made sure /sw/pkgs/lsa/SeisSol/SeisSol-122022/lib/pkgconfig/asagi.pc exists.

-DCMAKE_PREFIX_PATH=/sw/pkgs/lsa/SeisSol/SeisSol-122022 was also added.

Our new error is this after trying to re-build:

[ 84%] Linking CXX executable SeisSol_Release_dskx_4_elastic
CMakeFiles/SeisSol-bin.dir/src/DynamicRupture/Output/OutputManager.cpp.o: In function YAML::Node::Scalar[abi:cxx11]() const': OutputManager.cpp:(.text._ZNK4YAML4Node6ScalarB5cxx11Ev[_ZNK4YAML4Node6ScalarB5cxx11Ev]+0x37): undefined reference to YAML::detail::node_data::empty_scalarabi:cxx11'
/sw/pkgs/lsa/SeisSol/SeisSol-122022/lib64/libeasi.a(YAMLParser.cpp.o): In function YAML::Node::Tag[abi:cxx11]() const': YAMLParser.cpp:(.text._ZNK4YAML4Node3TagB5cxx11Ev[_ZNK4YAML4Node3TagB5cxx11Ev]+0x8e): undefined reference to YAML::detail::node_data::empty_scalarabi:cxx11'
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/SeisSol-bin.dir/build.make:600: SeisSol_Release_dskx_4_elastic] Error 1
make[1]: *** [CMakeFiles/Makefile2:160: CMakeFiles/SeisSol-bin.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 85%] Linking CXX static library libSeisSol-proxy-core.a
[ 85%] Built target SeisSol-proxy-core
make: *** [Makefile:149: all] Error 2

@sebwolf-de
Copy link
Contributor

If you want to see some details, how we installed SeisSol in a container, you can have a look at our Training repository: https://github.com/SeisSol/Training/blob/main/Dockerfile.

It seems to me that now your yaml-cpp installation is not working. How did you install yaml-cpp? You can use this patch to get some debug output about yaml-cpp during SeisSol's cmake step:

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 32905bcb..0d9573c5 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -306,6 +306,8 @@ target_include_directories(SeisSol-common-properties SYSTEM INTERFACE
 
 find_package(Eigen3 3.4 REQUIRED)
 find_package(yaml-cpp REQUIRED)
+message(${YAML_CPP_INCLUDE_DIR})
+message(${YAML_CPP_LIBRARIES})
 target_link_libraries(SeisSol-common-properties INTERFACE Eigen3::Eigen yaml-cpp)
 
 if (EIGEN3_INCLUDE_DIR)

Also, you could check your/build/directory/CMakeFiles/SeisSol-bin.dir/link.txt. It holds the information, how everything (and in particular yaml-cpp) is linked. In my case, cmake decided to link yaml-cpp directly: /usr/lib64/libyaml-cpp.so.0.6.3.

@markyoder
Copy link

If it is helpful...
I built a SeisSol enviornment in Spack. I ran into some trouble using the developers' seissol-env package (environment builds fine, but I think I run into some binutils conflicts -- which are almost certainly, when I try to compile SeisSol). But building all the dependencies in a Spack environment, producing LMOD modules, then loading those modules and compiling SeisSol works pretty well.

I build easi with asagi, then I prepend my cmake command with (amongst other variable definitions...) easi_DIR=${EASI_ROOT}/lib64/cmake/easi; I define {package_name}_ROOT in all of my Spack built modules.

Besides the asagi module setting env variables (PATH, LD_LIBRARY_PATH, etc.). I expect setting that easi variable helps cmake and friends find asagi.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants