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

avcodec.h -- no such file (Fedora 24)

asked 2016-06-24 11:36:19 -0500

BrannonKing gravatar image

I've spent the last few days getting my ROS stack to compile on Fedora 24. It has been quite a process. I'm almost there; I have 196 out of 197 projects compiling. I have one project that won't compile: gazebo_ros. It gives this error:

fatal error: libavcodec/avcodec.h: No such file or directory

However, the file clearly exists as a locate call shows it here:

/usr/include/ffmpeg/libavcodec/avcodec.h

I'm building the package like this:

catkin_make_isolated --force-cmake --pkg gazebo_ros -DCMAKE_BUILD_TYPE=Release

I attempted to add --make-args -I /usr/include/ffmpeg but the error persists. What can I do to resolve this error? Thanks for your time.

For those others attempting to run ROS on Fedora 24, here are my notes:

I had to use Fedora 24 because Ubuntu 15.10, 16.04, and 16.10 beta all failed to handle the graphics driver properly on a new MacPro with Radeon HD 7870 cards. I tried fglrx (latest) in 15.10 with no success either.

Fedora has basic catkin packages included: sudo dnf install rospack rospack-devel python3-rosdep python3-rosinstall python3-rospkg python3-rosdistro catkin catkin-devel

I had to install these additional packages (using sudo dnf install) before the catkin_make_isolated would succeed:

freetype-freeworld cabextract xorg-x11-font-utils fontconfig curl curl-devel unzip git cmake pkg-config opencl-headers opencl-utils opencl-utils-devel libusb libusb-devel libjpeg-turbo libjpeg-turbo-devel doxygen opencl-utils clinfo mesa-libOpenCL-devel eigen3-devel gdal-devel gtest gtest-devel protobuf protobuf-c-devel protobuf-devel libdc1394 libdc1394-devel tesseract tinyxml tinyxml-devel ffmpeg ffmpeg-devel libstdc++ libstdc++-devel libstdc++-static libpng-devel jasper-devel openexr-devel libtiff-devel libwebp-devel libv4l-devel tbb-devel python-sphinx lapack lapack-devel libgphoto2-devel python-nose python-devel libudev libudev-dev orocos-kdl orocos-kdl-devel python-rosdep python-rosinstall_generator python-wstool python-rosinstall python-empy console-bridge console-bridge-devel extra-cmake-modules cmake-gui poco poco-devel boost boost-random boost-static boost-system boost-thread boost-timer sip sip-devel python3-sip python3-sip-devel pyside-tools python-pyside python-pyside-devel python2-pyudev-pyside python-qt5 python-qt5-devel redhat-rpm-config lz4 lz4-devel lzma lzma-devel urdfdom urdfdom-devel urdfdom-headers-devel qhull qhull-devel assimp assimp-devel collada-dom collada-dom-devel python2-numpy python2-numpy-f2py python3-numpy python3-numpy-f2py ogre ogre-devel libyaml libyaml-devel yaml-cpp yaml-cpp-devel yaml-cpp03 yaml-cpp03-devel python-netifaces python3-netifaces python2-defusedxml python3-defusedxml

I was also working on kinect2 at the same time so some of those projects may apply to that.

Had to make these links: sudo ln -s /usr/bin/qmake-qt5 /usr/bin/qmake sudo ln -s /usr/lib64/libassimp.so /usr/lib64/libassimpd.so

I did openCV 3.1 straight from Github because the catkin auto-dep wouldn't compile: 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

one of the projects fails to detected ASSIMP_UNIFIED, so I had to compile Catkin like this: ./src/catkin/bin/catkin_make_isolated --install -DCMAKE_BUILD_TYPE=Release -DASSIMP_UNIFIED_HEADER_NAMES=ON

RViz failed with this error: /home/sbir/Workspace/Catkin/src/rviz/src/rviz/default_plugin/effort_display.h:45:36: error: unable to find ...

(more)
edit retag flag offensive close merge delete

Comments

I think the best way to approach this would be to find the package/CMakeLists.txt that does a find_package(..) (or the pkg-config equivalent) for ffmpeg. Somehow not all include paths are setup correctly on F24. Or some pkg is depending transitively on ffmpeg (through another dep).

gvdhoorn gravatar image gvdhoorn  ( 2016-06-25 02:43:58 -0500 )edit

Could that simlink sudo ln -s /usr/bin/qmake-qt5 /usr/bin/qmake break something else ? I'm having trouble understanding what it does. Culd you please quickly explain ?

Maya gravatar image Maya  ( 2016-10-20 09:44:44 -0500 )edit

I think if you had both QT4 and QT5 installed, one would expect /usr/bin/qmake to correspond to version 4.

BrannonKing gravatar image BrannonKing  ( 2016-10-20 11:11:10 -0500 )edit

@BrannonKing Hello, I am also having some trouble to build ROS Kinetic with Fedora 24. If you have some time, maybe you can take a look to my question and somehow compare the configuration?

Kabe gravatar image Kabe  ( 2016-10-24 04:04:48 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2016-06-30 11:24:53 -0500

BrannonKing gravatar image

As suggested in the comment, I proceeded to modify all the CMakeLists.txt in the gazebo_ros_pkgs. The modification was to add /usr/include/ffmpeg to the include_directories list. After that gazebo_ros_pkgs compiled fine. Alas, they don't run right on Fedora 24 even after that. They continue to look for Gazebo in the wrong location.

edit flag offensive delete link more

Question Tools

2 followers

Stats

Asked: 2016-06-24 11:36:19 -0500

Seen: 1,791 times

Last updated: Jun 30 '16