在Debian上安装带有Eigen和libigl依赖项的.pro文件时出错。

huangapple go评论85阅读模式
英文:

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

问题

我正在尝试在Debian-9上使用'make'安装一个.pro文件。依赖项包括Qt5、GSL、libigl、Eigen和Boost,它们的最新版本已安装。

我使用了以下命令:

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

以下是我遇到的错误:

../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

请问是否有人可以帮助我解决这个问题?

英文:

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?

答案1

得分: 1

这一行:

Eigen::PlainObjectBase<DerivedI> positive_order, negative_order;

无法编译通过。它可能曾经可以编译通过旧版本的Eigen,但这不是Eigen-Base类型的正确用法,因此它很可能从未按照预期工作过(这也是为什么在Eigen中将Base构造函数设为受保护的原因)。

然而,在最新的 order_facets_around_edge.cpp 中不存在这行代码,所以您似乎正在使用一个过时的libigl版本。

英文:

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.

huangapple
  • 本文由 发表于 2020年1月7日 02:20:42
  • 转载请务必保留本文链接:https://go.coder-hub.com/59617032.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定