orocos / orocos_kinematics_dynamics

Orocos Kinematics and Dynamics C++ library
709 stars 408 forks source link

build error #482

Open 724789975 opened 2 weeks ago

724789975 commented 2 weeks ago
In file included from /mnt/d/orocos_kinematics_dynamics/python_orocos_kdl/PyKDL/PyKDL.h:28,
                 from /mnt/d/orocos_kinematics_dynamics/python_orocos_kdl/PyKDL/frames.cpp:28:
/usr/include/pybind11/operators.h: In instantiation of ‘struct pybind11::detail::op_impl<pybind11::detail::op_hash, pybind11::detail::op_u, KDL::Vector, KDL::Vector, pybind11::detail::undefined_t>’:
/usr/include/pybind11/operators.h:94:24:   required from ‘void pybind11::detail::op_<id, ot, L, R>::execute(Class&, const Extra& ...) const [with Class = pybind11::class_<KDL::Vector>; Extra = {}; pybind11::detail::op_id id = pybind11::detail::op_hash; pybind11::detail::op_type ot = pybind11::detail::op_u; L = pybind11::detail::self_t; R = pybind11::detail::undefined_t]’
/usr/include/pybind11/pybind11.h:1600:19:   required from ‘pybind11::class_<type_, options>& pybind11::class_<type_, options>::def(const T&, const Extra& ...) [with T = pybind11::detail::op_<pybind11::detail::op_hash, pybind11::detail::op_u, pybind11::detail::self_t, pybind11::detail::undefined_t>; Extra = {}; typename std::enable_if<T::op_enable_if_hook, int>::type <anonymous> = 0; type_ = KDL::Vector; options = {}]’
/mnt/d/orocos_kinematics_dynamics/python_orocos_kdl/PyKDL/frames.cpp:80:15:   required from here
/usr/include/pybind11/operators.h:187:1: error: use of deleted function ‘std::hash<KDL::Vector>::hash()’
  187 | PYBIND11_UNARY_OPERATOR(hash, hash, std::hash<L>()(l))
      | ^~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/13/string_view:42,
                 from /usr/include/c++/13/bits/basic_string.h:47,
                 from /usr/include/c++/13/string:54,
                 from /usr/include/c++/13/bits/locale_classes.h:40,
                 from /usr/include/c++/13/bits/ios_base.h:41,
                 from /usr/include/c++/13/ios:44,
                 from /usr/include/c++/13/ostream:40,
                 from /usr/include/c++/13/iostream:41,
                 from /usr/include/kdl/utilities/utility_io.h:27,
                 from /usr/include/kdl/frames_io.hpp:79,
                 from /mnt/d/orocos_kinematics_dynamics/python_orocos_kdl/PyKDL/frames.cpp:27:
/usr/include/c++/13/bits/functional_hash.h:102:12: note: ‘std::hash<KDL::Vector>::hash()’ is implicitly deleted because the default definition would be ill-formed:
  102 |     struct hash : __hash_enum<_Tp>

who can help me

MatthijsBurgh commented 2 weeks ago

Please provide more info