Linking problem for OpenCV2.3.1 in Ubuntu12.04

Bug #992462 reported by Pranav Kant Gaur
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
opencv (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

Hi,
Ubuntu12.04 comes with OpenCV2.3.1 by default.I tried compiling my project with default gcc version(4.6.3).

Following linking errors occur:

warning: libavcodec.so.52, needed by /usr/local/lib/libopencv_highgui.so, not found (try using -rpath or -rpath-link)
warning: libavformat.so.52, needed by /usr/local/lib/libopencv_highgui.so, not found (try using -rpath or -rpath-link)
warning: libavutil.so.50, needed by /usr/local/lib/libopencv_highgui.so, not found (try using -rpath or -rpath-link)
warning: libswscale.so.0, needed by /usr/local/lib/libopencv_highgui.so, not found (try using -rpath or -rpath-link)
/usr/local/lib/libopencv_highgui.so undefined reference to `url_fclose@LIBAVFORMAT_52'
/usr/local/lib/libopencv_highgui.so undefined reference to `av_open_input_file@LIBAVFORMAT_52'
/usr/local/lib/libopencv_highgui.so undefined reference to `av_register_all@LIBAVFORMAT_52'
/usr/local/lib/libopencv_highgui.so undefined reference to `av_free_packet@LIBAVCODEC_52'
/usr/local/lib/libopencv_highgui.so undefined reference to `av_write_header@LIBAVFORMAT_52'
/usr/local/lib/libopencv_highgui.so undefined reference to `av_new_stream@LIBAVFORMAT_52'
/usr/local/lib/libopencv_highgui.so undefined reference to `av_guess_codec@LIBAVFORMAT_52'
/usr/local/lib/libopencv_highgui.so undefined reference to `url_fopen@LIBAVFORMAT_52'
/usr/local/lib/libopencv_highgui.so undefined reference to `avcodec_close@LIBAVCODEC_52'
/usr/local/lib/libopencv_highgui.so undefined reference to `guess_format@LIBAVFORMAT_52'
/usr/local/lib/libopencv_highgui.so undefined reference to `av_init_packet@LIBAVCODEC_52'
/usr/local/lib/libopencv_highgui.so undefined reference to `avcodec_find_decoder@LIBAVCODEC_52'
/usr/local/lib/libopencv_highgui.so undefined reference to `av_malloc@LIBAVUTIL_50'
/usr/local/lib/libopencv_highgui.so undefined reference to `avcodec_encode_video@LIBAVCODEC_52'
/usr/local/lib/libopencv_highgui.so undefined reference to `av_sub_q@LIBAVUTIL_50'
/usr/local/lib/libopencv_highgui.so undefined reference to `sws_scale@LIBSWSCALE_0'
/usr/local/lib/libopencv_highgui.so undefined reference to `avcodec_find_encoder@LIBAVCODEC_52'
/usr/local/lib/libopencv_highgui.so undefined reference to `avcodec_alloc_frame@LIBAVCODEC_52'|
/usr/local/lib/libopencv_highgui.so undefined reference to `av_rescale_q@LIBAVUTIL_50'
/usr/local/lib/libopencv_highgui.so undefined reference to `av_find_stream_info@LIBAVFORMAT_52'
/usr/local/lib/libopencv_highgui.so undefined reference to `av_write_frame@LIBAVFORMAT_52'
/usr/local/lib/libopencv_highgui.so undefined reference to `av_close_input_file@LIBAVFORMAT_52'
/usr/local/lib/libopencv_highgui.so undefined reference to `av_seek_frame@LIBAVFORMAT_52'
/usr/local/lib/libopencv_highgui.so undefined reference to `av_write_trailer@LIBAVFORMAT_52'
/usr/local/lib/libopencv_highgui.so undefined reference to `sws_getContext@LIBSWSCALE_0'
/usr/local/lib/libopencv_highgui.so undefined reference to `av_freep@LIBAVUTIL_50'
/usr/local/lib/libopencv_highgui.so undefined reference to `av_codec_get_id@LIBAVFORMAT_52'
/usr/local/lib/libopencv_highgui.so undefined reference to `avpicture_get_size@LIBAVCODEC_52'
/usr/local/lib/libopencv_highgui.so undefined reference to `av_set_parameters@LIBAVFORMAT_52'
/usr/local/lib/libopencv_highgui.so undefined reference to `av_read_frame@LIBAVFORMAT_52'
/usr/local/lib/libopencv_highgui.so undefined reference to `av_free@LIBAVUTIL_50'
/usr/local/lib/libopencv_highgui.so undefined reference to `dump_format@LIBAVFORMAT_52'
/usr/local/lib/libopencv_highgui.so undefined reference to `sws_freeContext@LIBSWSCALE_0'
/usr/local/lib/libopencv_highgui.so undefined reference to `av_alloc_format_context@LIBAVFORMAT_52'
/usr/local/lib/libopencv_highgui.so undefined reference to `avcodec_decode_video@LIBAVCODEC_52'
/usr/local/lib/libopencv_highgui.so undefined reference to `avcodec_open@LIBAVCODEC_52'
/usr/local/lib/libopencv_highgui.so undefined reference to `avpicture_fill@LIBAVCODEC_52'

Is there any other way than 1.Downgrading Ubuntu to an earlier version
                                                   2.Upgrading to OpenCV2.4

Tags: bot-comment
Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. It seems that your bug report is not filed about a specific source package though, rather it is just filed against Ubuntu in general. It is important that bug reports be filed about source packages so that people interested in the package can find the bugs about it. You can find some hints about determining what package your bug might be about at https://wiki.ubuntu.com/Bugs/FindRightPackage. You might also ask for help in the #ubuntu-bugs irc channel on Freenode.

To change the source package that this bug is filed about visit https://bugs.launchpad.net/ubuntu/+bug/992462/+editstatus and add the package name in the text box next to the word Package.

[This is an automated message. I apologize if it reached you inappropriately; please just reply to this message indicating so.]

tags: added: bot-comment
affects: ubuntu → opencv (Ubuntu)
Revision history for this message
Julian Taylor (jtaylor) wrote :

you appear to be linking against a local installation of opencv:
/usr/*local*/lib/libopencv_highgui.so

either rebuild that against the libav used by ubuntu or use the ubuntu provided version of opencv

Changed in opencv (Ubuntu):
status: New → Invalid
Revision history for this message
Julian Taylor (jtaylor) wrote :

ubuntu 12.04 has libav 53 not 52 which is causing the problems with your local installation of opencv

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Related questions

Remote bug watches

Bug watches keep track of this bug in other bug trackers.