rclpy fails to run on arm64 after cross-compilation
I performed the automated cross-compilation of ROS2 dashing for aarch64-linux-gnu. It works in qemu. However, when we copy the libraries and dependencies over to our ARM64-based embedded device and run ros2 commands, we see warnings like those below:
Failed to load entry point 'test': invalid syntax (io_handler.py, line 137)
Failed to load entry point 'launch': invalid syntax (__init__.py, line 60)
Failed to load entry point 'list': invalid syntax (executors.py, line 148)
...
Failed to load entry point 'bw': No module named 'rclpy._rclpy'
Failed to load entry point 'echo': No module named 'rclpy._rclpy'
rclcpp-based nodes will run just fine but rclpy-based nodes fail. My guess is that this is due to the fact that PYTHON_SOABI is set to aarch64-linux-gnu in the build process but it should be set specific to the machine it is running on. Does anyone have an idea of how to figure out what to set this to or know what's happening here?
Asked by dlinn on 2019-07-23 16:40:32 UTC
Answers
I ran into a similar issue, cross compiling ROS2 Dashing for raspbian.
My problem was indeed, that the PYTHON_SOABI
variable was wrong, because I copy&pasted it from the official instructions. I needed to specify the Python version to the one on raspbian, which is Python 3.5. The variable I had to export needed to be renamed to: cpython-35m-$TARGET_TRIPLE
(with TARGET_TRIPLE=arm-linux-gnueabihf
) . Look at the 35m
part, this number corresponds to the python version which in my case, I had to adjust.
So check your Python version on your target machine: python3 -V
and set the variable correctly: export PYTHON_SOABI=cpython-35m-$TARGET_TRIPLE
Asked by potentialdiffer on 2020-02-25 10:07:11 UTC
Comments