forced to re-emerge opencv because of the libpng update, I noticed it was still failing after the libpng-fix due to libav-0.8 incompatibility. Reproducible: Always Steps to Reproduce: 1. Upgrade to libav-0.8* 2. re-emerge openrc-2.3.0 3. watch it fail at ~23% # MAKEOPTS="-j1" emerge -1v opencv [ 23%] Building CXX object modules/highgui/CMakeFiles/opencv_highgui.dir/src/cap_ffmpeg.o In file included from /var/tmp/portage/media-libs/opencv-2.3.0/work/OpenCV-2.3.0/modules/highgui/src/cap_ffmpeg.cpp:45:0: /var/tmp/portage/media-libs/opencv-2.3.0/work/OpenCV-2.3.0/modules/highgui/src/cap_ffmpeg_impl.hpp: In member function ‘bool CvCapture_FFMPEG::reopen()’: /var/tmp/portage/media-libs/opencv-2.3.0/work/OpenCV-2.3.0/modules/highgui/src/cap_ffmpeg_impl.hpp:440:5: warning: ‘int av_open_input_file(AVFormatContext**, const char*, AVInputFormat*, int, AVFormatParameters*)’ is deprecated (declared at /usr/include/libavformat/avformat.h:1084) /var/tmp/portage/media-libs/opencv-2.3.0/work/OpenCV-2.3.0/modules/highgui/src/cap_ffmpeg_impl.hpp:440:52: warning: ‘int av_open_input_file(AVFormatContext**, const char*, AVInputFormat*, int, AVFormatParameters*)’ is deprecated (declared at /usr/include/libavformat/avformat.h:1084) /var/tmp/portage/media-libs/opencv-2.3.0/work/OpenCV-2.3.0/modules/highgui/src/cap_ffmpeg_impl.hpp:441:5: warning: ‘int av_find_stream_info(AVFormatContext*)’ is deprecated (declared at /usr/include/libavformat/avformat.h:1135) /var/tmp/portage/media-libs/opencv-2.3.0/work/OpenCV-2.3.0/modules/highgui/src/cap_ffmpeg_impl.hpp:441:27: warning: ‘int av_find_stream_info(AVFormatContext*)’ is deprecated (declared at /usr/include/libavformat/avformat.h:1135) /var/tmp/portage/media-libs/opencv-2.3.0/work/OpenCV-2.3.0/modules/highgui/src/cap_ffmpeg_impl.hpp:448:5: warning: ‘int avcodec_open(AVCodecContext*, AVCodec*)’ is deprecated (declared at /usr/include/libavcodec/avcodec.h:3705) /var/tmp/portage/media-libs/opencv-2.3.0/work/OpenCV-2.3.0/modules/highgui/src/cap_ffmpeg_impl.hpp:448:28: warning: ‘int avcodec_open(AVCodecContext*, AVCodec*)’ is deprecated (declared at /usr/include/libavcodec/avcodec.h:3705) /var/tmp/portage/media-libs/opencv-2.3.0/work/OpenCV-2.3.0/modules/highgui/src/cap_ffmpeg_impl.hpp: In member function ‘bool CvCapture_FFMPEG::open(const char*)’: /var/tmp/portage/media-libs/opencv-2.3.0/work/OpenCV-2.3.0/modules/highgui/src/cap_ffmpeg_impl.hpp:475:15: warning: ‘int av_open_input_file(AVFormatContext**, const char*, AVInputFormat*, int, AVFormatParameters*)’ is deprecated (declared at /usr/include/libavformat/avformat.h:1084) /var/tmp/portage/media-libs/opencv-2.3.0/work/OpenCV-2.3.0/modules/highgui/src/cap_ffmpeg_impl.hpp:475:63: warning: ‘int av_open_input_file(AVFormatContext**, const char*, AVInputFormat*, int, AVFormatParameters*)’ is deprecated (declared at /usr/include/libavformat/avformat.h:1084) /var/tmp/portage/media-libs/opencv-2.3.0/work/OpenCV-2.3.0/modules/highgui/src/cap_ffmpeg_impl.hpp:480:11: warning: ‘int av_find_stream_info(AVFormatContext*)’ is deprecated (declared at /usr/include/libavformat/avformat.h:1135) /var/tmp/portage/media-libs/opencv-2.3.0/work/OpenCV-2.3.0/modules/highgui/src/cap_ffmpeg_impl.hpp:480:33: warning: ‘int av_find_stream_info(AVFormatContext*)’ is deprecated (declared at /usr/include/libavformat/avformat.h:1135) /var/tmp/portage/media-libs/opencv-2.3.0/work/OpenCV-2.3.0/modules/highgui/src/cap_ffmpeg_impl.hpp:495:13: warning: ‘int avcodec_open(AVCodecContext*, AVCodec*)’ is deprecated (declared at /usr/include/libavcodec/avcodec.h:3705) /var/tmp/portage/media-libs/opencv-2.3.0/work/OpenCV-2.3.0/modules/highgui/src/cap_ffmpeg_impl.hpp:495:36: warning: ‘int avcodec_open(AVCodecContext*, AVCodec*)’ is deprecated (declared at /usr/include/libavcodec/avcodec.h:3705) In file included from /var/tmp/portage/media-libs/opencv-2.3.0/work/OpenCV-2.3.0/modules/highgui/src/cap_ffmpeg.cpp:45:0: /var/tmp/portage/media-libs/opencv-2.3.0/work/OpenCV-2.3.0/modules/highgui/src/cap_ffmpeg_impl.hpp: In function ‘int icv_av_write_frame_FFMPEG(AVFormatContext*, AVStream*, uint8_t*, uint32_t, AVFrame*)’: /var/tmp/portage/media-libs/opencv-2.3.0/work/OpenCV-2.3.0/modules/highgui/src/cap_ffmpeg_impl.hpp:1046:90: error: ‘av_rescale_q’ was not declared in this scope /var/tmp/portage/media-libs/opencv-2.3.0/work/OpenCV-2.3.0/modules/highgui/src/cap_ffmpeg_impl.hpp: In member function ‘void CvVideoWriter_FFMPEG::close()’: /var/tmp/portage/media-libs/opencv-2.3.0/work/OpenCV-2.3.0/modules/highgui/src/cap_ffmpeg_impl.hpp:1216:3: warning: ‘int url_fclose(AVIOContext*)’ is deprecated (declared at /usr/include/libavformat/avio.h:279) /var/tmp/portage/media-libs/opencv-2.3.0/work/OpenCV-2.3.0/modules/highgui/src/cap_ffmpeg_impl.hpp:1216:20: warning: ‘int url_fclose(AVIOContext*)’ is deprecated (declared at /usr/include/libavformat/avio.h:279) /var/tmp/portage/media-libs/opencv-2.3.0/work/OpenCV-2.3.0/modules/highgui/src/cap_ffmpeg_impl.hpp: In member function ‘bool CvVideoWriter_FFMPEG::open(const char*, int, double, int, int, bool)’: /var/tmp/portage/media-libs/opencv-2.3.0/work/OpenCV-2.3.0/modules/highgui/src/cap_ffmpeg_impl.hpp:1319:9: warning: ‘int av_set_parameters(AVFormatContext*, AVFormatParameters*)’ is deprecated (declared at /usr/include/libavformat/avformat.h:1398) /var/tmp/portage/media-libs/opencv-2.3.0/work/OpenCV-2.3.0/modules/highgui/src/cap_ffmpeg_impl.hpp:1319:35: warning: ‘int av_set_parameters(AVFormatContext*, AVFormatParameters*)’ is deprecated (declared at /usr/include/libavformat/avformat.h:1398) /var/tmp/portage/media-libs/opencv-2.3.0/work/OpenCV-2.3.0/modules/highgui/src/cap_ffmpeg_impl.hpp:1323:5: warning: ‘void dump_format(AVFormatContext*, int, const char*, int)’ is deprecated (declared at /usr/include/libavformat/avformat.h:1520) /var/tmp/portage/media-libs/opencv-2.3.0/work/OpenCV-2.3.0/modules/highgui/src/cap_ffmpeg_impl.hpp:1323:35: warning: ‘void dump_format(AVFormatContext*, int, const char*, int)’ is deprecated (declared at /usr/include/libavformat/avformat.h:1520) /var/tmp/portage/media-libs/opencv-2.3.0/work/OpenCV-2.3.0/modules/highgui/src/cap_ffmpeg_impl.hpp:1350:15: warning: ‘int avcodec_open(AVCodecContext*, AVCodec*)’ is deprecated (declared at /usr/include/libavcodec/avcodec.h:3705) /var/tmp/portage/media-libs/opencv-2.3.0/work/OpenCV-2.3.0/modules/highgui/src/cap_ffmpeg_impl.hpp:1350:36: warning: ‘int avcodec_open(AVCodecContext*, AVCodec*)’ is deprecated (declared at /usr/include/libavcodec/avcodec.h:3705) /var/tmp/portage/media-libs/opencv-2.3.0/work/OpenCV-2.3.0/modules/highgui/src/cap_ffmpeg_impl.hpp:1352:81: warning: format ‘%s’ expects type ‘char*’, but argument 4 has type ‘int’ /var/tmp/portage/media-libs/opencv-2.3.0/work/OpenCV-2.3.0/modules/highgui/src/cap_ffmpeg_impl.hpp:1387:13: warning: ‘int url_fopen(AVIOContext**, const char*, int)’ is deprecated (declared at /usr/include/libavformat/avio.h:278) /var/tmp/portage/media-libs/opencv-2.3.0/work/OpenCV-2.3.0/modules/highgui/src/cap_ffmpeg_impl.hpp:1387:52: warning: ‘int url_fopen(AVIOContext**, const char*, int)’ is deprecated (declared at /usr/include/libavformat/avio.h:278) /var/tmp/portage/media-libs/opencv-2.3.0/work/OpenCV-2.3.0/modules/highgui/src/cap_ffmpeg_impl.hpp:1393:5: warning: ‘int av_write_header(AVFormatContext*)’ is deprecated (declared at /usr/include/libavformat/avformat.h:1456) /var/tmp/portage/media-libs/opencv-2.3.0/work/OpenCV-2.3.0/modules/highgui/src/cap_ffmpeg_impl.hpp:1393:25: warning: ‘int av_write_header(AVFormatContext*)’ is deprecated (declared at /usr/include/libavformat/avformat.h:1456) make[2]: *** [modules/highgui/CMakeFiles/opencv_highgui.dir/src/cap_ffmpeg.o] Error 1 make[1]: *** [modules/highgui/CMakeFiles/opencv_highgui.dir/all] Error 2 make: *** [all] Error 2
Created attachment 287367 [details] full build.log
Created attachment 287369 [details, diff] first attempt at ebuild bump, removing obsolete(?) patches opencv-2.3.1 adds libav-0.8 compatibility as described in http://opencv.willowgarage.com/wiki/OpenCV%20Change%20Logs "We now support the latest FFMPEG (0.8.x) that features multi-threaded decoding. Reading videos in OpenCV has never been that fast. "
Please attach build log as attachment next time.
(In reply to comment #2) > Created attachment 287369 [details, diff] > first attempt at ebuild bump, removing obsolete(?) patches Going to take some time. The convert-sets-to-options patch is still needed.
*** Bug 388771 has been marked as a duplicate of this bug. ***
Created attachment 291853 [details, diff] opencv-2.3.1-convert_sets_to_options.patch New convert_sets_to_options.patch for 2.3.1
Created attachment 291855 [details, diff] opencv-2.3.1.ebuild (patch against 2.3.0-r1) new ebuild: - includes the new patch and removes all else except numpy.patch - added REV="a" variable because of tar.bz2 silent bump Works for me, puts all the files in the right places, BUT unfortunately still fails with media-video/libav-0.8_pre20110818 when USE="ffmpeg". I didn't check but I read somewhere that this version needs media-video/ffmpeg-0.8 to compile.
(In reply to comment #6) > Created attachment 291853 [details, diff] > opencv-2.3.1-convert_sets_to_options.patch > > New convert_sets_to_options.patch for 2.3.1 Cool, thanks! Give me two days (real life...) then I'll have a look.
Indeed. Bumped and specified in dependencies.
The problem was a missing include, fixed now.
Confirmed successful USE="ffmpeg" build, thx!