orocos_kinematics_dynamics icon indicating copy to clipboard operation
orocos_kinematics_dynamics copied to clipboard

Compile issue of python bindings

Open cmosig opened this issue 3 years ago • 9 comments
trafficstars

I am running python 3.9. I cloned the repo, then git submodule update --init, and then cd into python_orocos_kdl and ran catkin make --this. The other package succeeded, the python bindings didn't.

Starting  >>> python_orocos_kdl                                                                                       
______________________________________________________________________________________________________________________
Errors     << python_orocos_kdl:make /home/cmosig/projects/master_thesis/fub_roscar/logs/python_orocos_kdl/build.make.002.log
/home/cmosig/projects/master_thesis/fub_roscar/src/orocos_kinematics_dynamics/python_orocos_kdl/PyKDL/frames.cpp: In function ‘void init_frames(pybind11::module&)’:
/home/cmosig/projects/master_thesis/fub_roscar/src/orocos_kinematics_dynamics/python_orocos_kdl/PyKDL/frames.cpp:80:29: error: could not convert ‘pybind11::detail::self’ from ‘const pybind11::detail::self_t’ to ‘pybind11::handle’
   80 |     vector.def(py::hash(py::self));
      |                         ~~~~^~~~
      |                             |
      |                             const pybind11::detail::self_t
/home/cmosig/projects/master_thesis/fub_roscar/src/orocos_kinematics_dynamics/python_orocos_kdl/PyKDL/frames.cpp:167:29: error: could not convert ‘pybind11::detail::self’ from ‘const pybind11::detail::self_t’ to ‘pybind11::handle’
  167 |     wrench.def(py::hash(py::self));
      |                         ~~~~^~~~
      |                             |
      |                             const pybind11::detail::self_t
/home/cmosig/projects/master_thesis/fub_roscar/src/orocos_kinematics_dynamics/python_orocos_kdl/PyKDL/frames.cpp:242:28: error: could not convert ‘pybind11::detail::self’ from ‘const pybind11::detail::self_t’ to ‘pybind11::handle’
  242 |     twist.def(py::hash(py::self));
      |                        ~~~~^~~~
      |                            |
      |                            const pybind11::detail::self_t
/home/cmosig/projects/master_thesis/fub_roscar/src/orocos_kinematics_dynamics/python_orocos_kdl/PyKDL/frames.cpp:375:31: error: could not convert ‘pybind11::detail::self’ from ‘const pybind11::detail::self_t’ to ‘pybind11::handle’
  375 |     rotation.def(py::hash(py::self));
      |                           ~~~~^~~~
      |                               |
      |                               const pybind11::detail::self_t
/home/cmosig/projects/master_thesis/fub_roscar/src/orocos_kinematics_dynamics/python_orocos_kdl/PyKDL/frames.cpp:457:28: error: could not convert ‘pybind11::detail::self’ from ‘const pybind11::detail::self_t’ to ‘pybind11::handle’
  457 |     frame.def(py::hash(py::self));
      |                        ~~~~^~~~
      |                            |
      |                            const pybind11::detail::self_t
/home/cmosig/projects/master_thesis/fub_roscar/src/orocos_kinematics_dynamics/python_orocos_kdl/PyKDL/framevel.cpp: In function ‘void init_framevel(pybind11::module&)’:
/home/cmosig/projects/master_thesis/fub_roscar/src/orocos_kinematics_dynamics/python_orocos_kdl/PyKDL/framevel.cpp:65:33: error: could not convert ‘pybind11::detail::self’ from ‘const pybind11::detail::self_t’ to ‘pybind11::handle’
   65 |     double_vel.def(py::hash(py::self));
      |                             ~~~~^~~~
      |                                 |
      |                                 const pybind11::detail::self_t
/home/cmosig/projects/master_thesis/fub_roscar/src/orocos_kinematics_dynamics/python_orocos_kdl/PyKDL/framevel.cpp:135:33: error: could not convert ‘pybind11::detail::self’ from ‘const pybind11::detail::self_t’ to ‘pybind11::handle’
  135 |     vector_vel.def(py::hash(py::self));
      |                             ~~~~^~~~
      |                                 |
      |                                 const pybind11::detail::self_t
