avcodec.h -- no such file (Fedora 24)
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 ...
I think the best way to approach this would be to find the package/
CMakeLists.txt
that does afind_package(..)
(or thepkg-config
equivalent) forffmpeg
. Somehow not all include paths are setup correctly on F24. Or some pkg is depending transitively onffmpeg
(through another dep).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 ?I think if you had both QT4 and QT5 installed, one would expect
/usr/bin/qmake
to correspond to version 4.@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?