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

Compile Problem : Can't find Eigen "Eigen/Core: No such file or directory" #9

Open
illusionaireal opened this issue Mar 23, 2022 · 1 comment

Comments

@illusionaireal
Copy link

illusionaireal commented Mar 23, 2022

The package can't locate my Eigen in my computer.

after
$ catkin_make -DCATKIN_WHITELIST_PACKAGES="numpy_eigen"

My system is Ubuntu 18.04 ,and the ros version is melodic.

The error I get :

####
#### Running command: "make cmake_check_build_system" in "/home/***/catkin_test/build"
####
CMake Warning (dev) in CMakeLists.txt:
  No project() command is present.  The top-level CMakeLists.txt file must
  contain a literal, direct call to the project() command.  Add a line of
  code such as

    project(ProjectName)

  near the top of the file, but after cmake_minimum_required().

  CMake is pretending there is a "project(Project)" command on the first
  line.
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Deprecation Warning at CMakeLists.txt:4 (cmake_minimum_required):
  Compatibility with CMake < 2.8.12 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.


-- Using CATKIN_DEVEL_PREFIX: /home/***/catkin_test/devel
-- Using CMAKE_PREFIX_PATH: /home/***/catkin_test/devel;/opt/ros/melodic
-- This workspace overlays: /home/***/catkin_test/devel;/opt/ros/melodic
-- Found PythonInterp: /usr/bin/python3 (found suitable version "3.6.9", minimum required is "2") 
-- Using PYTHON_EXECUTABLE: /usr/bin/python3
-- Using Debian Python package layout
-- Using empy: /usr/bin/empy
-- Using CATKIN_ENABLE_TESTING: ON
-- Call enable_testing()
-- Using CATKIN_TEST_RESULTS_DIR: /home/***/catkin_test/build/test_results
-- Found gtest sources under '/usr/src/googletest': gtests will be built
-- Found gmock sources under '/usr/src/googletest': gmock will be built
CMake Deprecation Warning at /usr/src/googletest/CMakeLists.txt:1 (cmake_minimum_required):
  Compatibility with CMake < 2.8.12 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.


CMake Deprecation Warning at /usr/src/googletest/googlemock/CMakeLists.txt:41 (cmake_minimum_required):
  Compatibility with CMake < 2.8.12 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.


CMake Deprecation Warning at /usr/src/googletest/googletest/CMakeLists.txt:48 (cmake_minimum_required):
  Compatibility with CMake < 2.8.12 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.


-- Found PythonInterp: /usr/bin/python3 (found version "3.6.9") 
-- Using Python nosetests: /usr/bin/nosetests
-- catkin 0.7.29
-- BUILD_SHARED_LIBS is on
-- BUILD_SHARED_LIBS is on
-- Using CATKIN_WHITELIST_PACKAGES: numpy_eigen
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-- ~~  traversing 1 packages in topological order:
-- ~~  - numpy_eigen
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-- +++ processing catkin package: 'numpy_eigen'
-- ==> add_subdirectory(numpy_eigen)
CMake Deprecation Warning at numpy_eigen/CMakeLists.txt:1 (cmake_minimum_required):
  Compatibility with CMake < 2.8.12 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.


-- Found Boost: /usr/include (found version "1.65.1") found components: system 
-- Found PythonInterp: /usr/bin/python3 (found suitable version "3.6.9", minimum required is "3") 
-- Found numpy include path: '/home/***/.local/lib/python3.6/site-packages/numpy/core/include'
-- Found numpy/arrayobject.h in /home/***/.local/lib/python3.6/site-packages/numpy/core/include. Keeping it as NUMPY_INCLUDE_DIR.
-- Found Boost: /usr/include (found version "1.65.1") found components: python 
-- Found numpy include path: '/home/***/.local/lib/python3.6/site-packages/numpy/core/include'
-- Found numpy/arrayobject.h in /home/***/.local/lib/python3.6/site-packages/numpy/core/include. Keeping it as NUMPY_INCLUDE_DIR.
-- Marking HEADER FILES in "include" folder of package "numpy_eigen" for installation
-- Configuring done
-- Generating done
-- Build files have been written to: /home/***/catkin_test/build

......
[ 21%] Building CXX object numpy_eigen/CMakeFiles/numpy_eigen_test.dir/src/autogen_test_module/numpy_eigen_test_module.cpp.o
[ 21%] Building CXX object numpy_eigen/CMakeFiles/numpy_eigen_test.dir/src/autogen_test_module/test_float.cpp.o
[ 21%] Building CXX object numpy_eigen/CMakeFiles/numpy_eigen_test.dir/src/autogen_test_module/test_int.cpp.o
[ 28%] Building CXX object numpy_eigen/CMakeFiles/numpy_eigen_test.dir/src/autogen_test_module/test_double.cpp.o
[ 35%] Building CXX object numpy_eigen/CMakeFiles/numpy_eigen_test.dir/src/autogen_test_module/test_uchar.cpp.o
[ 42%] Building CXX object numpy_eigen/CMakeFiles/numpy_eigen_test.dir/src/autogen_test_module/test_long.cpp.o
/home/***/catkin_test/src/numpy_eigen/src/autogen_test_module/test_int.cpp:1:10: fatal error: Eigen/Core: No such file or directory
 #include <Eigen/Core>
          ^~~~~~~~~~~~
In file included from /home/***/catkin_test/src/numpy_eigen/src/autogen_test_module/numpy_eigen_test_module.cpp:2:0:
/home/***/catkin_test/src/numpy_eigen/include/numpy_eigen/boost_python_headers.hpp:23:10: fatal error: Eigen/Core: No such file or directory
 #include <Eigen/Core>
          ^~~~~~~~~~~~
compilation terminated.
numpy_eigen/CMakeFiles/numpy_eigen.dir/build.make:131: recipe for target 'numpy_eigen/CMakeFiles/numpy_eigen.dir/src/autogen_module/import_uchar.cpp.o' failed
make[2]: *** [numpy_eigen/CMakeFiles/numpy_eigen.dir/src/autogen_module/import_uchar.cpp.o] Error 1
CMakeFiles/Makefile2:476: recipe for target 'numpy_eigen/CMakeFiles/numpy_eigen.dir/all' failed
make[1]: *** [numpy_eigen/CMakeFiles/numpy_eigen.dir/all] Error 2
Makefile:145: recipe for target 'all' failed
make: *** [all] Error 2
Invoking "make -j32 -l32" failed
@HannesSommer
Copy link
Contributor

I'm assuming you have eigen_catkin in your workspace (as required here https://github.com/ethz-asl/numpy_eigen/blob/master/package.xml#L13 ), because without it catkin_simple should fail earlier.

Is that assumption correct? It confuses me that catkin_make doesn't seem to "traverse" eigen_catkin as well. That may be normal but could also be a bad side effect of the CATKIN_WHITELIST_PACKAGES. What happens if you whitelist eigen_catkin as well?

If that doesn't fix it, your problem seems to actually indicate a bug in eigen_catkin because it should make this one find the Eigen headers.

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

2 participants