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

fatal error: Eigen/Dense: No such file or directory while building #2326

Open
insomniaacoma opened this issue May 13, 2024 · 11 comments
Open

Comments

@insomniaacoma
Copy link

error occurs when
[ 49%] Building CXX object openMVG/features/CMakeFiles/openMVG_features.dir/akaze/AKAZE.cpp.obj
from D:\jichuang\openMVG\src\openMVG\features\akaze\AKAZE.cpp:9:
D:/jichuang/openMVG/src/openMVG/image/image_container.hpp:12:10: fatal error: Eigen/Dense: No such file or directory
#include <Eigen/Dense>
^~~~~~~~~~~~~
compilation terminated.
make[2]: *** [openMVG/features/CMakeFiles/openMVG_features.dir/akaze/AKAZE.cpp.obj] error 1
make[1]: *** [openMVG/features/CMakeFiles/openMVG_features.dir/all] error 2
make: *** [all] error 2
Thx for any tips.

@qingzhengzhuma
Copy link
Contributor

building in which way?

@insomniaacoma
Copy link
Author

Make. After "cmake ..", I simply run make.

@pmoulon
Copy link
Member

pmoulon commented May 14, 2024

Can you clear your cmake cache and share here what is the output of CMake configure?

For some reason Eigen is not found or incomplete.

@insomniaacoma
Copy link
Author

[cmake] ** OpenMVG version: 2.1.0
[cmake] ** Build Shared libs: OFF
[cmake] ** Build OpenMVG tests: OFF
[cmake] ** Build OpenMVG softwares: ON
[cmake] ** Build OpenMVG GUI softwares: ON
[cmake] ** Build OpenMVG documentation: ON
[cmake] ** Build OpenMVG samples applications: ON
[cmake] ** Build OpenMVG openGL examples: OFF
[cmake] ** Enable code coverage generation: OFF
[cmake] ** Enable OpenMP parallelization: ON
[cmake] ** Build OpenCV+OpenMVG samples programs: OFF
[cmake] ** Use OpenCV SIFT features: OFF
[cmake] ** Use LiGT for global translation estimation: ON
[cmake]
[cmake]
[cmake]
[cmake]
[cmake] -- CEREAL: (internal)
[cmake] -- EIGEN: (external)
[cmake] -- CERES: 1.13.0 (internal)
[cmake] -- FLANN: 1.8.4 (internal)
[cmake] -- LIBTIFF: (internal)
[cmake] -- LIBPNG: (internal)
[cmake] -- LIBJPEG (internal)
[cmake] -- CLP: 1.16.10 (internal)
[cmake] -- COINUTILS: 2.10.13 (internal)
[cmake] -- OSI: (internal)
[cmake] -- LEMON: 1.3 (internal)
[cmake] -- Configuring done (14.7s)
[cmake] -- Generating done (2.1s)
I'll clear my cmake cache later and update the result.

@qingzhengzhuma
Copy link
Contributor

seems fine. where or how your eigen installed?

@insomniaacoma
Copy link
Author

D:\eigen-3.4.0\eigen-3.4.0,I downloaded eigen from https://eigen.tuxfamily.org/index.php?title=Main_Page

@insomniaacoma
Copy link
Author

I cleared my CMake cache and then performed “cmake ../src” and "make", but "fatal error: Eigen/Dense: No such file or directory" still poped.

@qingzhengzhuma
Copy link
Contributor

qingzhengzhuma commented May 20, 2024

This is weired, if you didn't tell cmake where your eigen installed or add eigen path to environment variable, cmake should use internal eigen but the log tells external eigen used. you can try to print the eigen path found by cmake.

@insomniaacoma
Copy link
Author

insomniaacoma commented May 25, 2024

i added EIGEN_ROOT to environment variable and i use gcc on windows

@insomniaacoma
Copy link
Author

i deleted env EIGEN_ROOT to disable external eigen, and this error occured :
You are attempting to build without Eigen. Please use cmake variable
-DEIGEN_INCLUDE_DIR_HINTS:STRING="PATH" or EIGEN_INCLUDE_DIR_HINTS env.
variable to a valid Eigen path. Or install last Eigen version.
Call Stack (most recent call first):
third_party/ceres-solver/CMakeLists.txt:173 (find_package)

@insomniaacoma
Copy link
Author

i rebuilt OpenMVG with MSVC and it worked though i still can't figure out the reason. Thx for your help

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