Gentoo has a patch replacing img_convert(): http://bugs.gentoo.org/attachment.cgi?id=130219&action=edit I modified it to quilt format and applied it (see attachment), but a build still fails. Now I'm really stuck, since my C/C++ skills are not very good. To get as far as I'm now: * put the patch and the patch in the previous post in debian/patches * modify the debian/patches/series file to include the patches * add libswscale-dev to the build deps in the control file * build -> error.... I tried it with a latest ffmpeg build and with the ffmpeg from the ubuntu jaunty archives. Build fail output: g++ -DHAVE_CONFIG_H -I. -I../.. -I. -I../../cxcore/include -I../../cv/include -pthread -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -D_REENTRANT -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/directfb -I/usr/include/libpng12 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -DNDEBUG -fno-strict-aliasing -Wall -g -fopenmp -O2 -g -MT cvcap_ffmpeg.lo -MD -MP -MF .deps/cvcap_ffmpeg.Tpo -c cvcap_ffmpeg.cpp -fPIC -DPIC -o .libs/cvcap_ffmpeg.o cvcap_ffmpeg.cpp:61: error: two or more data types in declaration of ‘img_convert_ctx’ cvcap_ffmpeg.cpp:63: error: expected unqualified-id before ‘{’ token cvcap_ffmpeg.cpp:74: error: declaration does not declare anything cvcap_ffmpeg.cpp: In function ‘void icvCloseAVI_FFMPEG(CvCaptureAVI_FFMPEG*)’: cvcap_ffmpeg.cpp:80: error: invalid use of incomplete type ‘struct CvCaptureAVI_FFMPEG’ cvcap_ffmpeg.cpp:60: error: forward declaration of ‘struct CvCaptureAVI_FFMPEG’ cvcap_ffmpeg.cpp:81: error: invalid use of incomplete type ‘struct CvCaptureAVI_FFMPEG’ cvcap_ffmpeg.cpp:60: error: forward declaration of ‘struct CvCaptureAVI_FFMPEG’ cvcap_ffmpeg.cpp:83: error: invalid use of incomplete type ‘struct CvCaptureAVI_FFMPEG’ cvcap_ffmpeg.cpp:60: error: forward declaration of ‘struct CvCaptureAVI_FFMPEG’ cvcap_ffmpeg.cpp:86: error: invalid use of incomplete type ‘struct CvCaptureAVI_FFMPEG’ cvcap_ffmpeg.cpp:60: error: forward declaration of ‘struct CvCaptureAVI_FFMPEG’ cvcap_ffmpeg.cpp:90: error: invalid use of incomplete type ‘struct CvCaptureAVI_FFMPEG’ cvcap_ffmpeg.cpp:60: error: forward declaration of ‘struct CvCaptureAVI_FFMPEG’ cvcap_ffmpeg.cpp:93: error: invalid use of incomplete type ‘struct CvCaptureAVI_FFMPEG’ cvcap_ffmpeg.cpp:60: error: forward declaration of ‘struct CvCaptureAVI_FFMPEG’ cvcap_ffmpeg.cpp:95: error: invalid use of incomplete type ‘struct CvCaptureAVI_FFMPEG’ cvcap_ffmpeg.cpp:60: error: forward declaration of ‘struct CvCaptureAVI_FFMPEG’ cvcap_ffmpeg.cpp:96: error: invalid use of incomplete type ‘struct CvCaptureAVI_FFMPEG’ cvcap_ffmpeg.cpp:60: error: forward declaration of ‘struct CvCaptureAVI_FFMPEG’ cvcap_ffmpeg.cpp:99: error: invalid use of incomplete type ‘struct CvCaptureAVI_FFMPEG’ cvcap_ffmpeg.cpp:60: error: forward declaration of ‘struct CvCaptureAVI_FFMPEG’ cvcap_ffmpeg.cpp:100: error: invalid use of incomplete type ‘struct CvCaptureAVI_FFMPEG’ cvcap_ffmpeg.cpp:60: error: forward declaration of ‘struct CvCaptureAVI_FFMPEG’ cvcap_ffmpeg.cpp:100: error: invalid use of incomplete type ‘struct CvCaptureAVI_FFMPEG’ cvcap_ffmpeg.cpp:60: error: forward declaration of ‘struct CvCaptureAVI_FFMPEG’ cvcap_ffmpeg.cpp:102: error: invalid use of incomplete type ‘struct CvCaptureAVI_FFMPEG’ cvcap_ffmpeg.cpp:60: error: forward declaration of ‘struct CvCaptureAVI_FFMPEG’ cvcap_ffmpeg.cpp:102: error: invalid use of incomplete type ‘struct CvCaptureAVI_FFMPEG’ cvcap_ffmpeg.cpp:60: error: forward declaration of ‘struct CvCaptureAVI_FFMPEG’ cvcap_ffmpeg.cpp: In function ‘int icvOpenAVI_FFMPEG(CvCaptureAVI_FFMPEG*, const char*)’: cvcap_ffmpeg.cpp:111: error: invalid use of incomplete type ‘struct CvCaptureAVI_FFMPEG’ cvcap_ffmpeg.cpp:60: error: forward declaration of ‘struct CvCaptureAVI_FFMPEG’ cvcap_ffmpeg.cpp:112: error: invalid use of incomplete type ‘struct CvCaptureAVI_FFMPEG’ cvcap_ffmpeg.cpp:60: error: forward declaration of ‘struct CvCaptureAVI_FFMPEG’ cvcap_ffmpeg.cpp:113: error: invalid use of incomplete type ‘struct CvCaptureAVI_FFMPEG’ cvcap_ffmpeg.cpp:60: error: forward declaration of ‘struct CvCaptureAVI_FFMPEG’ cvcap_ffmpeg.cpp:122: error: invalid use of incomplete type ‘struct CvCaptureAVI_FFMPEG’ cvcap_ffmpeg.cpp:60: error: forward declaration of ‘struct CvCaptureAVI_FFMPEG’ cvcap_ffmpeg.cpp:128: warning: comparison between signed and unsigned integer expressions cvcap_ffmpeg.cpp:141: error: invalid use of incomplete type ‘struct CvCaptureAVI_FFMPEG’ cvcap_ffmpeg.cpp:60: error: forward declaration of ‘struct CvCaptureAVI_FFMPEG’ cvcap_ffmpeg.cpp:142: error: invalid use of incomplete type ‘struct CvCaptureAVI_FFMPEG’ cvcap_ffmpeg.cpp:60: error: forward declaration of ‘struct CvCaptureAVI_FFMPEG’ cvcap_ffmpeg.cpp:143: error: invalid use of incomplete type ‘struct CvCaptureAVI_FFMPEG’ cvcap_ffmpeg.cpp:60: error: forward declaration of ‘struct CvCaptureAVI_FFMPEG’ cvcap_ffmpeg.cpp:145: error: invalid use of incomplete type ‘struct CvCaptureAVI_FFMPEG’ cvcap_ffmpeg.cpp:60: error: forward declaration of ‘struct CvCaptureAVI_FFMPEG’ cvcap_ffmpeg.cpp:148: error: invalid use of incomplete type ‘struct CvCaptureAVI_FFMPEG’ cvcap_ffmpeg.cpp:60: error: forward declaration of ‘struct CvCaptureAVI_FFMPEG’ cvcap_ffmpeg.cpp:148: error: invalid use of incomplete type ‘struct CvCaptureAVI_FFMPEG’ cvcap_ffmpeg.cpp:60: error: forward declaration of ‘struct CvCaptureAVI_FFMPEG’ cvcap_ffmpeg.cpp:151: error: invalid use of incomplete type ‘struct CvCaptureAVI_FFMPEG’ cvcap_ffmpeg.cpp:60: error: forward declaration of ‘struct CvCaptureAVI_FFMPEG’ cvcap_ffmpeg.cpp:153: error: invalid use of incomplete type ‘struct CvCaptureAVI_FFMPEG’ cvcap_ffmpeg.cpp:60: error: forward declaration of ‘struct CvCaptureAVI_FFMPEG’ cvcap_ffmpeg.cpp:153: error: invalid use of incomplete type ‘struct CvCaptureAVI_FFMPEG’ cvcap_ffmpeg.cpp:60: error: forward declaration of ‘struct CvCaptureAVI_FFMPEG’ cvcap_ffmpeg.cpp:154: error: invalid use of incomplete type ‘struct CvCaptureAVI_FFMPEG’ cvcap_ffmpeg.cpp:60: error: forward declaration of ‘struct CvCaptureAVI_FFMPEG’ cvcap_ffmpeg.cpp: In function ‘int icvGrabFrameAVI_FFMPEG(CvCaptureAVI_FFMPEG*)’: cvcap_ffmpeg.cpp:186: error: invalid use of incomplete type ‘struct CvCaptureAVI_FFMPEG’ cvcap_ffmpeg.cpp:60: error: forward declaration of ‘struct CvCaptureAVI_FFMPEG’ cvcap_ffmpeg.cpp:186: error: invalid use of incomplete type ‘struct CvCaptureAVI_FFMPEG’ cvcap_ffmpeg.cpp:60: error: forward declaration of ‘struct CvCaptureAVI_FFMPEG’ cvcap_ffmpeg.cpp:195: error: invalid use of incomplete type ‘struct CvCaptureAVI_FFMPEG’ cvcap_ffmpeg.cpp:60: error: forward declaration of ‘struct CvCaptureAVI_FFMPEG’ cvcap_ffmpeg.cpp:196: error: invalid use of incomplete type ‘struct CvCaptureAVI_FFMPEG’ cvcap_ffmpeg.cpp:60: error: forward declaration of ‘struct CvCaptureAVI_FFMPEG’ cvcap_ffmpeg.cpp:199: error: invalid use of incomplete type ‘struct CvCaptureAVI_FFMPEG’ cvcap_ffmpeg.cpp:60: error: forward declaration of ‘struct CvCaptureAVI_FFMPEG’ cvcap_ffmpeg.cpp:200: error: invalid use of incomplete type ‘struct CvCaptureAVI_FFMPEG’ cvcap_ffmpeg.cpp:60: error: forward declaration of ‘struct CvCaptureAVI_FFMPEG’ cvcap_ffmpeg.cpp:210: error: invalid use of incomplete type ‘struct CvCaptureAVI_FFMPEG’ cvcap_ffmpeg.cpp:60: error: forward declaration of ‘struct CvCaptureAVI_FFMPEG’ cvcap_ffmpeg.cpp: In function ‘const IplImage* icvRetrieveFrameAVI_FFMPEG(CvCaptureAVI_FFMPEG*)’: cvcap_ffmpeg.cpp:222: error: invalid use of incomplete type ‘struct CvCaptureAVI_FFMPEG’ cvcap_ffmpeg.cpp:60: error: forward declaration of ‘struct CvCaptureAVI_FFMPEG’ cvcap_ffmpeg.cpp:222: error: invalid use of incomplete type ‘struct CvCaptureAVI_FFMPEG’ cvcap_ffmpeg.cpp:60: error: forward declaration of ‘struct CvCaptureAVI_FFMPEG’ cvcap_ffmpeg.cpp:225: error: ‘img_convert_ctx’ was not declared in this scope cvcap_ffmpeg.cpp:225: error: invalid use of incomplete type ‘struct CvCaptureAVI_FFMPEG’ cvcap_ffmpeg.cpp:60: error: forward declaration of ‘struct CvCaptureAVI_FFMPEG’ cvcap_ffmpeg.cpp:226: error: invalid use of incomplete type ‘struct CvCaptureAVI_FFMPEG’ cvcap_ffmpeg.cpp:60: error: forward declaration of ‘struct CvCaptureAVI_FFMPEG’ cvcap_ffmpeg.cpp:227: error: invalid use of incomplete type ‘struct CvCaptureAVI_FFMPEG’ cvcap_ffmpeg.cpp:60: error: forward declaration of ‘struct CvCaptureAVI_FFMPEG’ cvcap_ffmpeg.cpp:228: error: invalid use of incomplete type ‘struct CvCaptureAVI_FFMPEG’ cvcap_ffmpeg.cpp:60: error: forward declaration of ‘struct CvCaptureAVI_FFMPEG’ cvcap_ffmpeg.cpp:229: error: invalid use of incomplete type ‘struct CvCaptureAVI_FFMPEG’ cvcap_ffmpeg.cpp:60: error: forward declaration of ‘struct CvCaptureAVI_FFMPEG’ cvcap_ffmpeg.cpp:234: error: invalid use of incomplete type ‘struct CvCaptureAVI_FFMPEG’ cvcap_ffmpeg.cpp:60: error: forward declaration of ‘struct CvCaptureAVI_FFMPEG’ cvcap_ffmpeg.cpp:235: error: invalid use of incomplete type ‘struct CvCaptureAVI_FFMPEG’ cvcap_ffmpeg.cpp:60: error: forward declaration of ‘struct CvCaptureAVI_FFMPEG’ cvcap_ffmpeg.cpp:236: error: invalid use of incomplete type ‘struct CvCaptureAVI_FFMPEG’ cvcap_ffmpeg.cpp:60: error: forward declaration of ‘struct CvCaptureAVI_FFMPEG’ cvcap_ffmpeg.cpp:237: error: invalid use of incomplete type ‘struct CvCaptureAVI_FFMPEG’ cvcap_ffmpeg.cpp:60: error: forward declaration of ‘struct CvCaptureAVI_FFMPEG’ cvcap_ffmpeg.cpp:237: error: invalid use of incomplete type ‘struct CvCaptureAVI_FFMPEG’ cvcap_ffmpeg.cpp:60: error: forward declaration of ‘struct CvCaptureAVI_FFMPEG’ cvcap_ffmpeg.cpp:239: error: invalid use of incomplete type ‘struct CvCaptureAVI_FFMPEG’ cvcap_ffmpeg.cpp:60: error: forward declaration of ‘struct CvCaptureAVI_FFMPEG’ cvcap_ffmpeg.cpp: In function ‘double icvGetPropertyAVI_FFMPEG(CvCaptureAVI_FFMPEG*, int)’: cvcap_ffmpeg.cpp:248: error: invalid use of incomplete type ‘struct CvCaptureAVI_FFMPEG’ cvcap_ffmpeg.cpp:60: error: forward declaration of ‘struct CvCaptureAVI_FFMPEG’ cvcap_ffmpeg.cpp:248: error: invalid use of incomplete type ‘struct CvCaptureAVI_FFMPEG’ cvcap_ffmpeg.cpp:60: error: forward declaration of ‘struct CvCaptureAVI_FFMPEG’ cvcap_ffmpeg.cpp:252: error: invalid use of incomplete type ‘struct CvCaptureAVI_FFMPEG’ cvcap_ffmpeg.cpp:60: error: forward declaration of ‘struct CvCaptureAVI_FFMPEG’ cvcap_ffmpeg.cpp:257: error: invalid use of incomplete type ‘struct CvCaptureAVI_FFMPEG’ cvcap_ffmpeg.cpp:60: error: forward declaration of ‘struct CvCaptureAVI_FFMPEG’ cvcap_ffmpeg.cpp:258: error: invalid use of incomplete type ‘struct CvCaptureAVI_FFMPEG’ cvcap_ffmpeg.cpp:60: error: forward declaration of ‘struct CvCaptureAVI_FFMPEG’ cvcap_ffmpeg.cpp:261: error: invalid use of incomplete type ‘struct CvCaptureAVI_FFMPEG’ cvcap_ffmpeg.cpp:60: error: forward declaration of ‘struct CvCaptureAVI_FFMPEG’ cvcap_ffmpeg.cpp:262: error: invalid use of incomplete type ‘struct CvCaptureAVI_FFMPEG’ cvcap_ffmpeg.cpp:60: error: forward declaration of ‘struct CvCaptureAVI_FFMPEG’ cvcap_ffmpeg.cpp:265: error: invalid use of incomplete type ‘struct CvCaptureAVI_FFMPEG’ cvcap_ffmpeg.cpp:60: error: forward declaration of ‘struct CvCaptureAVI_FFMPEG’ cvcap_ffmpeg.cpp:265: error: invalid use of incomplete type ‘struct CvCaptureAVI_FFMPEG’ cvcap_ffmpeg.cpp:60: error: forward declaration of ‘struct CvCaptureAVI_FFMPEG’ cvcap_ffmpeg.cpp:266: error: invalid use of incomplete type ‘struct CvCaptureAVI_FFMPEG’ cvcap_ffmpeg.cpp:60: error: forward declaration of ‘struct CvCaptureAVI_FFMPEG’ cvcap_ffmpeg.cpp:266: error: invalid use of incomplete type ‘struct CvCaptureAVI_FFMPEG’ cvcap_ffmpeg.cpp:60: error: forward declaration of ‘struct CvCaptureAVI_FFMPEG’ cvcap_ffmpeg.cpp:269: error: invalid use of incomplete type ‘struct CvCaptureAVI_FFMPEG’ cvcap_ffmpeg.cpp:60: error: forward declaration of ‘struct CvCaptureAVI_FFMPEG’ cvcap_ffmpeg.cpp:272: error: invalid use of incomplete type ‘struct CvCaptureAVI_FFMPEG’ cvcap_ffmpeg.cpp:60: error: forward declaration of ‘struct CvCaptureAVI_FFMPEG’ cvcap_ffmpeg.cpp:276: error: invalid use of incomplete type ‘struct CvCaptureAVI_FFMPEG’ cvcap_ffmpeg.cpp:60: error: forward declaration of ‘struct CvCaptureAVI_FFMPEG’ cvcap_ffmpeg.cpp:284: error: invalid use of incomplete type ‘struct CvCaptureAVI_FFMPEG’ cvcap_ffmpeg.cpp:60: error: forward declaration of ‘struct CvCaptureAVI_FFMPEG’ cvcap_ffmpeg.cpp: In function ‘int icvSetPropertyAVI_FFMPEG(CvCaptureAVI_FFMPEG*, int, double)’: cvcap_ffmpeg.cpp:297: error: invalid use of incomplete type ‘struct CvCaptureAVI_FFMPEG’ cvcap_ffmpeg.cpp:60: error: forward declaration of ‘struct CvCaptureAVI_FFMPEG’ cvcap_ffmpeg.cpp:297: error: invalid use of incomplete type ‘struct CvCaptureAVI_FFMPEG’ cvcap_ffmpeg.cpp:60: error: forward declaration of ‘struct CvCaptureAVI_FFMPEG’ cvcap_ffmpeg.cpp: In function ‘CvCapture* cvCaptureFromFile_FFMPEG(const char*)’: cvcap_ffmpeg.cpp:362: error: invalid application of ‘sizeof’ to incomplete type ‘CvCaptureAVI_FFMPEG’ cvcap_ffmpeg.cpp:363: error: invalid application of ‘sizeof’ to incomplete type ‘CvCaptureAVI_FFMPEG’ cvcap_ffmpeg.cpp:365: error: invalid use of incomplete type ‘struct CvCaptureAVI_FFMPEG’ cvcap_ffmpeg.cpp:60: error: forward declaration of ‘struct CvCaptureAVI_FFMPEG’ cvcap_ffmpeg.cpp: In function ‘CvVideoWriter* cvCreateVideoWriter(const char*, int, double, CvSize, int)’: cvcap_ffmpeg.cpp:542: warning: ‘AVFormatContext* av_alloc_format_context()’ is deprecated (declared at /usr/include/libavformat/avformat.h:873) cvcap_ffmpeg.cpp:542: warning: ‘AVFormatContext* av_alloc_format_context()’ is deprecated (declared at /usr/include/libavformat/avformat.h:873) cvcap_ffmpeg.cpp: In function ‘int cvWriteFrame(CvVideoWriter*, const IplImage*)’: cvcap_ffmpeg.cpp:725: error: ‘img_convert_ctx’ was not declared in this scope cvcap_ffmpeg.cpp: In function ‘void cvReleaseVideoWriter(CvVideoWriter**)’: cvcap_ffmpeg.cpp:797: warning: comparison between signed and unsigned integer expressions make[4]: *** [cvcap_ffmpeg.lo] Error 1 make[4]: Leaving directory `/home/gijs/Work/packaging/opencv-1.0.0/otherlibs/highgui' make[3]: *** [all-recursive] Error 1 make[3]: Leaving directory `/home/gijs/Work/packaging/opencv-1.0.0/otherlibs' make[2]: *** [all-recursive] Error 1 make[2]: Leaving directory `/home/gijs/Work/packaging/opencv-1.0.0' make[1]: *** [all] Error 2 make[1]: Leaving directory `/home/gijs/Work/packaging/opencv-1.0.0' make: *** [build-stamp] Error 2 dpkg-buildpackage: failure: debian/rules build gave error exit status 2