Closed ShMonem closed 3 months ago
I got help from a colleague fixing it, following are the steps:
Edit CMake/Common.cmake and replace
`set (CMAKE_CXX_STANDARD 11)`
to
`set (CMAKE_CXX_STANDARD 14)`
cd build
cmake -DCMAKE_BUILD_TYPE=Release -DUSE_PYTHON_BINDINGS=On
make
after the first error edit build/extern/Discregrid/src/Ext_Discregrid/CMakeLists.txt and change
`set (CMAKE_CXX_STANDARD 11)`
to
`set (CMAKE_CXX_STANDARD 14)`
futhermore edit build/extern/Discregrid/src/Ext_Discregrid/discregrid/src/cubic_lagrange_discrete_grid.cpp and add
`#include <cassert>`
to the list of include files. (somewhere around line 14)
The build the project as usual.
I am trying to build following the steps at https://positionbaseddynamics.readthedocs.io/en/latest/build_from_source.html at the
make
step it crashs and I can see many eigen3 related errors. I appreciate some help, the following is the last bit of the error but along the build, I cane see many similar issues. Also tried building both from terminal and using vscode, got same error:` /usr/local/include/eigen3/Eigen/src/Core/CwiseBinaryOp.h:107:49: error: using invalid field ‘Eigen::CwiseBinaryOp<BinaryOp, Lhs, Rhs>::m_rhs’ In file included from /usr/local/include/eigen3/Eigen/Core:296, from /usr/local/include/eigen3/Eigen/Dense:1, from /home/monem/PhD_projects/PositionBasedDynamics/build/extern/Discregrid/src/Ext_Discregrid/discregrid/include/Discregrid/discrete_grid.hpp:6, from /home/monem/PhD_projects/PositionBasedDynamics/build/extern/Discregrid/src/Ext_Discregrid/discregrid/src/discrete_grid.cpp:1: /usr/local/include/eigen3/Eigen/src/Core/CoreEvaluators.h: In instantiation of ‘Eigen::internal::mapbase_evaluator<Derived, PlainObjectType>::mapbase_evaluator(const XprType&) [with Derived = Eigen::Map<const Eigen::Matrix<unsigned int, 3, 1>, 0, Eigen::Stride<0, 0> >; PlainObjectType = const Eigen::Matrix<unsigned int, 3, 1>; Eigen::internal::mapbase_evaluator<Derived, PlainObjectType>::XprType = Eigen::Map<const Eigen::Matrix<unsigned int, 3, 1>, 0, Eigen::Stride<0, 0> >]’: /usr/local/include/eigen3/Eigen/src/Core/CoreEvaluators.h:1097:109: required from ‘Eigen::internal::evaluator<Eigen::Map<PlainObjectType, MapOptions, StrideType> >::evaluator(const XprType&) [with PlainObjectType = const Eigen::Matrix<unsigned int, 3, 1>; int MapOptions = 0; StrideType = Eigen::Stride<0, 0>; Eigen::internal::evaluator<Eigen::Map<PlainObjectType, MapOptions, StrideType> >::XprType = Eigen::Map<const Eigen::Matrix<unsigned int, 3, 1>, 0, Eigen::Stride<0, 0> >]’ /usr/local/include/eigen3/Eigen/src/Core/Redux.h:392:96: required from ‘Eigen::internal::reduxevaluator<XprType>::reduxevaluator(const XprType&) [with XprType = Eigen::Map<const Eigen::Matrix<unsigned int, 3, 1>, 0, Eigen::Stride<0, 0> >; Eigen::internal::reduxevaluator<XprType>::XprType = Eigen::Map<const Eigen::Matrix<unsigned int, 3, 1>, 0, Eigen::Stride<0, 0> >]’ /usr/local/include/eigen3/Eigen/src/Core/Redux.h:441:17: required from ‘typename Eigen::internal::traits::Scalar Eigen::DenseBase::redux(const Func&) const [with BinaryOp = Eigen::internal::scalar_product_op<unsigned int, unsigned int>; Derived = Eigen::Map<const Eigen::Matrix<unsigned int, 3, 1>, 0, Eigen::Stride<0, 0> >; typename Eigen::internal::traits::Scalar = unsigned int]’
/usr/local/include/eigen3/Eigen/src/Core/Redux.h:512:25: required from ‘typename Eigen::internal::traits::Scalar Eigen::DenseBase::prod() const [with Derived = Eigen::Map<const Eigen::Matrix<unsigned int, 3, 1>, 0, Eigen::Stride<0, 0> >; typename Eigen::internal::traits::Scalar = unsigned int]’
/home/monem/PhD_projects/PositionBasedDynamics/build/extern/Discregrid/src/Ext_Discregrid/discregrid/include/Discregrid/discrete_grid.hpp:28:21: required from here
/usr/local/include/eigen3/Eigen/src/Core/CoreEvaluators.h:1013:40: error: using invalid field ‘Eigen::internal::mapbase_evaluator<Derived, PlainObjectType>::m_data’
1013 | m_outerStride(map.outerStride()) {
| ^
make[5]: [discregrid/CMakeFiles/Discregrid.dir/build.make:76: discregrid/CMakeFiles/Discregrid.dir/src/discrete_grid.cpp.o] Error 1
make[4]: [CMakeFiles/Makefile2:98: discregrid/CMakeFiles/Discregrid.dir/all] Error 2
make[3]: [Makefile:136: all] Error 2
make[2]: [CMakeFiles/Ext_Discregrid.dir/build.make:86: extern/Discregrid/src/Ext_Discregrid-stamp/Ext_Discregrid-build] Error 2
make[1]: [CMakeFiles/Makefile2:434: CMakeFiles/Ext_Discregrid.dir/all] Error 2
make: [Makefile:136: all] Error 2
`