/home/cmosig/projects/master_thesis/fub_roscar/src/orocos_kinematics_dynamics/python_orocos_kdl/PyKDL/framevel.cpp:221:32: error: could not convert ‘pybind11::detail::self’ from ‘const pybind11::detail::self_t’ to ‘pybind11::handle’
  221 |     twist_vel.def(py::hash(py::self));
      |                            ~~~~^~~~
      |                                |
      |                                const pybind11::detail::self_t
/home/cmosig/projects/master_thesis/fub_roscar/src/orocos_kinematics_dynamics/python_orocos_kdl/PyKDL/framevel.cpp:310:35: error: could not convert ‘pybind11::detail::self’ from ‘const pybind11::detail::self_t’ to ‘pybind11::handle’
  310 |     rotation_vel.def(py::hash(py::self));
      |                               ~~~~^~~~
      |                                   |
      |                                   const pybind11::detail::self_t
/home/cmosig/projects/master_thesis/fub_roscar/src/orocos_kinematics_dynamics/python_orocos_kdl/PyKDL/framevel.cpp:384:32: error: could not convert ‘pybind11::detail::self’ from ‘const pybind11::detail::self_t’ to ‘pybind11::handle’
  384 |     frame_vel.def(py::hash(py::self));
      |                            ~~~~^~~~
      |                                |
      |                                const pybind11::detail::self_t
make[2]: *** [CMakeFiles/PyKDL.dir/build.make:90: CMakeFiles/PyKDL.dir/PyKDL/frames.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: *** [CMakeFiles/PyKDL.dir/build.make:118: CMakeFiles/PyKDL.dir/PyKDL/framevel.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:295: CMakeFiles/PyKDL.dir/all] Error 2
make: *** [Makefile:146: all] Error 2
cd /home/cmosig/projects/master_thesis/fub_roscar/build/python_orocos_kdl; catkin build --get-env python_orocos_kdl | catkin env -si  /usr/bin/make --jobserver-auth=3,4; cd -

......................................................................................................................
Failed     << python_orocos_kdl:make           [ Exited with code 2 ]                                                 
Failed    <<< python_orocos_kdl                [ 4.8 seconds ]     

cmosig avatar Oct 25 '22 15:10 cmosig

The last CI run was 2 months ago. I just triggered the CI again, https://github.com/orocos/orocos_kinematics_dynamics/actions/runs/3322737754. Lets see what happens there. Ubuntu 20.04 in combination with python 3.9 is tested there.

I assume you are running ubuntu 20.04.

MatthijsBurgh avatar Oct 25 '22 16:10 MatthijsBurgh

Yes, ubuntu 20.04.5 and python3.9. Still got the same error after pulling.

cmosig avatar Oct 25 '22 17:10 cmosig

It seems similar to #401. But i the author of that issue, didn't provide enough information to find the real cause.

Could you please check the logs for the found paths of PyBind and orocoa_kdl?

MatthijsBurgh avatar Oct 25 '22 21:10 MatthijsBurgh

What do you mean by "found paths"? I can send you the catkin make log files if that helps. Or do you need other log files?

cmosig avatar Oct 26 '22 14:10 cmosig

Yes, I think that should be the starting point.

MatthijsBurgh avatar Oct 26 '22 18:10 MatthijsBurgh

that is the entire log directory in /build of orocos_kdl orocos_kdl.tar.gz

cmosig avatar Oct 28 '22 07:10 cmosig

@cmosig do you have the logs of the python_orocos_kdl? I think the logs of orocos_kdl are not really relevant.

MatthijsBurgh avatar Oct 28 '22 08:10 MatthijsBurgh

Oh yes, ups, my mistake. python_orocos_kdl.tar.gz

cmosig avatar Oct 28 '22 08:10 cmosig

I don't see any signs. It doesn't show the paths of the found libraries.

Could you maybe edit the CMakelists.txt of python_orocos_kdl, so it prints these paths? Or maybe the version of the found KDL package. As my guess is still it is caused by version mismatch.

Another test would be to try to compile it outside of a catkin ws. As that is also what is done in CI.

MatthijsBurgh avatar Oct 28 '22 09:10 MatthijsBurgh

@cmosig A friend of mine experienced the same issue. I was able debug the issue on his machine. Which was that he had a different version of PyBind11 installed on his system which was found but incompatible.

If you only responded to my question to try to print the paths of the found libraries, we would have probably figured this out much earlier. So next time please respond, when somebody is helping you.

MatthijsBurgh avatar Jan 07 '23 15:01 MatthijsBurgh