Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compilation error #86

Closed
jlunsan opened this issue Feb 3, 2023 · 1 comment
Closed

Compilation error #86

jlunsan opened this issue Feb 3, 2023 · 1 comment

Comments

@jlunsan
Copy link

jlunsan commented Feb 3, 2023

I am trying to build in Ubuntu 18 and I obtain the following error:

/usr/include/boost/smart_ptr/shared_ptr.hpp:898:42: note: template argument deduction/substitution failed:
In file included from /home/javier/kimera_ws/src/Kimera-RPGO/src/RobustSolver.cpp:22:0:
/home/javier/kimera_ws/src/Kimera-RPGO/include/KimeraRPGO/outlier/Pcm.h:394:68: note: ‘std::shared_ptrgtsam::NonlinearFactor’ is not derived from ‘const boost::shared_ptr’
*boost::dynamic_pointer_cast<gtsam::PriorFactor>(factor);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
In file included from /usr/include/boost/shared_ptr.hpp:17:0,
from /usr/include/boost/date_time/gregorian/greg_month.hpp:14,
from /usr/include/boost/date_time/gregorian/greg_ymd.hpp:16,
from /usr/include/boost/date_time/gregorian/greg_calendar.hpp:17,
from /usr/include/boost/date_time/gregorian/gregorian_types.hpp:19,
from /usr/include/boost/date_time/posix_time/posix_time_config.hpp:18,
from /usr/include/boost/date_time/posix_time/posix_time_system.hpp:13,
from /usr/include/boost/date_time/posix_time/ptime.hpp:12,
from /usr/include/boost/date_time/posix_time/posix_time.hpp:15,
from /home/javier/kimera_ws/devel/include/gtsam/nonlinear/LevenbergMarquardtOptimizer.h:26,
from /home/javier/kimera_ws/devel/include/gtsam/nonlinear/GncParams.h:29,
from /home/javier/kimera_ws/devel/include/gtsam/nonlinear/GncOptimizer.h:29,
from /home/javier/kimera_ws/src/Kimera-RPGO/include/KimeraRPGO/RobustSolver.h:17,
from /home/javier/kimera_ws/src/Kimera-RPGO/src/RobustSolver.cpp:6:
/usr/include/boost/smart_ptr/shared_ptr.hpp:940:42: note: candidate: template<class T, class U> boost::shared_ptr boost::dynamic_pointer_cast(boost::shared_ptr&&)
template<class T, class U> shared_ptr dynamic_pointer_cast( shared_ptr && r ) BOOST_SP_NOEXCEPT
^~~~~~~~~~~~~~~~~~~~
/usr/include/boost/smart_ptr/shared_ptr.hpp:940:42: note: template argument deduction/substitution failed:
In file included from /home/javier/kimera_ws/src/Kimera-RPGO/src/RobustSolver.cpp:22:0:
/home/javier/kimera_ws/src/Kimera-RPGO/include/KimeraRPGO/outlier/Pcm.h:394:68: note: ‘std::shared_ptrgtsam::NonlinearFactor’ is not derived from ‘boost::shared_ptr’
*boost::dynamic_pointer_cast<gtsam::PriorFactor>(factor);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
make[2]: *** [CMakeFiles/KimeraRPGO.dir/src/RobustSolver.cpp.o] Error 1
make[1]: *** [CMakeFiles/KimeraRPGO.dir/all] Error 2

@yunzc
Copy link
Member

yunzc commented Feb 7, 2023

This is probably an issue with the recent GTSAM update.

You could try with the latest commit tested as specified in the README or try this fix: #85

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants