undefined reference to `inflateValidate@ZLIB_1.2.9' when making navigation stack
Hi, I'm trying to build the navigation stack. I've installed all the dependencies and cloned the the github repository. When I run catkin_make I get the following error at 95%:
/home/kwint/anaconda3/lib/libpng16.so.16: undefined reference to `inflateValidate@ZLIB_1.2.9'
collect2: error: ld returned 1 exit status
navigation/navfn/CMakeFiles/navtest.dir/build.make:508: recipe for target '/home/kwint/catkin_ws/devel/lib/navfn/navtest' failed.
make[2]: *** [/home/kwint/catkin_ws/devel/lib/navfn/navtest] Error 1
CMakeFiles/Makefile2:13985: recipe for target 'navigation/navfn/CMakeFiles/navtest.dir/all' failed
I'm not sure what this error means, is something wrong the python module libpng? Could this be because I use anaconda?
I'm on Ubuntu (GNOME) 16.04 with kinetic. I installed ROS with http://wiki.ros.org/kinetic/Installat...
Please always include what arch this is, what OS you are running, how you installed ROS, etc when reporting build errors.
From the path shown in the error message I see you are using Anaconda. Does the same problem occur when you don't have that on your path?
I would recommend to build
navigation
with Anaconda off the (lib search) path(s) in any case, as the rest of ROS is most likely not linked to that version oflibpng
either, and that could cause binary incompatibilities.I've removed anaconda libpng from anaconda and now builds without errors, but this workaround, not a fix. I've removed anaconda from $PATH, but no result. How do I stop cmake to look in the anaconda package? (The zlib package in anaconda is version 1.2.11, i think that's the problem btw)
no, it is a fix. The problem is that while building, the libs provided by Anaconda take precedence, but they should not be on the search path in the first place.
As to how to configure Anaconda for use with ROS, please see the myriad of questions about that.