Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 384021 - media-libs/opencv-2.3.0 fails to build with >=libav-0.8; solution(?): bump to opencv-2.3.1
Summary: media-libs/opencv-2.3.0 fails to build with >=libav-0.8; solution(?): bump to...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Andreas K. Hüttel
URL: http://ozbots.org/opencv-install-trou...
Whiteboard:
Keywords:
: 388771 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-09-21 21:08 UTC by Andreas Sturmlechner
Modified: 2011-11-16 11:05 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
full build.log (build.log,25.55 KB, text/plain)
2011-09-21 21:09 UTC, Andreas Sturmlechner
Details
first attempt at ebuild bump, removing obsolete(?) patches (opencv-2.3.1.ebuild.diff,399 bytes, patch)
2011-09-21 21:17 UTC, Andreas Sturmlechner
Details | Diff
opencv-2.3.1-convert_sets_to_options.patch (opencv-2.3.1-convert_sets_to_options.patch,18.05 KB, patch)
2011-11-07 00:16 UTC, Andreas Sturmlechner
Details | Diff
opencv-2.3.1.ebuild (patch against 2.3.0-r1) (opencv-2.3.1.ebuild.diff,891 bytes, patch)
2011-11-07 00:24 UTC, Andreas Sturmlechner
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Sturmlechner gentoo-dev 2011-09-21 21:08:30 UTC
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
Comment 1 Andreas Sturmlechner gentoo-dev 2011-09-21 21:09:08 UTC
Created attachment 287367 [details]
full build.log
Comment 2 Andreas Sturmlechner gentoo-dev 2011-09-21 21:17:19 UTC
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. "
Comment 3 Agostino Sarubbo gentoo-dev 2011-09-22 07:47:20 UTC
Please attach build log as attachment next time.
Comment 4 Andreas K. Hüttel archtester gentoo-dev 2011-09-25 11:46:11 UTC
(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.
Comment 5 Andreas K. Hüttel archtester gentoo-dev 2011-11-04 22:13:39 UTC
*** Bug 388771 has been marked as a duplicate of this bug. ***
Comment 6 Andreas Sturmlechner gentoo-dev 2011-11-07 00:16:08 UTC
Created attachment 291853 [details, diff]
opencv-2.3.1-convert_sets_to_options.patch

New convert_sets_to_options.patch for 2.3.1
Comment 7 Andreas Sturmlechner gentoo-dev 2011-11-07 00:24:57 UTC
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.
Comment 8 Andreas K. Hüttel archtester gentoo-dev 2011-11-07 00:55:11 UTC
(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.
Comment 9 Andreas K. Hüttel archtester gentoo-dev 2011-11-13 14:37:09 UTC
Indeed. Bumped and specified in dependencies.
Comment 10 Luca Barbato gentoo-dev 2011-11-14 04:56:36 UTC
The problem was a missing include, fixed now.
Comment 11 Andreas Sturmlechner gentoo-dev 2011-11-16 11:05:50 UTC
Confirmed successful USE="ffmpeg" build, thx!