Open oceanusxiv opened 2 months ago
Thanks for looking into this. You can try to fix linking as in https://github.com/pybind/pybind11_bazel/blob/master/build_defs.bzl#L56-L58. If that works, please open a PR with fixes from this discussion.
It's on my TODO list to create a python extension macro as in the repo above...
I understand that this has only been tested on Ubuntu 22.04, and macOS isn't even a particularly well supported target for ROS2, this is more for presenting my findings trying to make this work on a Mac than anything else.
First, the
pic_static_library
property on Mac isn't set for many static libraries, but this is easily resolved with https://github.com/mvukov/rules_ros2/blob/91e1b8686010944d2abcf916ec953a102e6ceef2/ros2/interfaces.bzl#L866to restore the previous behavior.
After this, we get python linking errors
So clearly somewhere CPython is not being linked properly, unfortunately I'm not good enough at bazel to really figure out where it went wrong.