hku-mars / loam_livox

A robust LiDAR Odometry and Mapping (LOAM) package for Livox-LiDAR
GNU General Public License v2.0
1.43k stars 435 forks source link

'catkin_make 'erros about eigen. my eigen version is 3.3.7, but some troubles happened. #76

Open Doublehes opened 3 years ago

Doublehes commented 3 years ago

In file included from /usr/local/include/boost/signals2/detail/null_output_iterator.hpp:14:0, from /usr/local/include/boost/signals2/connection.hpp:22, from /usr/local/include/boost/signals2/signal.hpp:22, from /usr/local/include/boost/signals2.hpp:19, from /usr/include/pcl-1.7/pcl/io/boost.h:79, from /usr/include/pcl-1.7/pcl/io/file_io.h:43, from /usr/include/pcl-1.7/pcl/io/pcd_io.h:44, from /opt/ros/kinetic/include/pcl_conversions/pcl_conversions.h:70, from /home/vpc/catkin_ws/src/livox_horizon_loam/src/laserOdometry.cpp:43: /usr/local/include/boost/function_output_iterator.hpp:14:102: note: #pragma message: This header is deprecated. Use <boost/iterator/function_output_iterator.hpp> instead. In file included from /usr/local/include/eigen3/Eigen/Eigenvalues:35:0, from /usr/local/include/eigen3/Eigen/Dense:7, from /home/vpc/catkin_ws/src/livox_horizon_loam/src/laserOdometry.cpp:50: /usr/local/include/eigen3/Eigen/src/misc/RealSvd2x2.h:19:6: error: redefinition of ‘template<class MatrixType, class RealScalar, class Index> void Eigen::internal::real_2x2_jacobi_svd(const MatrixType&, Index, Index, Eigen::JacobiRotation, Eigen::JacobiRotation)’ void real_2x2_jacobi_svd(const MatrixType& matrix, Index p, Index q, ^ In file included from /usr/include/eigen3/Eigen/SVD:36:0, from /usr/include/eigen3/Eigen/Geometry:15, from /usr/include/pcl-1.7/pcl/point_cloud.h:47, from /usr/include/pcl-1.7/pcl/pcl_base.h:53, from /usr/include/pcl-1.7/pcl/filters/filter.h:43, from /usr/include/pcl-1.7/pcl/filters/voxel_grid.h:44, from /home/vpc/catkin_ws/src/livox_horizon_loam/src/laserOdometry.cpp:39: /usr/include/eigen3/Eigen/src/SVD/JacobiSVD.h:405:6: note: ‘template<class MatrixType, class RealScalar, class Index> void Eigen::internal::real_2x2_jacobi_svd(const MatrixType&, Index, Index, Eigen::JacobiRotation, Eigen::JacobiRotation)’ previously declared here void real_2x2_jacobi_svd(const MatrixType& matrix, Index p, Index q, ^ livox_horizon_loam/CMakeFiles/laserOdometry.dir/build.make:62: recipe for target 'livox_horizon_loam/CMakeFiles/laserOdometry.dir/src/laserOdometry.cpp.o' failed make[2]: [livox_horizon_loam/CMakeFiles/laserOdometry.dir/src/laserOdometry.cpp.o] Error 1 CMakeFiles/Makefile2:3169: recipe for target 'livox_horizon_loam/CMakeFiles/laserOdometry.dir/all' failed make[1]: [livox_horizon_loam/CMakeFiles/laserOdometry.dir/all] Error 2 Makefile:138: recipe for target 'all' failed make: *** [all] Error 2 Invoking "make -j4 -l4" failed

Could you please give me some advice?Thanks!

h-k8888 commented 3 years ago

I met the same problem. It seems that there are 2 different versions of Eigen in your system. Trying to delete one of them(my advice is /usr/include/eigen3/Eigen/), you may solve the problem.