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

Cannot compile matlab toolbox (wrapper) #1855

Closed
Huang-Chuan opened this issue Sep 30, 2024 · 10 comments · Fixed by #1886
Closed

Cannot compile matlab toolbox (wrapper) #1855

Huang-Chuan opened this issue Sep 30, 2024 · 10 comments · Fixed by #1886

Comments

@Huang-Chuan
Copy link

Description

Cannot compile matlab toolbox but it compiles with no error when toolbox option is off. Seems to have some incompatibility with boost?

Environment

Ubuntu 22.04, Boost version 1.74.0, MATLAB 2024b

Additional information

[ 97%] Building CXX object matlab/CMakeFiles/gtsam_matlab_wrapper.dir/__/wrap/gtsam/gtsam_wrapper.cpp.o
In file included from /home/chuan/Downloads/gtsam-4.2/gtsam/nonlinear/Values.h:571,
from /home/chuan/Downloads/gtsam-4.2/gtsam/nonlinear/NonlinearFactor.h:24,
from /home/chuan/Downloads/gtsam-4.2/gtsam/nonlinear/FunctorizedFactor.h:21,
from /home/chuan/Downloads/gtsam-4.2/gtsam/basis/BasisFactors.h:22,
from /home/chuan/Downloads/gtsam-4.2/build/wrap/gtsam/gtsam_wrapper.cpp:14:
/home/chuan/Downloads/gtsam-4.2/gtsam/nonlinear/Values-inl.h: In member function ‘gtsam::Values::Filteredgtsam::Value gtsam::Values::filter(const std::function<bool(long unsigned int)>&)’:
/home/chuan/Downloads/gtsam-4.2/gtsam/nonlinear/Values-inl.h:253:25: warning: ‘gtsam::Values::Filtered gtsam::Values::filter(const std::function<bool(long unsigned int)>&) [with ValueType = gtsam::Value]’ is deprecated [-Wdeprecated-declarations]
253 | return filter(filterFcn);
| ~~~~~~~~~~~~~^~~~~~~~~~~
In file included from /home/chuan/Downloads/gtsam-4.2/gtsam/nonlinear/NonlinearFactor.h:24,
from /home/chuan/Downloads/gtsam-4.2/gtsam/nonlinear/FunctorizedFactor.h:21,
from /home/chuan/Downloads/gtsam-4.2/gtsam/basis/BasisFactors.h:22,
from /home/chuan/Downloads/gtsam-4.2/build/wrap/gtsam/gtsam_wrapper.cpp:14:
/home/chuan/Downloads/gtsam-4.2/gtsam/nonlinear/Values.h:421:5: note: declared here
421 | filter(const std::function<bool(Key)>& filterFcn = &_truePredicate);
| ^~~~~~
In file included from /home/chuan/Downloads/gtsam-4.2/gtsam/nonlinear/Values.h:571,
from /home/chuan/Downloads/gtsam-4.2/gtsam/nonlinear/NonlinearFactor.h:24,
from /home/chuan/Downloads/gtsam-4.2/gtsam/nonlinear/FunctorizedFactor.h:21,
from /home/chuan/Downloads/gtsam-4.2/gtsam/basis/BasisFactors.h:22,
from /home/chuan/Downloads/gtsam-4.2/build/wrap/gtsam/gtsam_wrapper.cpp:14:
/home/chuan/Downloads/gtsam-4.2/gtsam/nonlinear/Values-inl.h: In member function ‘gtsam::Values::ConstFilteredgtsam::Value gtsam::Values::filter(const std::function<bool(long unsigned int)>&) const’:
/home/chuan/Downloads/gtsam-4.2/gtsam/nonlinear/Values-inl.h:265:25: warning: ‘gtsam::Values::ConstFiltered gtsam::Values::filter(const std::function<bool(long unsigned int)>&) const [with ValueType = gtsam::Value]’ is deprecated [-Wdeprecated-declarations]
265 | return filter(filterFcn);
| ~~~~~~~~~~~~~^~~~~~~~~~~
In file included from /home/chuan/Downloads/gtsam-4.2/gtsam/nonlinear/NonlinearFactor.h:24,
from /home/chuan/Downloads/gtsam-4.2/gtsam/nonlinear/FunctorizedFactor.h:21,
from /home/chuan/Downloads/gtsam-4.2/gtsam/basis/BasisFactors.h:22,
from /home/chuan/Downloads/gtsam-4.2/build/wrap/gtsam/gtsam_wrapper.cpp:14:
/home/chuan/Downloads/gtsam-4.2/gtsam/nonlinear/Values.h:429:47: note: declared here
429 | ConstFiltered GTSAM_DEPRECATED filter(
| ^~~~~~
In file included from /home/chuan/Downloads/gtsam-4.2/gtsam/discrete/DiscreteBayesNet.h:22,
from /home/chuan/Downloads/gtsam-4.2/build/wrap/gtsam/gtsam_wrapper.cpp:22:
/home/chuan/Downloads/gtsam-4.2/gtsam/discrete/DiscreteDistribution.h: In member function ‘size_t gtsam::DiscreteDistribution::solve() const’:
/home/chuan/Downloads/gtsam-4.2/gtsam/discrete/DiscreteDistribution.h:99:56: warning: ‘size_t gtsam::DiscreteConditional::solve(const gtsam::DiscreteValues&) const’ is deprecated [-Wdeprecated-declarations]
99 | size_t GTSAM_DEPRECATED solve() const { return Base::solve({}); }
| ^~~~~
In file included from /home/chuan/Downloads/gtsam-4.2/gtsam/discrete/DiscreteBayesNet.h:21,
from /home/chuan/Downloads/gtsam-4.2/build/wrap/gtsam/gtsam_wrapper.cpp:22:
/home/chuan/Downloads/gtsam-4.2/gtsam/discrete/DiscreteConditional.h:269:27: note: declared here
269 | size_t GTSAM_DEPRECATED solve(const DiscreteValues& parentsValues) const;
| ^~~~~
In file included from /home/chuan/Downloads/gtsam-4.2/gtsam/discrete/DiscreteBayesNet.h:22,
from /home/chuan/Downloads/gtsam-4.2/build/wrap/gtsam/gtsam_wrapper.cpp:22:
/home/chuan/Downloads/gtsam-4.2/gtsam/discrete/DiscreteDistribution.h:99:61: warning: ‘size_t gtsam::DiscreteConditional::solve(const gtsam::DiscreteValues&) const’ is deprecated [-Wdeprecated-declarations]
99 | size_t GTSAM_DEPRECATED solve() const { return Base::solve({}); }
| ~~~~~~~~~~~^~~~
In file included from /home/chuan/Downloads/gtsam-4.2/gtsam/discrete/DiscreteBayesNet.h:21,
from /home/chuan/Downloads/gtsam-4.2/build/wrap/gtsam/gtsam_wrapper.cpp:22:
/home/chuan/Downloads/gtsam-4.2/gtsam/discrete/DiscreteConditional.h:269:27: note: declared here
269 | size_t GTSAM_DEPRECATED solve(const DiscreteValues& parentsValues) const;
| ^~~~~
In file included from /usr/include/boost/smart_ptr/make_shared.hpp:14,
from /usr/include/boost/make_shared.hpp:14,
from /home/chuan/Downloads/gtsam-4.2/wrap/matlab.h:41,
from /home/chuan/Downloads/gtsam-4.2/build/wrap/gtsam/gtsam_wrapper.cpp:1:
/usr/include/boost/smart_ptr/make_shared_object.hpp: In instantiation of ‘typename boost::detail::sp_if_not_array::type boost::make_shared(Args&& ...) [with T = std::pair<gtsam::DiscreteConditional, gtsam::DecisionTreeFactor>; Args = {std::pair<boost::shared_ptrgtsam::DiscreteConditional, boost::shared_ptrgtsam::DecisionTreeFactor >}; typename boost::detail::sp_if_not_array::type = boost::shared_ptr<std::pair<gtsam::DiscreteConditional, gtsam::DecisionTreeFactor> >]’:
/home/chuan/Downloads/gtsam-4.2/build/wrap/gtsam/gtsam_wrapper.cpp:12189:111: required from here
/usr/include/boost/smart_ptr/make_shared_object.hpp:256:5: error: no matching function for call to ‘std::pair<gtsam::DiscreteConditional, gtsam::DecisionTreeFactor>::pair(std::pair<boost::shared_ptrgtsam::DiscreteConditional, boost::shared_ptrgtsam::DecisionTreeFactor >)’
256 | ::new( pv ) T( boost::detail::sp_forward( args )... );

| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/11/bits/stl_algobase.h:64,
from /usr/include/c++/11/bits/char_traits.h:39,
from /usr/include/c++/11/string:40,
from /usr/include/c++/11/bits/locale_classes.h:40,
from /usr/include/c++/11/bits/ios_base.h:41,
from /usr/include/c++/11/streambuf:41,
from /usr/include/c++/11/bits/streambuf_iterator.h:35,
from /usr/include/c++/11/iterator:66,
from /usr/include/boost/concept_check.hpp:22,
from /usr/include/boost/range/concepts.hpp:19,
from /home/chuan/Downloads/gtsam-4.2/gtsam/base/types.h:24,
from /home/chuan/Downloads/gtsam-4.2/gtsam/global_includes.h:22,
from /home/chuan/Downloads/gtsam-4.2/gtsam/base/Vector.h:28,
from /home/chuan/Downloads/gtsam-4.2/wrap/matlab.h:25,
from /home/chuan/Downloads/gtsam-4.2/build/wrap/gtsam/gtsam_wrapper.cpp:1:
/usr/include/c++/11/bits/stl_pair.h:452:9: note: candidate: ‘template<class ... _Args1, long unsigned int ..._Indexes1, class ... _Args2, long unsigned int ..._Indexes2> std::pair<_T1, _T2>::pair(std::tuple<_Args1 ...>&, std::tuple<_Args2 ...>&, std::_Index_tuple<_Indexes1 ...>, std::_Index_tuple<_Indexes2 ...>) [with _Args1 = {_Args1 ...}; long unsigned int ..._Indexes1 = {_Indexes1 ...}; _Args2 = {_Args2 ...}; long unsigned int ..._Indexes2 = {_Indexes2 ...}; _T1 = gtsam::DiscreteConditional; _T2 = gtsam::DecisionTreeFactor]’
452 | pair(tuple<_Args1...>&, tuple<_Args2...>&,
| ^~~~
/usr/include/c++/11/bits/stl_pair.h:452:9: note: template argument deduction/substitution failed:
In file included from /usr/include/boost/smart_ptr/make_shared.hpp:14,
from /usr/include/boost/make_shared.hpp:14,
from /home/chuan/Downloads/gtsam-4.2/wrap/matlab.h:41,
from /home/chuan/Downloads/gtsam-4.2/build/wrap/gtsam/gtsam_wrapper.cpp:1:
/usr/include/boost/smart_ptr/make_shared_object.hpp:256:5: note: ‘std::pair<boost::shared_ptrgtsam::DiscreteConditional, boost::shared_ptrgtsam::DecisionTreeFactor >’ is not derived from ‘std::tuple<_Tps ...>’
256 | ::new( pv ) T( boost::detail::sp_forward( args )... );
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/11/bits/stl_algobase.h:64,
from /usr/include/c++/11/bits/char_traits.h:39,
from /usr/include/c++/11/string:40,
from /usr/include/c++/11/bits/locale_classes.h:40,
from /usr/include/c++/11/bits/ios_base.h:41,
from /usr/include/c++/11/streambuf:41,
from /usr/include/c++/11/bits/streambuf_iterator.h:35,
from /usr/include/c++/11/iterator:66,
from /usr/include/boost/concept_check.hpp:22,
from /usr/include/boost/range/concepts.hpp:19,
from /home/chuan/Downloads/gtsam-4.2/gtsam/base/types.h:24,
from /home/chuan/Downloads/gtsam-4.2/gtsam/global_includes.h:22,
from /home/chuan/Downloads/gtsam-4.2/gtsam/base/Vector.h:28,
from /home/chuan/Downloads/gtsam-4.2/wrap/matlab.h:25,
from /home/chuan/Downloads/gtsam-4.2/build/wrap/gtsam/gtsam_wrapper.cpp:1:
/usr/include/c++/11/bits/stl_pair.h:387:9: note: candidate: ‘template<class ... _Args1, class ... _Args2> std::pair<_T1, _T2>::pair(std::piecewise_construct_t, std::tuple<_Args1 ...>, std::tuple<_Args2 ...>) [with _Args1 = {_Args1 ...}; _Args2 = {_Args2 ...}; _T1 = gtsam::DiscreteConditional; _T2 = gtsam::DecisionTreeFactor]’
387 | pair(piecewise_construct_t, tuple<_Args1...>, tuple<_Args2...>);
| ^~~~
/usr/include/c++/11/bits/stl_pair.h:387:9: note: template argument deduction/substitution failed:
In file included from /usr/include/boost/smart_ptr/make_shared.hpp:14,
from /usr/include/boost/make_shared.hpp:14,
from /home/chuan/Downloads/gtsam-4.2/wrap/matlab.h:41,
from /home/chuan/Downloads/gtsam-4.2/build/wrap/gtsam/gtsam_wrapper.cpp:1:
/usr/include/boost/smart_ptr/make_shared_object.hpp:256:5: note: candidate expects 3 arguments, 1 provided
256 | ::new( pv ) T( boost::detail::sp_forward( args )... );
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/11/bits/stl_algobase.h:64,
from /usr/include/c++/11/bits/char_traits.h:39,
from /usr/include/c++/11/string:40,
from /usr/include/c++/11/bits/locale_classes.h:40,
from /usr/include/c++/11/bits/ios_base.h:41,
from /usr/include/c++/11/streambuf:41,
from /usr/include/c++/11/bits/streambuf_iterator.h:35,
from /usr/include/c++/11/iterator:66,
from /usr/include/boost/concept_check.hpp:22,
from /usr/include/boost/range/concepts.hpp:19,
from /home/chuan/Downloads/gtsam-4.2/gtsam/base/types.h:24,
from /home/chuan/Downloads/gtsam-4.2/gtsam/global_includes.h:22,
from /home/chuan/Downloads/gtsam-4.2/gtsam/base/Vector.h:28,
from /home/chuan/Downloads/gtsam-4.2/wrap/matlab.h:25,
from /home/chuan/Downloads/gtsam-4.2/build/wrap/gtsam/gtsam_wrapper.cpp:1:
/usr/include/c++/11/bits/stl_pair.h:381:28: note: candidate: ‘template<class _U1, class _U2, typename std::enable_if<(std::_PCC<((! std::is_same<gtsam::DiscreteConditional, _U1>::value) || (! std::is_same<gtsam::DecisionTreeFactor, _U2>::value)), gtsam::DiscreteConditional, gtsam::DecisionTreeFactor>::_MoveConstructiblePair<_U1, _U2>() && (! std::_PCC<((! std::is_same<gtsam::DiscreteConditional, _U1>::value) || (! std::is_same<gtsam::DecisionTreeFactor, _U2>::value)), gtsam::DiscreteConditional, gtsam::DecisionTreeFactor>::_ImplicitlyMoveConvertiblePair<_U1, _U2>())), bool>::type > constexpr std::pair<_T1, _T2>::pair(std::pair<_U1, _U2>&&) [with _U1 = _U1; _U2 = _U2; typename std::enable_if<(std::_PCC<((! std::is_same<_T1, _U1>::value) || (! std::is_same<_T2, _U2>::value)), _T1, _T2>::_MoveConstructiblePair<_U1, _U2>() && (! std::_PCC<((! std::is_same<_T1, _U1>::value) || (! std::is_same<_T2, _U2>::value)), _T1, _T2>::_ImplicitlyMoveConvertiblePair<_U1, _U2>())), bool>::type = ; _T1 = gtsam::DiscreteConditional; _T2 = gtsam::DecisionTreeFactor]’
381 | explicit constexpr pair(pair<_U1, _U2>&& __p)
| ^~~~
/usr/include/c++/11/bits/stl_pair.h:381:28: note: template argument deduction/substitution failed:
/usr/include/c++/11/bits/stl_pair.h:380:38: error: no type named ‘type’ in ‘struct std::enable_if<false, bool>’
380 | bool>::type=false>
| ^~~~~
/usr/include/c++/11/bits/stl_pair.h:371:19: note: candidate: ‘template<class _U1, class _U2, typename std::enable_if<(std::_PCC<((! std::is_same<gtsam::DiscreteConditional, _U1>::value) || (! std::is_same<gtsam::DecisionTreeFactor, _U2>::value)), gtsam::DiscreteConditional, gtsam::DecisionTreeFactor>::_MoveConstructiblePair<_U1, _U2>() && std::_PCC<((! std::is_same<gtsam::DiscreteConditional, _U1>::value) || (! std::is_same<gtsam::DecisionTreeFactor, _U2>::value)), gtsam::DiscreteConditional, gtsam::DecisionTreeFactor>::_ImplicitlyMoveConvertiblePair<_U1, _U2>()), bool>::type > constexpr std::pair<_T1, _T2>::pair(std::pair<_U1, _U2>&&) [with _U1 = _U1; _U2 = _U2; typename std::enable_if<(std::_PCC<((! std::is_same<_T1, _U1>::value) || (! std::is_same<_T2, _U2>::value)), _T1, _T2>::_MoveConstructiblePair<_U1, _U2>() && std::_PCC<((! std::is_same<_T1, _U1>::value) || (! std::is_same<_T2, _U2>::value)), _T1, _T2>::_ImplicitlyMoveConvertiblePair<_U1, _U2>()), bool>::type = ; _T1 = gtsam::DiscreteConditional; _T2 = gtsam::DecisionTreeFactor]’
371 | constexpr pair(pair<_U1, _U2>&& __p)
| ^~~~
/usr/include/c++/11/bits/stl_pair.h:371:19: note: template argument deduction/substitution failed:
/usr/include/c++/11/bits/stl_pair.h:370:38: error: no type named ‘type’ in ‘struct std::enable_if<false, bool>’
370 | bool>::type=true>
| ^~~~
/usr/include/c++/11/bits/stl_pair.h:361:28: note: candidate: ‘template<class _U1, class _U2, typename std::enable_if<(_MoveConstructiblePair<_U1, _U2>() && (! _ImplicitlyMoveConvertiblePair<_U1, _U2>())), bool>::type > constexpr std::pair<_T1, _T2>::pair(_U1&&, _U2&&) [with _U1 = _U1; _U2 = _U2; typename std::enable_if<(std::_PCC<true, _T1, _T2>::_MoveConstructiblePair<_U1, _U2>() && (! std::_PCC<true, _T1, _T2>::_ImplicitlyMoveConvertiblePair<_U1, _U2>())), bool>::type = ; _T1 = gtsam::DiscreteConditional; _T2 = gtsam::DecisionTreeFactor]’
361 | explicit constexpr pair(_U1&& __x, _U2&& __y)
| ^~~~
/usr/include/c++/11/bits/stl_pair.h:361:28: note: template argument deduction/substitution failed:
In file included from /usr/include/boost/smart_ptr/make_shared.hpp:14,
from /usr/include/boost/make_shared.hpp:14,
from /home/chuan/Downloads/gtsam-4.2/wrap/matlab.h:41,
from /home/chuan/Downloads/gtsam-4.2/build/wrap/gtsam/gtsam_wrapper.cpp:1:
/usr/include/boost/smart_ptr/make_shared_object.hpp:256:5: note: candidate expects 2 arguments, 1 provided
256 | ::new( pv ) T( boost::detail::sp_forward( args )... );
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/11/bits/stl_algobase.h:64,
from /usr/include/c++/11/bits/char_traits.h:39,
from /usr/include/c++/11/string:40,
from /usr/include/c++/11/bits/locale_classes.h:40,
from /usr/include/c++/11/bits/ios_base.h:41,
from /usr/include/c++/11/streambuf:41,
from /usr/include/c++/11/bits/streambuf_iterator.h:35,
from /usr/include/c++/11/iterator:66,
from /usr/include/boost/concept_check.hpp:22,
from /usr/include/boost/range/concepts.hpp:19,
from /home/chuan/Downloads/gtsam-4.2/gtsam/base/types.h:24,
from /home/chuan/Downloads/gtsam-4.2/gtsam/global_includes.h:22,
from /home/chuan/Downloads/gtsam-4.2/gtsam/base/Vector.h:28,
from /home/chuan/Downloads/gtsam-4.2/wrap/matlab.h:25,
from /home/chuan/Downloads/gtsam-4.2/build/wrap/gtsam/gtsam_wrapper.cpp:1:
/usr/include/c++/11/bits/stl_pair.h:352:19: note: candidate: ‘template<class _U1, class _U2, typename std::enable_if<(_MoveConstructiblePair<_U1, _U2>() && _ImplicitlyMoveConvertiblePair<_U1, _U2>()), bool>::type > constexpr std::pair<_T1, _T2>::pair(_U1&&, _U2&&) [with _U1 = _U1; _U2 = _U2; typename std::enable_if<(std::_PCC<true, _T1, _T2>::_MoveConstructiblePair<_U1, _U2>() && std::_PCC<true, _T1, _T2>::_ImplicitlyMoveConvertiblePair<_U1, _U2>()), bool>::type = ; _T1 = gtsam::DiscreteConditional; _T2 = gtsam::DecisionTreeFactor]’
352 | constexpr pair(_U1&& __x, _U2&& __y)
| ^~~~
/usr/include/c++/11/bits/stl_pair.h:352:19: note: template argument deduction/substitution failed:
In file included from /usr/include/boost/smart_ptr/make_shared.hpp:14,
from /usr/include/boost/make_shared.hpp:14,
from /home/chuan/Downloads/gtsam-4.2/wrap/matlab.h:41,
from /home/chuan/Downloads/gtsam-4.2/build/wrap/gtsam/gtsam_wrapper.cpp:1:
/usr/include/boost/smart_ptr/make_shared_object.hpp:256:5: note: candidate expects 2 arguments, 1 provided
256 | ::new( pv ) T( boost::detail::sp_forward( args )... );
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/11/bits/stl_algobase.h:64,
from /usr/include/c++/11/bits/char_traits.h:39,
from /usr/include/c++/11/string:40,
from /usr/include/c++/11/bits/locale_classes.h:40,
from /usr/include/c++/11/bits/ios_base.h:41,
from /usr/include/c++/11/streambuf:41,
from /usr/include/c++/11/bits/streambuf_iterator.h:35,
from /usr/include/c++/11/iterator:66,
from /usr/include/boost/concept_check.hpp:22,
from /usr/include/boost/range/concepts.hpp:19,
from /home/chuan/Downloads/gtsam-4.2/gtsam/base/types.h:24,
from /home/chuan/Downloads/gtsam-4.2/gtsam/global_includes.h:22,
from /home/chuan/Downloads/gtsam-4.2/gtsam/base/Vector.h:28,
from /home/chuan/Downloads/gtsam-4.2/wrap/matlab.h:25,
from /home/chuan/Downloads/gtsam-4.2/build/wrap/gtsam/gtsam_wrapper.cpp:1:
/usr/include/c++/11/bits/stl_pair.h:343:17: note: candidate: ‘template<class _U2, typename std::enable_if<_CopyMovePair<false, gtsam::DiscreteConditional, _U2>(), bool>::type > std::pair<_T1, _T2>::pair(const _T1&, _U2&&) [with _U2 = _U2; typename std::enable_if<std::_PCC<true, _T1, _T2>::_CopyMovePair<false, _T1, _U2>(), bool>::type = ; _T1 = gtsam::DiscreteConditional; _T2 = gtsam::DecisionTreeFactor]’
343 | explicit pair(const _T1& __x, _U2&& __y)
| ^~~~
/usr/include/c++/11/bits/stl_pair.h:343:17: note: template argument deduction/substitution failed:
In file included from /usr/include/boost/smart_ptr/make_shared.hpp:14,
from /usr/include/boost/make_shared.hpp:14,
from /home/chuan/Downloads/gtsam-4.2/wrap/matlab.h:41,
from /home/chuan/Downloads/gtsam-4.2/build/wrap/gtsam/gtsam_wrapper.cpp:1:
/usr/include/boost/smart_ptr/make_shared_object.hpp:256:5: note: candidate expects 2 arguments, 1 provided
256 | ::new( pv ) T( boost::detail::sp_forward( args )... );
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/11/bits/stl_algobase.h:64,
from /usr/include/c++/11/bits/char_traits.h:39,
from /usr/include/c++/11/string:40,
from /usr/include/c++/11/bits/locale_classes.h:40,
from /usr/include/c++/11/bits/ios_base.h:41,
from /usr/include/c++/11/streambuf:41,
from /usr/include/c++/11/bits/streambuf_iterator.h:35,
from /usr/include/c++/11/iterator:66,
from /usr/include/boost/concept_check.hpp:22,
from /usr/include/boost/range/concepts.hpp:19,
from /home/chuan/Downloads/gtsam-4.2/gtsam/base/types.h:24,
from /home/chuan/Downloads/gtsam-4.2/gtsam/global_includes.h:22,
from /home/chuan/Downloads/gtsam-4.2/gtsam/base/Vector.h:28,
from /home/chuan/Downloads/gtsam-4.2/wrap/matlab.h:25,
from /home/chuan/Downloads/gtsam-4.2/build/wrap/gtsam/gtsam_wrapper.cpp:1:
/usr/include/c++/11/bits/stl_pair.h:336:18: note: candidate: ‘template<class _U2, typename std::enable_if<_CopyMovePair<true, gtsam::DiscreteConditional, _U2>(), bool>::type > constexpr std::pair<_T1, _T2>::pair(const _T1&, _U2&&) [with _U2 = _U2; typename std::enable_if<std::_PCC<true, _T1, _T2>::_CopyMovePair<true, _T1, _U2>(), bool>::type = ; _T1 = gtsam::DiscreteConditional; _T2 = gtsam::DecisionTreeFactor]’
336 | constexpr pair(const _T1& __x, _U2&& __y)
| ^~~~
/usr/include/c++/11/bits/stl_pair.h:336:18: note: template argument deduction/substitution failed:
In file included from /usr/include/boost/smart_ptr/make_shared.hpp:14,
from /usr/include/boost/make_shared.hpp:14,
from /home/chuan/Downloads/gtsam-4.2/wrap/matlab.h:41,
from /home/chuan/Downloads/gtsam-4.2/build/wrap/gtsam/gtsam_wrapper.cpp:1:
/usr/include/boost/smart_ptr/make_shared_object.hpp:256:5: note: candidate expects 2 arguments, 1 provided
256 | ::new( pv ) T( boost::detail::sp_forward( args )... );
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/11/bits/stl_algobase.h:64,
from /usr/include/c++/11/bits/char_traits.h:39,
from /usr/include/c++/11/string:40,
from /usr/include/c++/11/bits/locale_classes.h:40,
from /usr/include/c++/11/bits/ios_base.h:41,
from /usr/include/c++/11/streambuf:41,
from /usr/include/c++/11/bits/streambuf_iterator.h:35,
from /usr/include/c++/11/iterator:66,
from /usr/include/boost/concept_check.hpp:22,
from /usr/include/boost/range/concepts.hpp:19,
from /home/chuan/Downloads/gtsam-4.2/gtsam/base/types.h:24,
from /home/chuan/Downloads/gtsam-4.2/gtsam/global_includes.h:22,
from /home/chuan/Downloads/gtsam-4.2/gtsam/base/Vector.h:28,
from /home/chuan/Downloads/gtsam-4.2/wrap/matlab.h:25,
from /home/chuan/Downloads/gtsam-4.2/build/wrap/gtsam/gtsam_wrapper.cpp:1:
/usr/include/c++/11/bits/stl_pair.h:329:27: note: candidate: ‘template<class _U1, typename std::enable_if<_MoveCopyPair<false, _U1, gtsam::DecisionTreeFactor>(), bool>::type > constexpr std::pair<_T1, _T2>::pair(_U1&&, const _T2&) [with _U1 = _U1; typename std::enable_if<std::_PCC<true, _T1, _T2>::_MoveCopyPair<false, _U1, _T2>(), bool>::type = ; _T1 = gtsam::DiscreteConditional; _T2 = gtsam::DecisionTreeFactor]’
329 | explicit constexpr pair(_U1&& __x, const _T2& __y)
| ^~~~
/usr/include/c++/11/bits/stl_pair.h:329:27: note: template argument deduction/substitution failed:
In file included from /usr/include/boost/smart_ptr/make_shared.hpp:14,
from /usr/include/boost/make_shared.hpp:14,
from /home/chuan/Downloads/gtsam-4.2/wrap/matlab.h:41,
from /home/chuan/Downloads/gtsam-4.2/build/wrap/gtsam/gtsam_wrapper.cpp:1:
/usr/include/boost/smart_ptr/make_shared_object.hpp:256:5: note: candidate expects 2 arguments, 1 provided
256 | ::new( pv ) T( boost::detail::sp_forward( args )... );
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/11/bits/stl_algobase.h:64,
from /usr/include/c++/11/bits/char_traits.h:39,
from /usr/include/c++/11/string:40,
from /usr/include/c++/11/bits/locale_classes.h:40,
from /usr/include/c++/11/bits/ios_base.h:41,
from /usr/include/c++/11/streambuf:41,
from /usr/include/c++/11/bits/streambuf_iterator.h:35,
from /usr/include/c++/11/iterator:66,
from /usr/include/boost/concept_check.hpp:22,
from /usr/include/boost/range/concepts.hpp:19,
from /home/chuan/Downloads/gtsam-4.2/gtsam/base/types.h:24,
from /home/chuan/Downloads/gtsam-4.2/gtsam/global_includes.h:22,
from /home/chuan/Downloads/gtsam-4.2/gtsam/base/Vector.h:28,
from /home/chuan/Downloads/gtsam-4.2/wrap/matlab.h:25,
from /home/chuan/Downloads/gtsam-4.2/build/wrap/gtsam/gtsam_wrapper.cpp:1:
/usr/include/c++/11/bits/stl_pair.h:322:18: note: candidate: ‘template<class _U1, typename std::enable_if<_MoveCopyPair<true, _U1, gtsam::DecisionTreeFactor>(), bool>::type > constexpr std::pair<_T1, _T2>::pair(_U1&&, const _T2&) [with _U1 = _U1; typename std::enable_if<std::_PCC<true, _T1, _T2>::_MoveCopyPair<true, _U1, _T2>(), bool>::type = ; _T1 = gtsam::DiscreteConditional; _T2 = gtsam::DecisionTreeFactor]’
322 | constexpr pair(_U1&& __x, const _T2& __y)
| ^~~~
/usr/include/c++/11/bits/stl_pair.h:322:18: note: template argument deduction/substitution failed:
In file included from /usr/include/boost/smart_ptr/make_shared.hpp:14,
from /usr/include/boost/make_shared.hpp:14,
from /home/chuan/Downloads/gtsam-4.2/wrap/matlab.h:41,
from /home/chuan/Downloads/gtsam-4.2/build/wrap/gtsam/gtsam_wrapper.cpp:1:
/usr/include/boost/smart_ptr/make_shared_object.hpp:256:5: note: candidate expects 2 arguments, 1 provided
256 | ::new( pv ) T( boost::detail::sp_forward( args )... );
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/11/bits/stl_algobase.h:64,
from /usr/include/c++/11/bits/char_traits.h:39,
from /usr/include/c++/11/string:40,
from /usr/include/c++/11/bits/locale_classes.h:40,
from /usr/include/c++/11/bits/ios_base.h:41,
from /usr/include/c++/11/streambuf:41,
from /usr/include/c++/11/bits/streambuf_iterator.h:35,
from /usr/include/c++/11/iterator:66,
from /usr/include/boost/concept_check.hpp:22,
from /usr/include/boost/range/concepts.hpp:19,
from /home/chuan/Downloads/gtsam-4.2/gtsam/base/types.h:24,
from /home/chuan/Downloads/gtsam-4.2/gtsam/global_includes.h:22,
from /home/chuan/Downloads/gtsam-4.2/gtsam/base/Vector.h:28,
from /home/chuan/Downloads/gtsam-4.2/wrap/matlab.h:25,
from /home/chuan/Downloads/gtsam-4.2/build/wrap/gtsam/gtsam_wrapper.cpp:1:
/usr/include/c++/11/bits/stl_pair.h:309:28: note: candidate: ‘template<class _U1, class _U2, typename std::enable_if<(std::_PCC<((! std::is_same<gtsam::DiscreteConditional, _U1>::value) || (! std::is_same<gtsam::DecisionTreeFactor, _U2>::value)), gtsam::DiscreteConditional, gtsam::DecisionTreeFactor>::_ConstructiblePair<_U1, _U2>() && (! std::_PCC<((! std::is_same<gtsam::DiscreteConditional, _U1>::value) || (! std::is_same<gtsam::DecisionTreeFactor, _U2>::value)), gtsam::DiscreteConditional, gtsam::DecisionTreeFactor>::_ImplicitlyConvertiblePair<_U1, _U2>())), bool>::type > constexpr std::pair<_T1, _T2>::pair(const std::pair<_U1, _U2>&) [with _U1 = _U1; _U2 = _U2; typename std::enable_if<(std::_PCC<((! std::is_same<_T1, _U1>::value) || (! std::is_same<_T2, _U2>::value)), _T1, _T2>::_ConstructiblePair<_U1, _U2>() && (! std::_PCC<((! std::is_same<_T1, _U1>::value) || (! std::is_same<_T2, _U2>::value)), _T1, _T2>::_ImplicitlyConvertiblePair<_U1, _U2>())), bool>::type = ; _T1 = gtsam::DiscreteConditional; _T2 = gtsam::DecisionTreeFactor]’
309 | explicit constexpr pair(const pair<_U1, _U2>& __p)
| ^~~~
/usr/include/c++/11/bits/stl_pair.h:309:28: note: template argument deduction/substitution failed:
/usr/include/c++/11/bits/stl_pair.h:308:38: error: no type named ‘type’ in ‘struct std::enable_if<false, bool>’
308 | bool>::type=false>
| ^~~~~
/usr/include/c++/11/bits/stl_pair.h:300:19: note: candidate: ‘template<class _U1, class _U2, typename std::enable_if<(std::_PCC<((! std::is_same<gtsam::DiscreteConditional, _U1>::value) || (! std::is_same<gtsam::DecisionTreeFactor, _U2>::value)), gtsam::DiscreteConditional, gtsam::DecisionTreeFactor>::_ConstructiblePair<_U1, _U2>() && std::_PCC<((! std::is_same<gtsam::DiscreteConditional, _U1>::value) || (! std::is_same<gtsam::DecisionTreeFactor, _U2>::value)), gtsam::DiscreteConditional, gtsam::DecisionTreeFactor>::_ImplicitlyConvertiblePair<_U1, _U2>()), bool>::type > constexpr std::pair<_T1, _T2>::pair(const std::pair<_U1, _U2>&) [with _U1 = _U1; _U2 = _U2; typename std::enable_if<(std::_PCC<((! std::is_same<_T1, _U1>::value) || (! std::is_same<_T2, _U2>::value)), _T1, _T2>::_ConstructiblePair<_U1, _U2>() && std::_PCC<((! std::is_same<_T1, _U1>::value) || (! std::is_same<_T2, _U2>::value)), _T1, _T2>::_ImplicitlyConvertiblePair<_U1, _U2>()), bool>::type = ; _T1 = gtsam::DiscreteConditional; _T2 = gtsam::DecisionTreeFactor]’
300 | constexpr pair(const pair<_U1, _U2>& __p)
| ^~~~
/usr/include/c++/11/bits/stl_pair.h:300:19: note: template argument deduction/substitution failed:
/usr/include/c++/11/bits/stl_pair.h:299:39: error: no type named ‘type’ in ‘struct std::enable_if<false, bool>’
299 | bool>::type=true>
| ^~~~
/usr/include/c++/11/bits/stl_pair.h:276:26: note: candidate: ‘template<class _U1, class _U2, typename std::enable_if<(_ConstructiblePair<_U1, _U2>() && (! _ImplicitlyConvertiblePair<_U1, _U2>())), bool>::type > constexpr std::pair<_T1, _T2>::pair(const _T1&, const _T2&) [with _U1 = _U1; _U2 = _U2; typename std::enable_if<(std::_PCC<true, _T1, _T2>::_ConstructiblePair<_U1, _U2>() && (! std::_PCC<true, _T1, _T2>::_ImplicitlyConvertiblePair<_U1, _U2>())), bool>::type = ; _T1 = gtsam::DiscreteConditional; _T2 = gtsam::DecisionTreeFactor]’
276 | explicit constexpr pair(const _T1& __a, const _T2& __b)
| ^~~~
/usr/include/c++/11/bits/stl_pair.h:276:26: note: template argument deduction/substitution failed:
In file included from /usr/include/boost/smart_ptr/make_shared.hpp:14,
from /usr/include/boost/make_shared.hpp:14,
from /home/chuan/Downloads/gtsam-4.2/wrap/matlab.h:41,
from /home/chuan/Downloads/gtsam-4.2/build/wrap/gtsam/gtsam_wrapper.cpp:1:
/usr/include/boost/smart_ptr/make_shared_object.hpp:256:5: note: candidate expects 2 arguments, 1 provided
256 | ::new( pv ) T( boost::detail::sp_forward( args )... );
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/11/bits/stl_algobase.h:64,
from /usr/include/c++/11/bits/char_traits.h:39,
from /usr/include/c++/11/string:40,
from /usr/include/c++/11/bits/locale_classes.h:40,
from /usr/include/c++/11/bits/ios_base.h:41,
from /usr/include/c++/11/streambuf:41,
from /usr/include/c++/11/bits/streambuf_iterator.h:35,
from /usr/include/c++/11/iterator:66,
from /usr/include/boost/concept_check.hpp:22,
from /usr/include/boost/range/concepts.hpp:19,
from /home/chuan/Downloads/gtsam-4.2/gtsam/base/types.h:24,
from /home/chuan/Downloads/gtsam-4.2/gtsam/global_includes.h:22,
from /home/chuan/Downloads/gtsam-4.2/gtsam/base/Vector.h:28,
from /home/chuan/Downloads/gtsam-4.2/wrap/matlab.h:25,
from /home/chuan/Downloads/gtsam-4.2/build/wrap/gtsam/gtsam_wrapper.cpp:1:
/usr/include/c++/11/bits/stl_pair.h:266:17: note: candidate: ‘template<class _U1, class _U2, typename std::enable_if<(_ConstructiblePair<_U1, _U2>() && _ImplicitlyConvertiblePair<_U1, _U2>()), bool>::type > constexpr std::pair<_T1, _T2>::pair(const _T1&, const _T2&) [with _U1 = _U1; _U2 = _U2; typename std::enable_if<(std::_PCC<true, _T1, _T2>::_ConstructiblePair<_U1, _U2>() && std::_PCC<true, _T1, _T2>::_ImplicitlyConvertiblePair<_U1, _U2>()), bool>::type = ; _T1 = gtsam::DiscreteConditional; _T2 = gtsam::DecisionTreeFactor]’
266 | constexpr pair(const _T1& __a, const _T2& __b)
| ^~~~
/usr/include/c++/11/bits/stl_pair.h:266:17: note: template argument deduction/substitution failed:
In file included from /usr/include/boost/smart_ptr/make_shared.hpp:14,
from /usr/include/boost/make_shared.hpp:14,
from /home/chuan/Downloads/gtsam-4.2/wrap/matlab.h:41,
from /home/chuan/Downloads/gtsam-4.2/build/wrap/gtsam/gtsam_wrapper.cpp:1:
/usr/include/boost/smart_ptr/make_shared_object.hpp:256:5: note: candidate expects 2 arguments, 1 provided
256 | ::new( pv ) T( boost::detail::sp_forward( args )... );
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/11/bits/stl_algobase.h:64,
from /usr/include/c++/11/bits/char_traits.h:39,
from /usr/include/c++/11/string:40,
from /usr/include/c++/11/bits/locale_classes.h:40,
from /usr/include/c++/11/bits/ios_base.h:41,
from /usr/include/c++/11/streambuf:41,
from /usr/include/c++/11/bits/streambuf_iterator.h:35,
from /usr/include/c++/11/iterator:66,
from /usr/include/boost/concept_check.hpp:22,
from /usr/include/boost/range/concepts.hpp:19,
from /home/chuan/Downloads/gtsam-4.2/gtsam/base/types.h:24,
from /home/chuan/Downloads/gtsam-4.2/gtsam/global_includes.h:22,
from /home/chuan/Downloads/gtsam-4.2/gtsam/base/Vector.h:28,
from /home/chuan/Downloads/gtsam-4.2/wrap/matlab.h:25,
from /home/chuan/Downloads/gtsam-4.2/build/wrap/gtsam/gtsam_wrapper.cpp:1:
/usr/include/c++/11/bits/stl_pair.h:245:26: note: candidate: ‘template<class _U1, class _U2, typename std::enable_if<std::_and<std::is_default_constructible<_U1>, std::is_default_constructible<_U2>, std::_not<std::_and<std::__is_implicitly_default_constructible<_U1>, std::__is_implicitly_default_constructible<_U2> > > >::value, bool>::type > constexpr std::pair<_T1, _T2>::pair() [with _U1 = _U1; _U2 = _U2; typename std::enable_if<std::_and<std::is_default_constructible<_U1>, std::is_default_constructible<_U2>, std::_not<std::_and<std::__is_implicitly_default_constructible<_U1>, std::__is_implicitly_default_constructible<_U2> > > >::value, bool>::type = ; _T1 = gtsam::DiscreteConditional; _T2 = gtsam::DecisionTreeFactor]’
245 | explicit constexpr pair()
| ^~~~
/usr/include/c++/11/bits/stl_pair.h:245:26: note: template argument deduction/substitution failed:
In file included from /usr/include/boost/smart_ptr/make_shared.hpp:14,
from /usr/include/boost/make_shared.hpp:14,
from /home/chuan/Downloads/gtsam-4.2/wrap/matlab.h:41,
from /home/chuan/Downloads/gtsam-4.2/build/wrap/gtsam/gtsam_wrapper.cpp:1:
/usr/include/boost/smart_ptr/make_shared_object.hpp:256:5: note: candidate expects 0 arguments, 1 provided
256 | ::new( pv ) T( boost::detail::sp_forward( args )... );
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/11/bits/stl_algobase.h:64,
from /usr/include/c++/11/bits/char_traits.h:39,
from /usr/include/c++/11/string:40,
from /usr/include/c++/11/bits/locale_classes.h:40,
from /usr/include/c++/11/bits/ios_base.h:41,
from /usr/include/c++/11/streambuf:41,
from /usr/include/c++/11/bits/streambuf_iterator.h:35,
from /usr/include/c++/11/iterator:66,
from /usr/include/boost/concept_check.hpp:22,
from /usr/include/boost/range/concepts.hpp:19,
from /home/chuan/Downloads/gtsam-4.2/gtsam/base/types.h:24,
from /home/chuan/Downloads/gtsam-4.2/gtsam/global_includes.h:22,
from /home/chuan/Downloads/gtsam-4.2/gtsam/base/Vector.h:28,
from /home/chuan/Downloads/gtsam-4.2/wrap/matlab.h:25,
from /home/chuan/Downloads/gtsam-4.2/build/wrap/gtsam/gtsam_wrapper.cpp:1:
/usr/include/c++/11/bits/stl_pair.h:232:26: note: candidate: ‘template<class _U1, class _U2, typename std::enable_if<std::_and<std::__is_implicitly_default_constructible<_U1>, std::__is_implicitly_default_constructible<_U2> >::value, bool>::type > constexpr std::pair<_T1, _T2>::pair() [with _U1 = _U1; _U2 = _U2; typename std::enable_if<std::_and<std::__is_implicitly_default_constructible<_U1>, std::is_implicitly_default_constructible<_U2> >::value, bool>::type = ; _T1 = gtsam::DiscreteConditional; _T2 = gtsam::DecisionTreeFactor]’
232 | _GLIBCXX_CONSTEXPR pair()
| ^~~~
/usr/include/c++/11/bits/stl_pair.h:232:26: note: template argument deduction/substitution failed:
In file included from /usr/include/boost/smart_ptr/make_shared.hpp:14,
from /usr/include/boost/make_shared.hpp:14,
from /home/chuan/Downloads/gtsam-4.2/wrap/matlab.h:41,
from /home/chuan/Downloads/gtsam-4.2/build/wrap/gtsam/gtsam_wrapper.cpp:1:
/usr/include/boost/smart_ptr/make_shared_object.hpp:256:5: note: candidate expects 0 arguments, 1 provided
256 | ::new( pv ) T( boost::detail::sp_forward( args )... );
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/11/bits/stl_algobase.h:64,
from /usr/include/c++/11/bits/char_traits.h:39,
from /usr/include/c++/11/string:40,
from /usr/include/c++/11/bits/locale_classes.h:40,
from /usr/include/c++/11/bits/ios_base.h:41,
from /usr/include/c++/11/streambuf:41,
from /usr/include/c++/11/bits/streambuf_iterator.h:35,
from /usr/include/c++/11/iterator:66,
from /usr/include/boost/concept_check.hpp:22,
from /usr/include/boost/range/concepts.hpp:19,
from /home/chuan/Downloads/gtsam-4.2/gtsam/base/types.h:24,
from /home/chuan/Downloads/gtsam-4.2/gtsam/global_includes.h:22,
from /home/chuan/Downloads/gtsam-4.2/gtsam/base/Vector.h:28,
from /home/chuan/Downloads/gtsam-4.2/wrap/matlab.h:25,
from /home/chuan/Downloads/gtsam-4.2/build/wrap/gtsam/gtsam_wrapper.cpp:1:
/usr/include/c++/11/bits/stl_pair.h:315:17: note: candidate: ‘std::pair<_T1, _T2>::pair(std::pair<_T1, _T2>&&) [with _T1 = gtsam::DiscreteConditional; _T2 = gtsam::DecisionTreeFactor]’
315 | constexpr pair(pair&&) = default; ///< Move constructor
| ^~~~
/usr/include/c++/11/bits/stl_pair.h:315:22: note: no known conversion for argument 1 from ‘std::pair<boost::shared_ptrgtsam::DiscreteConditional, boost::shared_ptrgtsam::DecisionTreeFactor >’ to ‘std::pair<gtsam::DiscreteConditional, gtsam::DecisionTreeFactor>&&’
315 | constexpr pair(pair&&) = default; ///< Move constructor
| ^~~~~~
/usr/include/c++/11/bits/stl_pair.h:314:17: note: candidate: ‘std::pair<_T1, _T2>::pair(const std::pair<_T1, _T2>&) [with _T1 = gtsam::DiscreteConditional; _T2 = gtsam::DecisionTreeFactor]’
314 | constexpr pair(const pair&) = default; ///< Copy constructor
| ^~~~
/usr/include/c++/11/bits/stl_pair.h:314:22: note: no known conversion for argument 1 from ‘std::pair<boost::shared_ptrgtsam::DiscreteConditional, boost::shared_ptrgtsam::DecisionTreeFactor >’ to ‘const std::pair<gtsam::DiscreteConditional, gtsam::DecisionTreeFactor>&’
314 | constexpr pair(const pair&) = default; ///< Copy constructor
| ^~~~~~~~~~~
make[2]: *** [matlab/CMakeFiles/gtsam_matlab_wrapper.dir/build.make:95: matlab/CMakeFiles/gtsam_matlab_wrapper.dir/
/wrap/gtsam/gtsam_wrapper.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:32558: matlab/CMakeFiles/gtsam_matlab_wrapper.dir/all] Error 2

@varunagrawal
Copy link
Collaborator

Are you using the 4.2 release?

@Huang-Chuan
Copy link
Author

Yes.

@varunagrawal
Copy link
Collaborator

I'm not sure why the release version shouldn't compile. Can you try the latest develop version? That will definitely compile (tried it out myself last night).

@varunagrawal
Copy link
Collaborator

@Huang-Chuan any updates?

@Huang-Chuan
Copy link
Author

@varunagrawal I will try to compile it next week, because right now I am occupied on a conference.

@Huang-Chuan
Copy link
Author

@varunagrawal I downloaded the latest develop version and compiled it. It failed again, the error is different, though.

[100%] Building CXX object matlab/CMakeFiles/gtsam_matlab_wrapper.dir/__/wrap/gtsam/gtsam_wrapper.cpp.o
/home/chuan/Desktop/gtsam-develop/build/wrap/gtsam/gtsam_wrapper.cpp: In function ‘void gtsamPCGSolverParameters_set_preconditioner_2497(int, mxArray**, int, const mxArray**)’:
/home/chuan/Desktop/gtsam-develop/build/wrap/gtsam/gtsam_wrapper.cpp:28709:26: error: no match for ‘operator=’ (operand types are ‘std::shared_ptrgtsam::PreconditionerParameters’ and ‘std::__shared_ptr_access<gtsam::PreconditionerParameters, __gnu_cxx::_S_atomic, false, false>::element_type’ {aka ‘gtsam::PreconditionerParameters’})
28709 | obj->preconditioner = *preconditioner;
| ^~~~~~~~~~~~~~
In file included from /usr/include/c++/9/memory:81,
from /home/chuan/Desktop/gtsam-develop/gtsam/base/Testable.h:40,
from /home/chuan/Desktop/gtsam-develop/gtsam/base/Manifold.h:23,
from /home/chuan/Desktop/gtsam-develop/gtsam/base/Lie.h:26,
from /home/chuan/Desktop/gtsam-develop/gtsam/base/VectorSpace.h:11,
from /home/chuan/Desktop/gtsam-develop/gtsam/geometry/Point2.h:20,
from /home/chuan/Desktop/gtsam-develop/wrap/matlab.h:27,
from /home/chuan/Desktop/gtsam-develop/build/wrap/gtsam/gtsam_wrapper.cpp:1:
/usr/include/c++/9/bits/shared_ptr.h:309:19: note: candidate: ‘std::shared_ptr<_Tp>& std::shared_ptr<_Tp>::operator=(const std::shared_ptr<_Tp>&) [with _Tp = gtsam::PreconditionerParameters]’
309 | shared_ptr& operator=(const shared_ptr&) noexcept = default;
| ^~~~~~~~
/usr/include/c++/9/bits/shared_ptr.h:309:29: note: no known conversion for argument 1 from ‘std::__shared_ptr_access<gtsam::PreconditionerParameters, __gnu_cxx::_S_atomic, false, false>::element_type’ {aka ‘gtsam::PreconditionerParameters’} to ‘const std::shared_ptrgtsam::PreconditionerParameters&’
309 | shared_ptr& operator=(const shared_ptr&) noexcept = default;
| ^~~~~~~~~~~~~~~~~
/usr/include/c++/9/bits/shared_ptr.h:313:2: note: candidate: ‘template std::shared_ptr<_Tp>::_Assignable<const std::shared_ptr<_Yp>&> std::shared_ptr<_Tp>::operator=(const std::shared_ptr<_Yp>&) [with _Yp = _Yp; _Tp = gtsam::PreconditionerParameters]’
313 | operator=(const shared_ptr<_Yp>& __r) noexcept
| ^~~~~~~~
/usr/include/c++/9/bits/shared_ptr.h:313:2: note: template argument deduction/substitution failed:
/home/chuan/Desktop/gtsam-develop/build/wrap/gtsam/gtsam_wrapper.cpp:28709:26: note: ‘std::__shared_ptr_access<gtsam::PreconditionerParameters, __gnu_cxx::_S_atomic, false, false>::element_type’ {aka ‘gtsam::PreconditionerParameters’} is not derived from ‘const std::shared_ptr<_Tp>’
28709 | obj->preconditioner = *preconditioner;
| ^~~~~~~~~~~~~~
In file included from /usr/include/c++/9/memory:81,
from /home/chuan/Desktop/gtsam-develop/gtsam/base/Testable.h:40,
from /home/chuan/Desktop/gtsam-develop/gtsam/base/Manifold.h:23,
from /home/chuan/Desktop/gtsam-develop/gtsam/base/Lie.h:26,
from /home/chuan/Desktop/gtsam-develop/gtsam/base/VectorSpace.h:11,
from /home/chuan/Desktop/gtsam-develop/gtsam/geometry/Point2.h:20,
from /home/chuan/Desktop/gtsam-develop/wrap/matlab.h:27,
from /home/chuan/Desktop/gtsam-develop/build/wrap/gtsam/gtsam_wrapper.cpp:1:
/usr/include/c++/9/bits/shared_ptr.h:324:2: note: candidate: ‘template std::shared_ptr<_Tp>::_Assignable<std::auto_ptr<_Up> > std::shared_ptr<_Tp>::operator=(std::auto_ptr<_Up>&&) [with _Yp = _Yp; _Tp = gtsam::PreconditionerParameters]’
324 | operator=(auto_ptr<_Yp>&& __r)
| ^~~~~~~~
/usr/include/c++/9/bits/shared_ptr.h:324:2: note: template argument deduction/substitution failed:
/home/chuan/Desktop/gtsam-develop/build/wrap/gtsam/gtsam_wrapper.cpp:28709:26: note: ‘std::__shared_ptr_access<gtsam::PreconditionerParameters, __gnu_cxx::_S_atomic, false, false>::element_type’ {aka ‘gtsam::PreconditionerParameters’} is not derived from ‘std::auto_ptr’
28709 | obj->preconditioner = *preconditioner;
| ^~~~~~~~~~~~~~
In file included from /usr/include/c++/9/memory:81,
from /home/chuan/Desktop/gtsam-develop/gtsam/base/Testable.h:40,
from /home/chuan/Desktop/gtsam-develop/gtsam/base/Manifold.h:23,
from /home/chuan/Desktop/gtsam-develop/gtsam/base/Lie.h:26,
from /home/chuan/Desktop/gtsam-develop/gtsam/base/VectorSpace.h:11,
from /home/chuan/Desktop/gtsam-develop/gtsam/geometry/Point2.h:20,
from /home/chuan/Desktop/gtsam-develop/wrap/matlab.h:27,
from /home/chuan/Desktop/gtsam-develop/build/wrap/gtsam/gtsam_wrapper.cpp:1:
/usr/include/c++/9/bits/shared_ptr.h:333:7: note: candidate: ‘std::shared_ptr<_Tp>& std::shared_ptr<_Tp>::operator=(std::shared_ptr<_Tp>&&) [with _Tp = gtsam::PreconditionerParameters]’
333 | operator=(shared_ptr&& __r) noexcept
| ^~~~~~~~
/usr/include/c++/9/bits/shared_ptr.h:333:30: note: no known conversion for argument 1 from ‘std::__shared_ptr_access<gtsam::PreconditionerParameters, __gnu_cxx::_S_atomic, false, false>::element_type’ {aka ‘gtsam::PreconditionerParameters’} to ‘std::shared_ptrgtsam::PreconditionerParameters&&’
333 | operator=(shared_ptr&& __r) noexcept
| ~~~~~~~~~~~~~^~~
/usr/include/c++/9/bits/shared_ptr.h:341:2: note: candidate: ‘template std::shared_ptr<_Tp>::_Assignable<std::shared_ptr<_Yp> > std::shared_ptr<_Tp>::operator=(std::shared_ptr<_Yp>&&) [with _Yp = _Yp; _Tp = gtsam::PreconditionerParameters]’
341 | operator=(shared_ptr<_Yp>&& __r) noexcept
| ^~~~~~~~
/usr/include/c++/9/bits/shared_ptr.h:341:2: note: template argument deduction/substitution failed:
/home/chuan/Desktop/gtsam-develop/build/wrap/gtsam/gtsam_wrapper.cpp:28709:26: note: ‘std::__shared_ptr_access<gtsam::PreconditionerParameters, __gnu_cxx::_S_atomic, false, false>::element_type’ {aka ‘gtsam::PreconditionerParameters’} is not derived from ‘std::shared_ptr<_Tp>’
28709 | obj->preconditioner = *preconditioner;
| ^~~~~~~~~~~~~~
In file included from /usr/include/c++/9/memory:81,
from /home/chuan/Desktop/gtsam-develop/gtsam/base/Testable.h:40,
from /home/chuan/Desktop/gtsam-develop/gtsam/base/Manifold.h:23,
from /home/chuan/Desktop/gtsam-develop/gtsam/base/Lie.h:26,
from /home/chuan/Desktop/gtsam-develop/gtsam/base/VectorSpace.h:11,
from /home/chuan/Desktop/gtsam-develop/gtsam/geometry/Point2.h:20,
from /home/chuan/Desktop/gtsam-develop/wrap/matlab.h:27,
from /home/chuan/Desktop/gtsam-develop/build/wrap/gtsam/gtsam_wrapper.cpp:1:
/usr/include/c++/9/bits/shared_ptr.h:349:2: note: candidate: ‘template<class _Yp, class _Del> std::shared_ptr<_Tp>::_Assignable<std::unique_ptr<_Up, _Ep> > std::shared_ptr<_Tp>::operator=(std::unique_ptr<_Up, _Ep>&&) [with _Yp = _Yp; _Del = _Del; _Tp = gtsam::PreconditionerParameters]’
349 | operator=(unique_ptr<_Yp, _Del>&& __r)
| ^~~~~~~~
/usr/include/c++/9/bits/shared_ptr.h:349:2: note: template argument deduction/substitution failed:
/home/chuan/Desktop/gtsam-develop/build/wrap/gtsam/gtsam_wrapper.cpp:28709:26: note: ‘std::__shared_ptr_access<gtsam::PreconditionerParameters, gnu_cxx::_S_atomic, false, false>::element_type’ {aka ‘gtsam::PreconditionerParameters’} is not derived from ‘std::unique_ptr<_Tp, _Dp>’
28709 | obj->preconditioner = *preconditioner;
| ^~~~~~~~~~~~~~
In file included from /usr/include/eigen3/Eigen/Core:365,
from /home/chuan/Desktop/gtsam-develop/gtsam/base/Vector.h:29,
from /home/chuan/Desktop/gtsam-develop/wrap/matlab.h:25,
from /home/chuan/Desktop/gtsam-develop/build/wrap/gtsam/gtsam_wrapper.cpp:1:
/usr/include/eigen3/Eigen/src/Core/util/ForwardDeclarations.h: In instantiation of ‘struct Eigen::internal::accessors_levelboost::serialization::U’:
/usr/include/boost/serialization/split_free.hpp:58:13: required from ‘static void boost::serialization::free_loader<Archive, T>::invoke(Archive&, T&, unsigned int) [with Archive = boost::archive::text_iarchive; T = Eigen::Matrix<double, -1, -1>]’
/usr/include/boost/serialization/split_free.hpp:74:18: required from ‘void boost::serialization::split_free(Archive&, T&, unsigned int) [with Archive = boost::archive::text_iarchive; T = Eigen::Matrix<double, -1, -1>]’
/home/chuan/Desktop/gtsam-develop/gtsam/base/MatrixSerialization.h:87:13: required from ‘void boost::serialization::serialize(Archive&, gtsam::Matrix&, unsigned int) [with Archive = boost::archive::text_iarchive; gtsam::Matrix = Eigen::Matrix<double, -1, -1>]’
/usr/include/boost/serialization/serialization.hpp:126:14: required from ‘void boost::serialization::serialize_adl(Archive&, T&, unsigned int) [with Archive = boost::archive::text_iarchive; T = Eigen::Matrix<double, -1, -1>]’
/usr/include/boost/archive/detail/iserializer.hpp:187:40: [ skipping 30 instantiation contexts, use -ftemplate-backtrace-limit=0 to disable ]
/usr/include/boost/archive/detail/iserializer.hpp:461:22: required from ‘static void boost::archive::detail::load_non_pointer_type::invoke(Archive&, T&) [with T = gtsam::SO<-1>; Archive = boost::archive::text_iarchive]’
/usr/include/boost/archive/detail/iserializer.hpp:624:18: required from ‘void boost::archive::load(Archive&, T&) [with Archive = boost::archive::text_iarchive; T = gtsam::SO<-1>]’
/usr/include/boost/archive/detail/common_iarchive.hpp:67:22: required from ‘void boost::archive::detail::common_iarchive::load_override(T&) [with T = gtsam::SO<-1>; Archive = boost::archive::text_iarchive]’
/usr/include/boost/archive/basic_text_iarchive.hpp:70:9: required from ‘void boost::archive::basic_text_iarchive::load_override(T&) [with T = gtsam::SO<-1>; Archive = boost::archive::text_iarchive]’
/usr/include/boost/archive/text_iarchive.hpp:82:52: required from ‘void boost::archive::text_iarchive_impl::load_override(T&) [with T = gtsam::SO<-1>; Archive = boost::archive::text_iarchive]’
/usr/include/boost/archive/detail/interface_iarchive.hpp:68:9: required from ‘Archive& boost::archive::detail::interface_iarchive::operator>>(T&) [with T = gtsam::SO<-1>; Archive = boost::archive::text_iarchive]’
/home/chuan/Desktop/gtsam-develop/build/wrap/gtsam/gtsam_wrapper.cpp:15594:18: required from here
/usr/include/eigen3/Eigen/src/Core/util/ForwardDeclarations.h:32:54: error: incomplete type ‘Eigen::internal::traitsboost::serialization::U’ used in nested name specifier
32 | enum { has_direct_access = (traits::Flags & DirectAccessBit) ? 1 : 0,
| ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
/usr/include/eigen3/Eigen/src/Core/util/ForwardDeclarations.h:33:53: error: incomplete type ‘Eigen::internal::traitsboost::serialization::U’ used in nested name specifier
33 | has_write_access = (traits::Flags & LvalueBit) ? 1 : 0,
| ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~
make[2]: *** [matlab/CMakeFiles/gtsam_matlab_wrapper.dir/build.make:81: matlab/CMakeFiles/gtsam_matlab_wrapper.dir/
/wrap/gtsam/gtsam_wrapper.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:27319: matlab/CMakeFiles/gtsam_matlab_wrapper.dir/all] Error 2

@deeplerming
Copy link

change "obj->preconditioner = *preconditioner;" to
obj->preconditioner = std::make_sharedgtsam::PreconditionerParameters(*preconditioner);

@varunagrawal varunagrawal linked a pull request Oct 25, 2024 that will close this issue
@varunagrawal
Copy link
Collaborator

I made #1886 to fix this.

@Huang-Chuan
Copy link
Author

@varunagrawal I made changes as you did in #1886. But now I got new errors.

/usr/include/eigen3/Eigen/src/Core/util/ForwardDeclarations.h: In instantiation of ‘struct Eigen::internal::accessors_levelboost::serialization::U’:
/usr/include/boost/serialization/split_free.hpp:58:13: required from ‘static void boost::serialization::free_loader<Archive, T>::invoke(Archive&, T&, unsigned int) [with Archive = boost::archive::text_iarchive; T = Eigen::Matrix<double, -1, -1>]’
/usr/include/boost/serialization/split_free.hpp:74:18: required from ‘void boost::serialization::split_free(Archive&, T&, unsigned int) [with Archive = boost::archive::text_iarchive; T = Eigen::Matrix<double, -1, -1>]’
/home/chuan/Desktop/gtsam-develop/gtsam/base/MatrixSerialization.h:87:13: required from ‘void boost::serialization::serialize(Archive&, gtsam::Matrix&, unsigned int) [with Archive = boost::archive::text_iarchive; gtsam::Matrix = Eigen::Matrix<double, -1, -1>]’
/usr/include/boost/serialization/serialization.hpp:126:14: required from ‘void boost::serialization::serialize_adl(Archive&, T&, unsigned int) [with Archive = boost::archive::text_iarchive; T = Eigen::Matrix<double, -1, -1>]’
/usr/include/boost/archive/detail/iserializer.hpp:187:40: [ skipping 30 instantiation contexts, use -ftemplate-backtrace-limit=0 to disable ]
/usr/include/boost/archive/detail/iserializer.hpp:461:22: required from ‘static void boost::archive::detail::load_non_pointer_type::invoke(Archive&, T&) [with T = gtsam::SO<-1>; Archive = boost::archive::text_iarchive]’
/usr/include/boost/archive/detail/iserializer.hpp:624:18: required from ‘void boost::archive::load(Archive&, T&) [with Archive = boost::archive::text_iarchive; T = gtsam::SO<-1>]’
/usr/include/boost/archive/detail/common_iarchive.hpp:67:22: required from ‘void boost::archive::detail::common_iarchive::load_override(T&) [with T = gtsam::SO<-1>; Archive = boost::archive::text_iarchive]’
/usr/include/boost/archive/basic_text_iarchive.hpp:70:9: required from ‘void boost::archive::basic_text_iarchive::load_override(T&) [with T = gtsam::SO<-1>; Archive = boost::archive::text_iarchive]’
/usr/include/boost/archive/text_iarchive.hpp:82:52: required from ‘void boost::archive::text_iarchive_impl::load_override(T&) [with T = gtsam::SO<-1>; Archive = boost::archive::text_iarchive]’
/usr/include/boost/archive/detail/interface_iarchive.hpp:68:9: required from ‘Archive& boost::archive::detail::interface_iarchive::operator>>(T&) [with T = gtsam::SO<-1>; Archive = boost::archive::text_iarchive]’
/home/chuan/Desktop/gtsam-develop/build/wrap/gtsam/gtsam_wrapper.cpp:15594:18: required from here
/usr/include/eigen3/Eigen/src/Core/util/ForwardDeclarations.h:32:54: error: incomplete type ‘Eigen::internal::traitsboost::serialization::U’ used in nested name specifier
32 | enum { has_direct_access = (traits::Flags & DirectAccessBit) ? 1 : 0,
| ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
/usr/include/eigen3/Eigen/src/Core/util/ForwardDeclarations.h:33:53: error: incomplete type ‘Eigen::internal::traitsboost::serialization::U’ used in nested name specifier
33 | has_write_access = (traits::Flags & LvalueBit) ? 1 : 0,
| ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~
make[2]: *** [matlab/CMakeFiles/gtsam_matlab_wrapper.dir/build.make:81: matlab/CMakeFiles/gtsam_matlab_wrapper.dir/__/wrap/gtsam/gtsam_wrapper.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:27319: matlab/CMakeFiles/gtsam_matlab_wrapper.dir/all] Error 2

@varunagrawal
Copy link
Collaborator

This is an issue with your Eigen installation. I cannot help you with this.

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

Successfully merging a pull request may close this issue.

3 participants