ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
1

undefined reference to `inflateValidate@ZLIB_1.2.9' when making navigation stack

asked 2018-03-19 07:14:57 -0500

kwint gravatar image

updated 2018-03-20 00:35:12 -0500

jayess gravatar image

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...

edit retag flag offensive close merge delete

Comments

2

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?

gvdhoorn gravatar image gvdhoorn  ( 2018-03-19 09:48:55 -0500 )edit
2

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 of libpng either, and that could cause binary incompatibilities.

gvdhoorn gravatar image gvdhoorn  ( 2018-03-19 11:26:14 -0500 )edit

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)

kwint gravatar image kwint  ( 2018-03-19 16:12:10 -0500 )edit

but this workaround, not a fix.

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.

gvdhoorn gravatar image gvdhoorn  ( 2018-03-20 02:46:57 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2018-05-10 07:33:22 -0500

Markus gravatar image

First of all check that you sourced in your current terminal Conda (so that you can use conda)

Therefor a line like this one should be contained in your bashrc and be uncommented:

export PATH="/home/markus/anaconda3/bin:$PATH"

Next type:

conda remove libpng

Then comment in your bashrc this line:

export PATH="/home/markus/anaconda3/bin:$PATH"

Open a new terminal (STR+ALT+T) and try to cakin build your code again. This helped in my case

However if it does not you can try other options like :

cd /usr/lib/x86_64-linux-gnu
sudo ln -s ~/anaconda/lib/libpng16.so.16 libpng16.so.16
sudo ldconfig

But they did not help me ....

edit flag offensive delete link more

Comments

do not build code again. Your compiled code only needs libpng. Remove from conda and then run sudo apt-get install libpng16-16. This is enough. Just got this error resolved.

saurabheights gravatar image saurabheights  ( 2018-10-30 20:08:06 -0500 )edit

Question Tools

2 followers

Stats

Asked: 2018-03-19 07:14:57 -0500

Seen: 6,315 times

Last updated: May 10 '18