Ask Your Question
0

Source compile of Kinetic on Fedora24

asked 2016-06-06 13:38:39 -0500

Maya gravatar image

Hello all,

First of all I know Fedora24 is a beta release and thus subject to bugs and other problems.

I'm trying to compile kinetic form source and I'm hitting a problem when trying to compile openCV3. It seems stdlib.h is not found :

[ 38%] Built target pch_Generate_opencv_objdetect
[ 38%] Built target pch_Generate_opencv_plot
[ 38%] Built target pch_Generate_opencv_videoio
[ 38%] Built target pch_Generate_opencv_superres
[ 38%] Built target opencv_highgui_pch_dephelp
[ 39%] Built target pch_Generate_opencv_xobjdetect
In file included from /usr/include/c++/6.1.1/bits/stl_algo.h:59:0,
                 from /usr/include/c++/6.1.1/algorithm:62,
                 from /home/malcolm/ros_catkin_ws/source_kinetic/src/opencv3/modules/core/include/opencv2/core/base.hpp:53,
                 from /home/malcolm/ros_catkin_ws/source_kinetic/src/opencv3/modules/core/include/opencv2/core.hpp:54,
                 from /home/malcolm/ros_catkin_ws/source_kinetic/src/opencv3/modules/imgcodecs/include/opencv2/imgcodecs.hpp:46,
                 from /home/malcolm/ros_catkin_ws/source_kinetic/build_isolated/opencv3/install/modules/imgcodecs/precomp.hpp:45:
/usr/include/c++/6.1.1/cstdlib:75:25: fatal error: stdlib.h: No such file or directory
 #include_next <stdlib.h>
                         ^
compilation terminated.
modules/imgcodecs/CMakeFiles/pch_Generate_opencv_imgcodecs.dir/build.make:62: recipe for target 'modules/imgcodecs/precomp.hpp.gch/opencv_imgcodecs_Release.gch' failed
make[2]: *** [modules/imgcodecs/precomp.hpp.gch/opencv_imgcodecs_Release.gch] Error 1
CMakeFiles/Makefile2:3659: recipe for target 'modules/imgcodecs/CMakeFiles/pch_Generate_opencv_imgcodecs.dir/all' failed
make[1]: *** [modules/imgcodecs/CMakeFiles/pch_Generate_opencv_imgcodecs.dir/all] Error 2
Makefile:160: recipe for target 'all' failed
make: *** [all] Error 2
<== Failed to process package 'opencv3': 
  Command '['/home/malcolm/ros_catkin_ws/source_kinetic/install_isolated/env.sh', 'make', '-j8', '-l8']' returned non-zero exit status 2

Reproduce this error by running:
==> cd /home/malcolm/ros_catkin_ws/source_kinetic/build_isolated/opencv3 && /home/malcolm/ros_catkin_ws/source_kinetic/install_isolated/env.sh make -j8 -l8

Command failed, exiting.

But stdlib.h is present in /usr/include and should be found. I can compile openCV3 from source using the github repo just fine with no problem at compile time.

If I understood correctly, Ros kinetic got its own openCV3 version that get compiled. Why can't I find stdlib.h and/or is it possible to use my own openCV3 version compiled from source.

Thanks a lot,

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2016-06-30 11:33:31 -0500

BrannonKing gravatar image

When I set up Fedora 24 recently, I had the same problem. See the notes here: http://answers.ros.org/question/23800...

I did openCV 3.1 straight from Github because the catkin auto-dep wouldn't compile. Install Eigen/dev and TBB/dev first. Use the git clone and then go to that folder and run this: cmake -D WITH_TBB=ON -D WITH_EIGEN=ON -D CMAKE_BUILD_TYPE=RELEASE -D BUILD_TESTS=OFF -D BUILD_PERF_TESTS=OFF BUILD_EXAMPLES=OFF .. make && make install

That bit me later when I had to do this for RViz and gazebo: sudo ldconfig /usr/local/lib64 /usr/local/lib

and excluded it from Catkin's pull like this: rosinstall_generator desktop --rosdistro kinetic --deps --wet-only --tar --exclude opencv3 > kinetic-desktop-wet.rosinstall

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

3 followers

Stats

Asked: 2016-06-06 13:38:39 -0500

Seen: 521 times

Last updated: Jun 30 '16