[ros-users] [PCL-users] Minimizing compiler memory, package pcl_ros

Nizar Khalifa Sallem nksallem at laas.fr
Thu Feb 24 13:47:30 UTC 2011


At Thu, 24 Feb 2011 14:27:54 +0100,
futureignobel wrote:
> 
> I've also started a thread here: 
> http://answers.ros.org/question/154/minimizing-compiler-memory-pcl_ros
> 
> Please answer there, if you can.
> 
> W dniu 24.02.2011 14:22, futureignobel pisze:
> > 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
> _______________________________________________
> PCL-users at code.ros.org / http://pointclouds.org
> https://code.ros.org/mailman/listinfo/pcl-users
You need the -O2 flag and desactivate all -O0 -ggdb or any other debug
flag. The simplest way, is to edit the CMakeLists.txt and edit the
line 
set (ROS_BUILD_TYPE RelWithDebInfo) and move it to 
set (ROS_BUILD_TYPE Release)
This should do the trick.

--
Nizar




More information about the ros-users mailing list