ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

True cross compilation of a ROS package

asked 2023-02-28 10:40:05 -0500

gustavogoretkin gravatar image

I have a ROS 2 package from which I can build a .deb for either my native platform, or for another platform by relying on Docker and QEMU. I would like to do a true cross-compile of this package, without relying on QEMU, since the compilation time of this package is a bottleneck in my workflow.

It seems that cross compilation is in a state of flux (https://discourse.ros.org/t/call-for-...). I am looking for recommendations for how to proceed.

For reasons, I am using ROS Eloquent, but I'm hoping any solution is agnostic to the ROS version (so that it works when we use a more modern distro). For concreteness, I've created a minimum example: https://github.com/ggoretkin-bdai/exa...

I can produce both

ros-eloquent-foopkg-msgs_0.0.0-0bionic_amd64.deb

and

ros-eloquent-foopkg-msgs_0.0.0-0bionic_arm64.deb

and I would like to produce the arm64.debmore efficiently by running compilation natively. Ultimately CMake needs a configuration like https://cmake.org/cmake/help/latest/m... .

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2023-03-02 18:47:14 -0500

fury.nerd gravatar image

hi, i'm not familiar with building .deb, but i managed to use docker to setup a cross compile env, to build a arm64 application with colcon build, maybe check out following repo if you haven't tried:

https://github.com/multiarch/qemu-use...

edit flag offensive delete link more

Comments

Aren't you suggesting the OP to use QEMU here, something (s)he's already doing, and is trying to avoid?

gvdhoorn gravatar image gvdhoorn  ( 2023-03-06 01:56:00 -0500 )edit

indeed...sorry for answering in such a haste...then just for a discussion, according to what i have tried once, a slightly impovement could be achieved, by compiling some "finalised" parts of the project to some libs, and compiling the "still-working" part of code in the QEMU env, then targetlink them. maybe this is not a true cross compilation, but the compilation time can be saved depending on how much of your "finalised" part is.

fury.nerd gravatar image fury.nerd  ( 2023-03-16 20:35:06 -0500 )edit

Question Tools

2 followers

Stats

Asked: 2023-02-28 10:40:05 -0500

Seen: 150 times

Last updated: Mar 02 '23