Ask Your Question
0

Compilling ROS2 on Rasperry Pi

asked 2018-09-26 04:34:53 -0600

uthinu gravatar image

updated 2018-09-27 03:50:42 -0600

Hi, I try to compile ROS2 on Raspebbry Pi yet it seems that there is not enough memory with colcon's parallel compilation. I tried -executor sequential as in https://colcon.readthedocs.io/en/rele... but I still see cc1plus four times in top.Is there any method of compilling in series?

EDIT: With 3 GB of swap it builds, but due to the used amount of swap space, I guess that making the compilation serial would help.

edit retag flag offensive close merge delete

Comments

Can you share the error you are getting ? and the command used for the compilation ?

pokitoz gravatar imagepokitoz ( 2018-09-26 05:33:44 -0600 )edit

The command was colcon build --symlink-install --merge-install --executor sequential. It seems that these were not compilation errors, but random errors of the build system because there was no more memory. Now I added 2GB of swap on a USB stick and try to build again.

uthinu gravatar imageuthinu ( 2018-09-26 06:25:42 -0600 )edit

At first I though you were talking about RAM memory. Thanks for the added details. My folder containing ROS2 is more than 2GB. so I wonder if this will be enough.

pokitoz gravatar imagepokitoz ( 2018-09-26 07:25:06 -0600 )edit

Yes, I was indeed talking about RAM, thus 2GB of swap.

uthinu gravatar imageuthinu ( 2018-09-26 07:27:28 -0600 )edit

Sorry, I read too quickly -.-'

pokitoz gravatar imagepokitoz ( 2018-09-26 07:29:16 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
3

answered 2018-10-02 09:19:23 -0600

clalancette gravatar image

There are two different multi-build concepts in colcon. The first one is how many executors to use; that essentially limits how many packages colcon will attempt to keep in flight at once, and is controlled by --executor-sequential/parallel. The second one is how many cores each package will use to do the build. That is actually controlled by the underlying CMake implementation (and Make below that). If you want to ensure that only a single C++ file from a single package is built at once, you'll need to make sure both of them are set properly. The following should do what you are looking for:

MAKEFLAGS="-j1 -l1" colcon build --symlink-install --merge-install --executor-sequential

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

1 follower

Stats

Asked: 2018-09-26 04:34:53 -0600

Seen: 227 times

Last updated: Oct 02 '18