Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Mac - cannot find Eigen3 [closed]

I am trying to build TheiaSfM.

I build it with this command

cmake -DBUILD_DOCUMENTATION=ON -DEIGEN_INCLUDE_DIR=$EIGEN_INCLUDE_DIR ..

where I set EIGEN_INCLUDE_DIR=/usr/local/Cellar/eigen/3.2.9/include/. This is the path to Eigen in my computer.

But I got this error:

CMake Error at cmake/FindEigen.cmake:77 (message):
  Failed to find Eigen - Could not find file:
  /usr/local/Cellar/eigen/3.2.9/include/Eigen/src/Core/util/Macros.h
  containing version information in Eigen install located at:
  /usr/local/Cellar/eigen/3.2.9/include.
Call Stack (most recent call first):
  cmake/FindEigen.cmake:123 (eigen_report_not_found)
  CMakeLists.txt:108 (find_package)

I guess this is trivial, but I already tried to search but cannot really understand the problem. I am really new to this, so, any help would be really appreciated.

like image 655
Hafiz Hilman Mohammad Sofian Avatar asked May 06 '26 17:05

Hafiz Hilman Mohammad Sofian


1 Answers

According to your error message, your program cannot find where the dir "Eigen" is. I guess it is in

/usr/local/Cellar/eigen/3.2.9/

Have you looked if there really is a sub-dir "include" in the above path? Official source code does not have this sub-dir.


So now you find that the dir Eigen is in

/usr/local/Cellar/eigen/3.2.9/include/eigen3

As for the version issue, you could go to Eigen's website and download the desired version.

http://eigen.tuxfamily.org/index.php?title=Main_Page

like image 174
kangshiyin Avatar answered May 09 '26 02:05

kangshiyin



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!