Ask Your Question

rclpy fails to run on arm64 after cross-compilation

asked 2019-07-23 16:43:12 -0600

dlinn gravatar image

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 (, line 137)
Failed to load entry point 'launch': invalid syntax (, line 60)
Failed to load entry point 'list': invalid syntax (, 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?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2020-02-25 09:07:11 -0600

potentialdiffer gravatar image

updated 2020-02-26 02:31:09 -0600

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

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools



Asked: 2019-07-23 16:40:32 -0600

Seen: 98 times

Last updated: Feb 26