0
$\begingroup$

Rosanswers logo

Hi,

does anybody know, how to minimize the memory needed for gcc/g++ to compile a particular package? I'm trying to compile the pcl_ros package on a BeagleBoard-xM, but the compiler crashes each time because the cc1plus process is being killed due to low memory (BB-xM has 500MB of RAM). I've read a lot about this already, but found no solution. I've already been able to compile openni and flann (which also caused errors).

The only thing I'd like to try out and wasn't still able to is adding a "-finline-limit 600" (the number here may differ) compiler flag, as I don't know how to use the rosbuild_add_compile_flags(target flag) macro in case of flags with values.

Any help would be appreciated. I think being able to use Kinect on an ARM based board would be great and the effort is well worth it. Among small single board computers, ARM based boards cost 10 times less than, for instance, the AscTec Atom with similar capabilities.

Also, if anyone out there has got a PandaBoard and would like to check whether what I've found out so far works with it, please let know.

Cheers, Tom


Originally posted by tom on ROS Answers with karma: 1079 on 2011-02-24

Post score: 1


Original comments

Comment by tom on 2011-02-24:
@Eric: I wrote a simple HowTo here: http://answers.ros.org/question/130/openni-compilation-error-diamondback-version?answer=296#296 . It's still dirty, but worked all right.

Comment by Eric Perko on 2011-02-24:
Tom, I've got an IGEPv2 board and would be interested in trying out your patches that got OpenNI to compile.

$\endgroup$

3 Answers 3

0
$\begingroup$

Rosanswers logo

Coming from an embedded systems background, when working with resource-limited embedded systems the usual solution is to cross-compile. You'd gain compilation speed (assuming your desktop has better specs than a 500MB-RAM Cortex ARM) as well as bypass memory problems like the one you're having.

The eros stack was started a while back to help get ROS onto more embedded systems. I'm not sure how far along it is, but there seems to be some helpful tutorials:

http://www.ros.org/wiki/eros/CrossCompileBuildEnvironment


Originally posted by JeffRousseau with karma: 1607 on 2011-02-24

This answer was ACCEPTED on the original site

Post score: 2

$\endgroup$
0
$\begingroup$

Rosanswers logo

use a cross compiler on your workstation


Originally posted by Jochen Sprickerhof with karma: 46 on 2011-02-24

This answer was NOT ACCEPTED on the original site

Post score: 1


Original comments

Comment by tom on 2011-02-24:
That's one of the possibilities I've forgotten to list above, thanks :). The point is, I don't know how to do it (yet), so maybe there is a simpler way via reducing the memory needed by the compiler.

$\endgroup$
0
$\begingroup$

Rosanswers logo

Jeff's right, if you're investing a serious amount of work in small cpu's (year long project or more), you'll drink far too much coffee waiting for your compiling to complete. Growing a beard and cross compiling can save you a tremendous amount of time.

If you've a toolchain, then eros has cross-compiling tools and support for at least the core ros packages. Getting everything to work all the way out to pcl-land on ros may require some extra work (thats where you can do your bit for eros - patches and information are welcome!). It's definitely a nice target though, specially with the near future looking at running gpu'd pcl on arm+nvidia combination boards.

One area where eros is lacking at the moment is in information on how to roll your own filesystems/toolchains and we'll start looking at remedying that in the near future.


Originally posted by Daniel Stonier with karma: 3170 on 2011-02-24

This answer was NOT ACCEPTED on the original site

Post score: 1


Original comments

Comment by Straszheim on 2011-02-24:
How important is the beard? Aside: I don't know of any upcoming boards from nvidia that combine ARM and a gpu that can run CUDA code (which gpu'd pcl will require). e.g. the tegras don't run CUDA code.

Comment by tom on 2011-02-24:
Up until now compiling ROS on the BB directly wasn't too annoying, took not more than 3 hours to build a mobile variant with most of the openNI and its dependencies. But PCL_ROS really causes frustration :(, hope I'll manage to build that after all. I'll read about cross-compilation...

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.