ethz-asl / kalibr

The Kalibr visual-inertial calibration toolbox
Other
4.39k stars 1.41k forks source link

install error #404

Closed Jxpenggf closed 2 years ago

Jxpenggf commented 3 years ago

/usr/local/include/eigen3/Eigen/src/Core/util/Macros.h:885:23: error: ‘Eigen::MatrixBase::~MatrixBase() [with Derived = Eigen::Matrix<double, -1, 1>]’ is protected EIGEN_DEVICE_FUNC ~Derived() = default; /usr/include/boost/python/detail/destroy.hpp:33:9: error: within this context p->~T(); ^ How to slove it

Xiangyf18 commented 3 years ago

I sovle it finally by removing eigen3 and boost (which were both installed from source code ) and then , use “sudo apt-get install libeigen3-dev libboost-all-dev ” to reinstall them .

YixFeng commented 2 years ago

You can find a file named 'MatrixBase.h' in the path '/usr/local/include/eigen3/Eigen/src/Core/' or '/usr/include/eigen3/Eigen/src/Core/'. (I find it in the first place.) Then, the key step is to modify 'protected' to 'public' on line 466.

protected: EIGEN_DEFAULT_COPY_CONSTRUCTOR(MatrixBase)
EIGEN_DEFAULT_EMPTY_CONSTRUCTOR_AND_DESTRUCTOR(MatrixBase)

TO

public: EIGEN_DEFAULT_COPY_CONSTRUCTOR(MatrixBase)
EIGEN_DEFAULT_EMPTY_CONSTRUCTOR_AND_DESTRUCTOR(MatrixBase)
readsa commented 2 years ago

This change is submitted in Eigen 3.3.8. A temporary workaround is:

  1. Download eigen repository older than 3.3.8.
  2. Install to a specified directory, like: /path/to/old/eigen.
  3. When building kalibr, add this cmake arg: -DCMAKE_FIND_ROOT_PATH=/path/to/old/eigen The build command is like: catkin build -DCMAKE_BUILD_TYPE=Release -DCMAKE_FIND_ROOT_PATH=/path/to/old/eigen -j4
goldbattle commented 2 years ago

Can you see if PR https://github.com/ethz-asl/kalibr/pull/515 fixes this issue for you?

readsa commented 2 years ago

@goldbattle Cool! It works for me. (Ubuntu 18.04, with opencv4 and eigen 3.4.0 installed) And much less warnings.