0

I followed this answer to install pcl(point cloud library).

But I get the following error :

[ 30%] Linking CXX executable ../../bin/pcl_openni_grabber_example
/home/nehal/anaconda3/lib/libpng.so: undefined reference to `inflateValidate@ZLIB_1.2.9'
collect2: error: ld returned 1 exit status
io/tools/CMakeFiles/pcl_openni_grabber_example.dir/build.make:289: recipe for target 'bin/pcl_openni_grabber_example' failed
make[2]: *** [bin/pcl_openni_grabber_example] Error 1
CMakeFiles/Makefile2:683: recipe for target 'io/tools/CMakeFiles/pcl_openni_grabber_example.dir/all' failed
make[1]: *** [io/tools/CMakeFiles/pcl_openni_grabber_example.dir/all] Error 2
Makefile:160: recipe for target 'all' failed
make: *** [all] Error 2

How do I resolve the error?

user7441
  • 111
  • 1

1 Answers1

0

/home/nehal/anaconda3/lib/libpng.so: undefined reference to ...

You will have to use the system "libpng.so" for compiling → /usr/lib/x86_64-linux-gnu/libpng12.so → Package = libpng12-dev . Solution: Hide away (temporarely) /home/nehal/anaconda3/lib/libpng.so.

I made a 'pcl' test build (with VTK), Ubuntu 16.04 - amd64 : pcl-master.zip https://github.com/PointCloudLibrary/pcl

sudo apt install libeigen3-dev libflann-dev libusb-1.0-0-dev libvtk6-dev

cd pcl-master/ && mkdir build && cd build/ && cmake .. && make
sudo make install

No errors ...

Knud Larsen
  • 3,084