makefiledebianeigenlibigl

Error installing a .pro file, with Eigen, libigl dependencies on Debian


Im trying to install a .pro file using 'make' on Debian-9. The dependencies are Qt5, GSL, libigl, Eigen and Boost, which their latest versions are installed. I used the following:

# cd build
# qmake -qt=qt5 ../qt/myfile.pro
# make

And here is the error I get:

../libigl/include/igl/copyleft/boolean/../cgal/order_facets_around_edge.cpp:203:36: error: ‘Eigen::PlainObjectBase<Derived>::PlainObjectBase() [with Derived = Eigen::Matrix<int, -1, 1>]’ is protected within this context
   Eigen::PlainObjectBase<DerivedI> positive_order, negative_order;
                                    ^~~~~~~~~~~~~~
In file included from /usr/local/include/eigen3/Eigen/Core:457:0,
                 from ../libigl/include/igl/copyleft/boolean/mesh_boolean.h:15,
                 from ../src/mesh.cpp:12:
/usr/local/include/eigen3/Eigen/src/Core/PlainObjectBase.h:484:25: note: declared protected here
     EIGEN_STRONG_INLINE PlainObjectBase() : m_storage()
                         ^~~~~~~~~~~~~~~
In file included from ../libigl/include/igl/copyleft/boolean/../cgal/order_facets_around_edge.h:75:0,
                 from ../libigl/include/igl/copyleft/boolean/../cgal/propagate_winding_numbers.cpp:18,
                 from ../libigl/include/igl/copyleft/boolean/../cgal/propagate_winding_numbers.h:101,
                 from ../libigl/include/igl/copyleft/boolean/mesh_boolean.cpp:13,
                 from ../libigl/include/igl/copyleft/boolean/mesh_boolean.h:172,
                 from ../src/mesh.cpp:12:
../libigl/include/igl/copyleft/boolean/../cgal/order_facets_around_edge.cpp:203:52: error: ‘Eigen::PlainObjectBase<Derived>::PlainObjectBase() [with Derived = Eigen::Matrix<int, -1, 1>]’ is protected within this context
   Eigen::PlainObjectBase<DerivedI> positive_order, negative_order;
                                                    ^~~~~~~~~~~~~~
In file included from /usr/local/include/eigen3/Eigen/Core:457:0,
                 from ../libigl/include/igl/copyleft/boolean/mesh_boolean.h:15,
                 from ../src/mesh.cpp:12:
/usr/local/include/eigen3/Eigen/src/Core/PlainObjectBase.h:484:25: note: declared protected here
     EIGEN_STRONG_INLINE PlainObjectBase() : m_storage()
                         ^~~~~~~~~~~~~~~
Makefile:891: recipe for target 'mesh.o' failed

Could someone please kindly help me solving the issue here?


Solution

  • This line

    Eigen::PlainObjectBase<DerivedI> positive_order, negative_order;
    

    won't compile. It may have once compiled for older Eigen versions -- but this is not how Eigen-Base types are supposed to be used, so it likely was never working as intended (that is also the reason why Base-constructors where made protected in Eigen).

    However, that line does not exist in the most recent order_facets_around_edge.cpp, so you appear to be using an outdated libigl version.