User Tools

Site Tools


compile_pcl

Notes on Source compile a.k.a. Roll-your-own PCL Libraries

Here's what I did to compile my own version of the Point Cloud Library.

arwillis@visionlab16-pc:~$ mkdir pcl-1.8
arwillis@visionlab16-pc:~$ cd pcl-1.8
arwillis@visionlab16-pc:~/pcl-1.8$ git clone https://github.com/PointCloudLibrary/pcl.git
Cloning into 'pcl'...
remote: Counting objects: 100607, done.
remote: Compressing objects: 100% (20/20), done.
remote: Total 100607 (delta 5), reused 2 (delta 2), pack-reused 100583
Receiving objects: 100% (100607/100607), 214.04 MiB | 1.76 MiB/s, done.
Resolving deltas: 100% (64218/64218), done.
Checking connectivity... done.
Checking out files: 100% (3403/3403), done.
arwillis@visionlab16-pc:~/pcl-1.8$ mkdir release
arwillis@visionlab16-pc:~/pcl-1.8$ cd release
arwillis@visionlab16-pc:~/pcl-1.8/release$ cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=../dist ../pcl
...
arwillis@visionlab16-pc:~/pcl-1.8/release$ make -j4
...
arwillis@visionlab16-pc:~/pcl-1.8/release$ make -j4
...
arwillis@visionlab16-pc:~/pcl-1.8/release$ make install
...

I had to run the make function twice as this error occurred on my first run of make.

arwillis@visionlab16-pc:~/pcl-1.8/release$ make -j4
...
[ 29%] Building CXX object filters/CMakeFiles/pcl_filters.dir/src/voxel_grid_label.cpp.o
/home.old/arwillis/pcl/pcl/filters/src/voxel_grid_label.cpp: In member function ‘virtual void pcl::VoxelGridLabel::applyFilter(pcl::VoxelGrid<pcl::PointXYZRGBL>::PointCloud&)’:
/home.old/arwillis/pcl/pcl/filters/src/voxel_grid_label.cpp:46:1: internal compiler error: Segmentation fault
 pcl::VoxelGridLabel::applyFilter (PointCloud &output)
 ^
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-4.8/README.Bugs> for instructions.
The bug is not reproducible, so it is likely a hardware or OS problem.
make[2]: *** [filters/CMakeFiles/pcl_filters.dir/src/voxel_grid_label.cpp.o] Error 1
make[1]: *** [filters/CMakeFiles/pcl_filters.dir/all] Error 2
make: *** [all] Error 2
arwillis@visionlab16-pc:~/pcl-1.8/release$ make -j4

Note that it took my computer a VERY long time (2 hrs+) to compile the library. I believe this is largely due to the Release option which builds the libraries with all possible optimizations / efficiencies enabled for the compilers.

compile_pcl.txt · Last modified: 2015/08/20 12:39 by arwillis