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

Unable to find Eigen #172

Open
pmott91 opened this issue May 4, 2020 · 3 comments
Open

Unable to find Eigen #172

pmott91 opened this issue May 4, 2020 · 3 comments

Comments

@pmott91
Copy link

pmott91 commented May 4, 2020

I am trying to install Libint on Summit. The cmake process keeps derailing when the program tries to find Eigen3. I get the following warning after doing mkdir build, cd build, cmake .. :

**CMake Warning at CMakeLists.txt:88 (find_package):
By not providing "FindEigen3.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "Eigen3", but
CMake did not find one.

Could not find a package configuration file provided by "Eigen3" with any
of the following names:

Eigen3Config.cmake
eigen3-config.cmake

Add the installation prefix of "Eigen3" to CMAKE_PREFIX_PATH or set
"Eigen3_DIR" to a directory containing one of the above files. If "Eigen3"
provides a separate development package or SDK, be sure it has been
installed.

CMake Error at CMakeLists.txt:108 (message):
C++ API cannot be built without Eigen3; configure (via CMake) and install
Eigen3 and add the install prefix to CMAKE_PREFIX_PATH, or add
-DREQUIRE_CXX_API=OFF to the CMake command line if the C++ API is not
required**

I tried setting the environment variable Eigen3_Dir=/ccs/home/plot/software/Eigen3/cmake where the .cmake files mentioned are installed.

I tried appending /ccs/home/plot/software/Eigen3/cmake/FindEigen3.cmake to the CMAKE_MODULEPATH

I have not been able to figure out how to edit CMAKE_PREFIX_PATH.

Any help in pointing cmake to the location of Eigen3 would be helpful.

Thanks,
Paul

@evaleev
Copy link
Owner

evaleev commented May 4, 2020

@pmott91 you mentioned /ccs/home/plot/software/Eigen3/cmake contains the aforementioned files I presume you meant it contains FindEigen3.cmake? It needs to find Eigen3Config.cmake or eigen3-config.cmake. Due to nice built-in footguns Eigen's cmake module file (namely, FindEigen3.cmake) is not considered, Libint only accepts Eigen install produced by via cmake configuration. Please let me know if you have installed Eigen yourself, and if yes, whether you used cmake. It should be sufficient to add Eigen's install prefix (the dir specified to CMAKE_INSTALL_PREFIX when configuring Eigen) dir to CMAKE_PREFIX_PATH. E.g. add /ccs/home/evaleev/code/install/eigen to CMAKE_PREFIX_PATH (that dir should be world readable)

@pmott91
Copy link
Author

pmott91 commented May 29, 2020

@evaleev The path does lead to the file FindEigen3.cmake. There is a file called Eigen3Config.cmake.in in that directory as well. But I have not used cmake to install Eigen. My understanding is that Eigen is simply a collection of header files that need to be downloaded. Is a cmake build necessary?

@xiki-tempula
Copy link

xiki-tempula commented Nov 26, 2021

@evaleev This is how I solve the problem.
Yoy don't need to install Eigen3 but you still to cmake it.

For me this means

cd eigen-3.4.0
mkdir build
cd build
cmake ..

which would generate Eigen3Config.cmake in eigen-3.4.0/build.
Then you could point -DCMAKE_MODULE_PATH=~/src/eigen-3.4.0/build during the cmake.

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

3 participants