0
$\begingroup$

Rosanswers logo

I'm having the following issue while running cmake_make_isolated.

~/ros_catkin_ws/src/opencv2/modules/highgui/src/grfmt_png.cpp: In member function ‘virtual bool cv::PngEncoder::write(const cv::Mat&, const std::vector&)’: ~/ros_catkin_ws/src/opencv2/modules/highgui/src/grfmt_png.cpp:361:44: error: ‘Z_RLE’ was not declared in this scope ~/ros_catkin_ws/src/opencv2/modules/highgui/src/grfmt_png.cpp:374:48: error: ‘Z_FIXED’ was not declared in this scope make[2]: *** [modules/highgui/CMakeFiles/opencv_highgui.dir/src/grfmt_png.cpp.o] Error 1 make[2]: *** Waiting for unfinished jobs.... make[1]: *** [modules/highgui/CMakeFiles/opencv_highgui.dir/all] Error 2 make[1]: *** Waiting for unfinished jobs....

I did some searching and found that Z_RLE is associated with zlib, and I checked and found that it was installed and up to date

Package zlib-1.2.7-9.fc18.x86_64 already installed and latest version

rosdep didn't report any missing dependencies. What do I do to resolve this?


Originally posted by flashedarling on ROS Answers with karma: 36 on 2013-06-10

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

I found the answer myself. I had multiple copies of libz.h on my system, one of which was older and did not have the correct definitions. By reorganizing my path I was able to get the correct libz.h file to be imported.


Originally posted by flashedarling with karma: 36 on 2013-06-12

This answer was ACCEPTED on the original site

Post score: 0

$\endgroup$