Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Error building OpenCV 2.4.x "Undefined reference to av_opt_set@LIBAVUTIL_51"

I have tried building all versions of 2.4, and they all fail when "Linking CXX executable ../../bin/opencv_test_core" with:

/home/root/opencv/2.4.3/build/lib/libavcodec.so.54: undefined reference to av_opt_set@LIBAVUTIL_51' /home/root/opencv/2.4.3/build/lib/libavformat.so.54: undefined reference toav_strcasecmp@LIBAVUTIL_51' /home/root/opencv/2.4.3/build/lib/libavcodec.so.54: undefined reference to av_bprint_finalize@LIBAVUTIL_51' /home/root/opencv/2.4.3/build/lib/libavformat.so.54: undefined reference toav_timecode_make_smpte_tc_string@LIBAVUTIL_51' /home/root/opencv/2.4.3/build/lib/libavformat.so.54: undefined reference to av_timecode_make_string@LIBAVUTIL_51' /home/root/opencv/2.4.3/build/lib/libavcodec.so.54: undefined reference toav_realloc_f@LIBAVUTIL_51' /home/root/opencv/2.4.3/build/lib/libavformat.so.54: undefined reference to av_timecode_get_smpte_from_framenum@LIBAVUTIL_51' /home/root/opencv/2.4.3/build/lib/libavformat.so.54: undefined reference toav_timecode_init@LIBAVUTIL_51' /home/root/opencv/2.4.3/build/lib/libavcodec.so.54: undefined reference to av_samples_set_silence@LIBAVUTIL_51' /home/root/opencv/2.4.3/build/lib/libavcodec.so.54: undefined reference toav_calloc@LIBAVUTIL_51' /home/root/opencv/2.4.3/build/lib/libavformat.so.54: undefined reference to av_opt_get@LIBAVUTIL_51' /home/root/opencv/2.4.3/build/lib/libavformat.so.54: undefined reference toav_strncasecmp@LIBAVUTIL_51' /home/root/opencv/2.4.3/build/lib/libavcodec.so.54: undefined reference to av_samples_fill_arrays@LIBAVUTIL_51' /home/root/opencv/2.4.3/build/lib/libavcodec.so.54: undefined reference toav_get_media_type_string@LIBAVUTIL_51' /home/root/opencv/2.4.3/build/lib/libavformat.so.54: undefined reference to av_dynarray_add@LIBAVUTIL_51' /home/root/opencv/2.4.3/build/lib/libavcodec.so.54: undefined reference toav_bprint_init@LIBAVUTIL_51' /home/root/opencv/2.4.3/build/lib/libavcodec.so.54: undefined reference to av_asprintf@LIBAVUTIL_51' /home/root/opencv/2.4.3/build/lib/libavcodec.so.54: undefined reference toav_sample_fmt_is_planar@LIBAVUTIL_51' /home/root/opencv/2.4.3/build/lib/libavcodec.so.54: undefined reference to av_samples_get_buffer_size@LIBAVUTIL_51' /home/root/opencv/2.4.3/build/lib/libavformat.so.54: undefined reference toav_opt_get_int@LIBAVUTIL_51' /home/root/opencv/2.4.3/build/lib/libavcodec.so.54: undefined reference to av_timecode_make_mpeg_tc_string@LIBAVUTIL_51' /home/root/opencv/2.4.3/build/lib/libavformat.so.54: undefined reference toav_rescale_q_rnd@LIBAVUTIL_51' /home/root/opencv/2.4.3/build/lib/libavcodec.so.54: undefined reference to av_bprintf@LIBAVUTIL_51' /home/root/opencv/2.4.3/build/lib/libavcodec.so.54: undefined reference toav_samples_copy@LIBAVUTIL_51' /home/root/opencv/2.4.3/build/lib/libavcodec.so.54: undefined reference to av_get_default_channel_layout@LIBAVUTIL_51' /home/root/opencv/2.4.3/build/lib/libavcodec.so.54: undefined reference toav_timecode_init_from_string@LIBAVUTIL_51' /home/root/opencv/2.4.3/build/lib/libavcodec.so.54: undefined reference to av_bprint_chars@LIBAVUTIL_51' /home/root/opencv/2.4.3/build/lib/libavformat.so.54: undefined reference toav_des_mac@LIBAVUTIL_51' /home/root/opencv/2.4.3/build/lib/libavcodec.so.54: undefined reference to av_timecode_adjust_ntsc_framenum@LIBAVUTIL_51' /home/root/opencv/2.4.3/build/lib/libavformat.so.54: undefined reference toav_timegm@LIBAVUTIL_51'

