FFMpeg strikes (again)December 5, 2008 4:04 pm General
[ 89%] Building CXX object contrib/brl/bbas/vidl2/CMakeFiles/vidl2.dir/vidl2_ffmpeg_istream.o In file included from /home/dneary/src/vxl-1.11.0/contrib/brl/bbas/vidl2/vidl2_ffmpeg_istream.cxx:24: /home/dneary/src/vxl-1.11.0/contrib/brl/bbas/vidl2/vidl2_ffmpeg_istream_v2.txx:25:28: error: ffmpeg/swscale.h: No such file or directory In file included from /home/dneary/src/vxl-1.11.0/contrib/brl/bbas/vidl2/vidl2_ffmpeg_istream.cxx:24: /home/dneary/src/vxl-1.11.0/contrib/brl/bbas/vidl2/vidl2_ffmpeg_istream_v2.txx:68: error: ISO C++ forbids declaration of ‘SwsContext’ with no type /home/dneary/src/vxl-1.11.0/contrib/brl/bbas/vidl2/vidl2_ffmpeg_istream_v2.txx:68: error: expected ‘;’ before ‘*’ token /home/dneary/src/vxl-1.11.0/contrib/brl/bbas/vidl2/vidl2_ffmpeg_istream_v2.txx: In constructor ‘vidl2_ffmpeg_istream::pimpl::pimpl()’: /home/dneary/src/vxl-1.11.0/contrib/brl/bbas/vidl2/vidl2_ffmpeg_istream_v2.txx:38: error: class ‘vidl2_ffmpeg_istream::pimpl’ does not have any field named ‘sws_context_’ /home/dneary/src/vxl-1.11.0/contrib/brl/bbas/vidl2/vidl2_ffmpeg_istream_v2.txx: In member function ‘virtual vidl2_frame_sptr vidl2_ffmpeg_istream::current_frame()’: /home/dneary/src/vxl-1.11.0/contrib/brl/bbas/vidl2/vidl2_ffmpeg_istream_v2.txx:348: error: ‘struct vidl2_ffmpeg_istream::pimpl’ has no member named ‘sws_context_’ /home/dneary/src/vxl-1.11.0/contrib/brl/bbas/vidl2/vidl2_ffmpeg_istream_v2.txx:349: error: ‘struct vidl2_ffmpeg_istream::pimpl’ has no member named ‘sws_context_’ /home/dneary/src/vxl-1.11.0/contrib/brl/bbas/vidl2/vidl2_ffmpeg_istream_v2.txx:352: error: ‘SWS_BILINEAR’ was not declared in this scope /home/dneary/src/vxl-1.11.0/contrib/brl/bbas/vidl2/vidl2_ffmpeg_istream_v2.txx:353: error: ‘sws_getCachedContext’ was not declared in this scope /home/dneary/src/vxl-1.11.0/contrib/brl/bbas/vidl2/vidl2_ffmpeg_istream_v2.txx:355: error: ‘struct vidl2_ffmpeg_istream::pimpl’ has no member named ‘sws_context_’ /home/dneary/src/vxl-1.11.0/contrib/brl/bbas/vidl2/vidl2_ffmpeg_istream_v2.txx:363: error: ‘struct vidl2_ffmpeg_istream::pimpl’ has no member named ‘sws_context_’ /home/dneary/src/vxl-1.11.0/contrib/brl/bbas/vidl2/vidl2_ffmpeg_istream_v2.txx:366: error: ‘sws_scale’ was not declared in this scope make: *** [contrib/brl/bbas/vidl2/CMakeFiles/vidl2.dir/vidl2_ffmpeg_istream.o] Error 1 make: *** [contrib/brl/bbas/vidl2/CMakeFiles/vidl2.dir/all] Error 2 make: *** [all] Error 2
To anyone who has ever had to use ffmpeg as a build dependency, errors like this are commonplace – FFMpeg’s developers have adopted a position that copying individual SVN revisions into your product is the best way to use the library, and that releases and API stability are for wusses.
The end result for me is that I can’t build this library, and I have no idea how to go about fixing it. I do have ffmpeg, libavcodec-dev and the other ffmpeg libraries and headers installed (with the charmingly user-friendly and distribution-independent version number “3:0.svn20080206-12ubuntu3”) but they’re not the right version, I don’t know what is the right version, and even if I did, I wouldn’t know how to install the right version in a way that wouldn’t break a bunch of applications.
Is this stuff really that hard to get right?