[osg-users] [build] make : Build error on FFmpegClocks.hpp while compiling OSG-dev

Robert Osfield robert.osfield at gmail.com
Wed Mar 4 05:47:12 PST 2009


HI David,

On Wed, Mar 4, 2009 at 1:30 PM, david bruyer <osgforum at tevs.eu> wrote:
> sure.
>
> Here is the output :
>...
> /usr/bin/cmake -E cmake_progress_report /home/player/FlightGear-dev/build/OpenSceneGraph/CMakeFiles 98
> [100%] Building CXX object src/osgPlugins/ffmpeg/CMakeFiles/osgdb_ffmpeg.dir/FFmpegClocks.o
> cd /home/player/FlightGear-dev/build/OpenSceneGraph/src/osgPlugins/ffmpeg && /usr/bin/c++   -DOSG_DEBUG_POSTFIX=d -DUSE_SWSCALE -Dosgdb_ffmpeg_EXPORTS  -Wall -Wparentheses -Wno-long-long -Wno-import -pedantic -Wreturn-type -Wmissing-braces -Wunknown-pragmas -Wunused -fpermissive -O3 -DNDEBUG -fPIC -I/home/player/FlightGear-dev/build/OpenSceneGraph/include -I/libavformat -I/ffmpeg -I/libavdevice -I/libavcodec -I/libswscale   -o CMakeFiles/osgdb_ffmpeg.dir/FFmpegClocks.o -c /home/player/FlightGear-dev/build/OpenSceneGraph/src/osgPlugins/ffmpeg/FFmpegClocks.cpp

OK, this suggests to me that FFMPEG_LIBAVCODEC_INCLUDE_DIRS and other
associated cmake variables are blank for some reason.  These variables
are set up by OpenSceneGraph/CMakeModules/FindFFmpeg.cmake the code
being:

    pkg_check_modules(FFMPEG_LIBAVFORMAT libavformat)
    pkg_check_modules(FFMPEG_LIBAVDEVICE libavdevice)
    pkg_check_modules(FFMPEG_LIBAVCODEC libavcodec)
    pkg_check_modules(FFMPEG_LIBAVUTIL libavutil)
    pkg_check_modules(FFMPEG_LIBSWSCALE libswscale)

For some reason pkg_check_modules is not setting the *_INCLUDE_DIRS
vars correctly.  Which version of Cmake do you have on your system?

Could you try removing your OpenSceneGraph/CMakeCache.txt and then
re-run cmake ie.

  cd OpenSceneGraph
  rm CMakeCache.txt
  ./configure
  make

There is chance that forcing cmake to go find the ffmpeg again might
fix things if an earlier rev of our FindFFmpeg.cmake wasn't previously
working.

Could you also try doing:
> pkg-config --cflags-only-I libavcodec

To print out the include paths it should be using.

When I run pkg-cong like the above I get:

    -I/usr/local/include

When is what will be sucked into FFMPEG_LIBAVCODEC_INCLUDE_DIRS, or at
least should have been. This certainly works fine on my Kubuntu 8.10,
cmake 2.6.2 system here.

Robert.



More information about the osg-users mailing list