/home/root/opencv/2.4.3/build/lib/libavcodec.so.54: undefined reference to `av_tempfile@LIBAVUTIL_51'

My CMakeLists.txt file is the default, except I changed it to use TBB, disabled the docs, and turned on verbose mode.

Anyone have any idea as to what may be causing it, or what I can do to fix it? I've been working on this for quite awhile and am at a loss. Any help would be much appreciated.

Thanks, Will

Error building OpenCV 2.4.x "Undefined reference to av_opt_set@LIBAVUTIL_51"

I have tried building all versions of 2.4, and they all fail when "Linking CXX executable ../../bin/opencv_test_core" with:

/home/root/opencv/2.4.3/build/lib/libavcodec.so.54: undefined reference to av_opt_set@LIBAVUTIL_51' /home/root/opencv/2.4.3/build/lib/libavformat.so.54: undefined reference toav_strcasecmp@LIBAVUTIL_51' /home/root/opencv/2.4.3/build/lib/libavcodec.so.54: undefined reference to av_bprint_finalize@LIBAVUTIL_51' /home/root/opencv/2.4.3/build/lib/libavformat.so.54: undefined reference toav_timecode_make_smpte_tc_string@LIBAVUTIL_51' /home/root/opencv/2.4.3/build/lib/libavformat.so.54: undefined reference to av_timecode_make_string@LIBAVUTIL_51' /home/root/opencv/2.4.3/build/lib/libavcodec.so.54: undefined reference toav_realloc_f@LIBAVUTIL_51' /home/root/opencv/2.4.3/build/lib/libavformat.so.54: undefined reference to av_timecode_get_smpte_from_framenum@LIBAVUTIL_51' /home/root/opencv/2.4.3/build/lib/libavformat.so.54: undefined reference toav_timecode_init@LIBAVUTIL_51' /home/root/opencv/2.4.3/build/lib/libavcodec.so.54: undefined reference to av_samples_set_silence@LIBAVUTIL_51' /home/root/opencv/2.4.3/build/lib/libavcodec.so.54: undefined reference toav_calloc@LIBAVUTIL_51' /home/root/opencv/2.4.3/build/lib/libavformat.so.54: undefined reference to av_opt_get@LIBAVUTIL_51' /home/root/opencv/2.4.3/build/lib/libavformat.so.54: undefined reference toav_strncasecmp@LIBAVUTIL_51' /home/root/opencv/2.4.3/build/lib/libavcodec.so.54: undefined reference to av_samples_fill_arrays@LIBAVUTIL_51' /home/root/opencv/2.4.3/build/lib/libavcodec.so.54: undefined reference toav_get_media_type_string@LIBAVUTIL_51' /home/root/opencv/2.4.3/build/lib/libavformat.so.54: undefined reference to av_dynarray_add@LIBAVUTIL_51' /home/root/opencv/2.4.3/build/lib/libavcodec.so.54: undefined reference toav_bprint_init@LIBAVUTIL_51' /home/root/opencv/2.4.3/build/lib/libavcodec.so.54: undefined reference to av_asprintf@LIBAVUTIL_51' /home/root/opencv/2.4.3/build/lib/libavcodec.so.54: undefined reference toav_sample_fmt_is_planar@LIBAVUTIL_51' /home/root/opencv/2.4.3/build/lib/libavcodec.so.54: undefined reference to av_samples_get_buffer_size@LIBAVUTIL_51' /home/root/opencv/2.4.3/build/lib/libavformat.so.54: undefined reference toav_opt_get_int@LIBAVUTIL_51' /home/root/opencv/2.4.3/build/lib/libavcodec.so.54: undefined reference to av_timecode_make_mpeg_tc_string@LIBAVUTIL_51' /home/root/opencv/2.4.3/build/lib/libavformat.so.54: undefined reference toav_rescale_q_rnd@LIBAVUTIL_51' /home/root/opencv/2.4.3/build/lib/libavcodec.so.54: undefined reference to av_bprintf@LIBAVUTIL_51' /home/root/opencv/2.4.3/build/lib/libavcodec.so.54: undefined reference toav_samples_copy@LIBAVUTIL_51' /home/root/opencv/2.4.3/build/lib/libavcodec.so.54: undefined reference to av_get_default_channel_layout@LIBAVUTIL_51' /home/root/opencv/2.4.3/build/lib/libavcodec.so.54: undefined reference toav_timecode_init_from_string@LIBAVUTIL_51' /home/root/opencv/2.4.3/build/lib/libavcodec.so.54: undefined reference to av_bprint_chars@LIBAVUTIL_51' /home/root/opencv/2.4.3/build/lib/libavformat.so.54: undefined reference toav_des_mac@LIBAVUTIL_51' /home/root/opencv/2.4.3/build/lib/libavcodec.so.54: undefined reference to av_timecode_adjust_ntsc_framenum@LIBAVUTIL_51' /home/root/opencv/2.4.3/build/lib/libavformat.so.54: undefined reference toav_timegm@LIBAVUTIL_51'

av_timegm@LIBAVUTIL_51' /home/root/opencv/2.4.3/build/lib/libavcodec.so.54: undefined reference to `av_tempfile@LIBAVUTIL_51'

