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

Compile issue of python bindings #416

Closed
cmosig opened this issue Oct 25, 2022 · 10 comments · Fixed by #430
Closed

Compile issue of python bindings #416

cmosig opened this issue Oct 25, 2022 · 10 comments · Fixed by #430

Comments

@cmosig
Copy link

cmosig commented Oct 25, 2022

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 ]     
@MatthijsBurgh
Copy link
Collaborator

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.

@cmosig
Copy link
Author

cmosig commented Oct 25, 2022

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

@MatthijsBurgh
Copy link
Collaborator

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?

@cmosig
Copy link
Author

cmosig commented Oct 26, 2022

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?

@MatthijsBurgh
Copy link
Collaborator

Yes, I think that should be the starting point.

@cmosig
Copy link
Author

cmosig commented Oct 28, 2022

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

@MatthijsBurgh
Copy link
Collaborator

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

@cmosig
Copy link
Author

cmosig commented Oct 28, 2022

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

@MatthijsBurgh
Copy link
Collaborator

MatthijsBurgh commented Oct 28, 2022

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
Copy link
Collaborator

MatthijsBurgh commented Jan 7, 2023

@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.

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.

2 participants