My CMakeLists.txt file is the default, except I changed it to use TBB, disabled the docs, and turned on verbose mode.

Anyone have any idea as to what may be causing it, or what I can do to fix it? I've been working on this for quite awhile and am at a loss. Any help would be much appreciated.

Thanks, Will

Error building OpenCV 2.4.x "Undefined reference to av_opt_set@LIBAVUTIL_51"

I have tried building all versions of 2.4, and they all fail when "Linking CXX executable ../../bin/opencv_test_core" with:

/home/root/opencv/2.4.3/build/lib/libavcodec.so.54: undefined reference to av_opt_set@LIBAVUTIL_51' /home/root/opencv/2.4.3/build/lib/libavformat.so.54: undefined reference toav_strcasecmp@LIBAVUTIL_51' /home/root/opencv/2.4.3/build/lib/libavcodec.so.54: undefined reference to av_bprint_finalize@LIBAVUTIL_51' /home/root/opencv/2.4.3/build/lib/libavformat.so.54: undefined reference toav_timecode_make_smpte_tc_string@LIBAVUTIL_51' /home/root/opencv/2.4.3/build/lib/libavformat.so.54: undefined reference to av_timecode_make_string@LIBAVUTIL_51' /home/root/opencv/2.4.3/build/lib/libavcodec.so.54: undefined reference toav_realloc_f@LIBAVUTIL_51' /home/root/opencv/2.4.3/build/lib/libavformat.so.54: undefined reference to av_timecode_get_smpte_from_framenum@LIBAVUTIL_51' /home/root/opencv/2.4.3/build/lib/libavformat.so.54: undefined reference toav_timecode_init@LIBAVUTIL_51' /home/root/opencv/2.4.3/build/lib/libavcodec.so.54: undefined reference to av_samples_set_silence@LIBAVUTIL_51' /home/root/opencv/2.4.3/build/lib/libavcodec.so.54: undefined reference toav_calloc@LIBAVUTIL_51' /home/root/opencv/2.4.3/build/lib/libavformat.so.54: undefined reference to av_opt_get@LIBAVUTIL_51' /home/root/opencv/2.4.3/build/lib/libavformat.so.54: undefined reference toav_strncasecmp@LIBAVUTIL_51' /home/root/opencv/2.4.3/build/lib/libavcodec.so.54: undefined reference to av_samples_fill_arrays@LIBAVUTIL_51' /home/root/opencv/2.4.3/build/lib/libavcodec.so.54: undefined reference toav_get_media_type_string@LIBAVUTIL_51' /home/root/opencv/2.4.3/build/lib/libavformat.so.54: undefined reference to av_dynarray_add@LIBAVUTIL_51' /home/root/opencv/2.4.3/build/lib/libavcodec.so.54: undefined reference toav_bprint_init@LIBAVUTIL_51' /home/root/opencv/2.4.3/build/lib/libavcodec.so.54: undefined reference to av_asprintf@LIBAVUTIL_51' /home/root/opencv/2.4.3/build/lib/libavcodec.so.54: undefined reference toav_sample_fmt_is_planar@LIBAVUTIL_51' /home/root/opencv/2.4.3/build/lib/libavcodec.so.54: undefined reference to av_samples_get_buffer_size@LIBAVUTIL_51' /home/root/opencv/2.4.3/build/lib/libavformat.so.54: undefined reference toav_opt_get_int@LIBAVUTIL_51' /home/root/opencv/2.4.3/build/lib/libavcodec.so.54: undefined reference to av_timecode_make_mpeg_tc_string@LIBAVUTIL_51' /home/root/opencv/2.4.3/build/lib/libavformat.so.54: undefined reference toav_rescale_q_rnd@LIBAVUTIL_51' /home/root/opencv/2.4.3/build/lib/libavcodec.so.54: undefined reference to av_bprintf@LIBAVUTIL_51' /home/root/opencv/2.4.3/build/lib/libavcodec.so.54: undefined reference toav_samples_copy@LIBAVUTIL_51' /home/root/opencv/2.4.3/build/lib/libavcodec.so.54: undefined reference to av_get_default_channel_layout@LIBAVUTIL_51' /home/root/opencv/2.4.3/build/lib/libavcodec.so.54: undefined reference toav_timecode_init_from_string@LIBAVUTIL_51' /home/root/opencv/2.4.3/build/lib/libavcodec.so.54: undefined reference to av_bprint_chars@LIBAVUTIL_51' /home/root/opencv/2.4.3/build/lib/libavformat.so.54: undefined reference toav_des_mac@LIBAVUTIL_51' /home/root/opencv/2.4.3/build/lib/libavcodec.so.54: undefined reference to av_timecode_adjust_ntsc_framenum@LIBAVUTIL_51' /home/root/opencv/2.4.3/build/lib/libavformat.so.54: undefined reference toav_timegm@LIBAVUTIL_51' /home/root/opencv/2.4.3/build/lib/libavcodec.so.54: undefined reference to `av_tempfile@LIBAVUTIL_51''av_opt_set@LIBAVUTIL_51' /home/root/opencv/2.4.3/build/lib/libavformat.so.54: undefined reference to 'av_strcasecmp@LIBAVUTIL_51' /home/root/opencv/2.4.3/build/lib/libavcodec.so.54: undefined reference to 'av_bprint_finalize@LIBAVUTIL_51' /home/root/opencv/2.4.3/build/lib/libavformat.so.54: undefined reference to 'av_timecode_make_smpte_tc_string@LIBAVUTIL_51' /home/root/opencv/2.4.3/build/lib/libavformat.so.54: undefined reference to 'av_timecode_make_string@LIBAVUTIL_51' /home/root/opencv/2.4.3/build/lib/libavcodec.so.54: undefined reference to 'av_realloc_f@LIBAVUTIL_51' /home/root/opencv/2.4.3/build/lib/libavformat.so.54: undefined reference to 'av_timecode_get_smpte_from_framenum@LIBAVUTIL_51' /home/root/opencv/2.4.3/build/lib/libavformat.so.54: undefined reference to 'av_timecode_init@LIBAVUTIL_51' /home/root/opencv/2.4.3/build/lib/libavcodec.so.54: undefined reference to 'av_samples_set_silence@LIBAVUTIL_51' /home/root/opencv/2.4.3/build/lib/libavcodec.so.54: undefined reference to 'av_calloc@LIBAVUTIL_51' /home/root/opencv/2.4.3/build/lib/libavformat.so.54: undefined reference to 'av_opt_get@LIBAVUTIL_51' /home/root/opencv/2.4.3/build/lib/libavformat.so.54: undefined reference to 'av_strncasecmp@LIBAVUTIL_51' /home/root/opencv/2.4.3/build/lib/libavcodec.so.54: undefined reference to 'av_samples_fill_arrays@LIBAVUTIL_51' /home/root/opencv/2.4.3/build/lib/libavcodec.so.54: undefined reference to 'av_get_media_type_string@LIBAVUTIL_51' /home/root/opencv/2.4.3/build/lib/libavformat.so.54: undefined reference to 'av_dynarray_add@LIBAVUTIL_51' /home/root/opencv/2.4.3/build/lib/libavcodec.so.54: undefined reference to 'av_bprint_init@LIBAVUTIL_51' /home/root/opencv/2.4.3/build/lib/libavcodec.so.54: undefined reference to 'av_asprintf@LIBAVUTIL_51' /home/root/opencv/2.4.3/build/lib/libavcodec.so.54: undefined reference to 'av_sample_fmt_is_planar@LIBAVUTIL_51' /home/root/opencv/2.4.3/build/lib/libavcodec.so.54: undefined reference to 'av_samples_get_buffer_size@LIBAVUTIL_51' /home/root/opencv/2.4.3/build/lib/libavformat.so.54: undefined reference to 'av_opt_get_int@LIBAVUTIL_51' /home/root/opencv/2.4.3/build/lib/libavcodec.so.54: undefined reference to 'av_timecode_make_mpeg_tc_string@LIBAVUTIL_51' /home/root/opencv/2.4.3/build/lib/libavformat.so.54: undefined reference to 'av_rescale_q_rnd@LIBAVUTIL_51' /home/root/opencv/2.4.3/build/lib/libavcodec.so.54: undefined reference to 'av_bprintf@LIBAVUTIL_51' /home/root/opencv/2.4.3/build/lib/libavcodec.so.54: undefined reference to 'av_samples_copy@LIBAVUTIL_51' /home/root/opencv/2.4.3/build/lib/libavcodec.so.54: undefined reference to 'av_get_default_channel_layout@LIBAVUTIL_51' /home/root/opencv/2.4.3/build/lib/libavcodec.so.54: undefined reference to 'av_timecode_init_from_string@LIBAVUTIL_51' /home/root/opencv/2.4.3/build/lib/libavcodec.so.54: undefined reference to 'av_bprint_chars@LIBAVUTIL_51' /home/root/opencv/2.4.3/build/lib/libavformat.so.54: undefined reference to 'av_des_mac@LIBAVUTIL_51' /home/root/opencv/2.4.3/build/lib/libavcodec.so.54: undefined reference to 'av_timecode_adjust_ntsc_framenum@LIBAVUTIL_51' /home/root/opencv/2.4.3/build/lib/libavformat.so.54: undefined reference to 'av_timegm@LIBAVUTIL_51' /home/root/opencv/2.4.3/build/lib/libavcodec.so.54: undefined reference to 'av_tempfile@LIBAVUTIL_51'

My CMakeLists.txt file is the default, except I changed it to use TBB, disabled the docs, and turned on verbose mode.

Anyone have any idea as to what may be causing it, or what I can do to fix it? I've been working on this for quite awhile and am at a loss. Any help would be much appreciated.

Thanks, Will