GNOME Bugzilla – Bug 582241
gimp-gap: libgapvidapi includes from system ffmpeg includes (if present) before local ones
Last modified: 2009-05-13 05:22:21 UTC
Please describe the problem: After upgrading to git commit 073457de, gimp-gap failed building libgapvidapi as follows: Making all in libgapvidapi /usr/bin/gcc-4.0 -DHAVE_CONFIG_H -I. -I.. -I.. -I/opt/local/include/glib-2.0 -I/opt/local/lib/glib-2.0/include -I/opt/local/include -I/opt/local/include/gimp-2.0 -I/opt/local/include/glib-2.0 -I/opt/local/lib/glib-2.0/include -I/opt/local/include -I/opt/local/include/gtk-2.0 -I/opt/local/lib/gtk-2.0/include -I/opt/local/include/atk-1.0 -I/opt/local/include/cairo -I/opt/local/include/pango-1.0 -I/opt/local/include/pixman-1 -I/opt/local/include/freetype2 -I/opt/local/include/libpng12 -I/opt/local/var/macports/build/_Volumes_wdc-320_opt_macports_trunk_dports_graphics_gimp-gap-devel/work/gimp-gap-devel-2.5.0.840/extern_libs/ffmpeg -I/opt/local/var/macports/build/_Volumes_wdc-320_opt_macports_trunk_dports_graphics_gimp-gap-devel/work/gimp-gap-devel-2.5.0.840/extern_libs/ffmpeg/libavcodec -I/opt/local/var/macports/build/_Volumes_wdc-320_opt_macports_trunk_dports_graphics_gimp-gap-devel/work/gimp-gap-devel-2.5.0.840/extern_libs/ffmpeg/libavformat -I/opt/local/var/macports/build/_Volumes_wdc-320_opt_macports_trunk_dports_graphics_gimp-gap-devel/work/gimp-gap-devel-2.5.0.840/extern_libs/ffmpeg/libavutil -I/opt/local/var/macports/build/_Volumes_wdc-320_opt_macports_trunk_dports_graphics_gimp-gap-devel/work/gimp-gap-devel-2.5.0.840/extern_libs/ffmpeg/libavdevice -I../libgapbase -I/opt/local/include -DLOCALEDIR=\""/opt/local/share/locale"\" -I/opt/local/include -DGIMP_DISABLE_DEPRECATED -O2 -Wall -fPIC -MT gap_vid_api.o -MD -MP -MF .deps/gap_vid_api.Tpo -c -o gap_vid_api.o gap_vid_api.c In file included from gap_vid_api.c:77: gap_vid_api_util.c: In function 'GVA_md5_string': gap_vid_api_util.c:232: warning: implicit declaration of function 'gimp_md5_get_digest' In file included from gap_vid_api.c:78: gap_vid_api_vidindex.c: In function 'GVA_load_videoindex': gap_vid_api_vidindex.c:397: warning: implicit declaration of function 'gap_file_get_mtime' In file included from gap_vid_api.c:725: /opt/local/var/macports/build/_Volumes_wdc-320_opt_macports_trunk_dports_graphics_gimp-gap-devel/work/gimp-gap-devel-2.5.0.840/extern_libs/ffmpeg/libavformat/avformat.h: At top level: /opt/local/var/macports/build/_Volumes_wdc-320_opt_macports_trunk_dports_graphics_gimp-gap-devel/work/gimp-gap-devel-2.5.0.840/extern_libs/ffmpeg/libavformat/avformat.h:117: error: redefinition of 'struct AVPacket' /opt/local/var/macports/build/_Volumes_wdc-320_opt_macports_trunk_dports_graphics_gimp-gap-devel/work/gimp-gap-devel-2.5.0.840/extern_libs/ffmpeg/libavformat/avformat.h:163: error: redefinition of typedef 'AVPacket' /opt/local/include/libavcodec/avcodec.h:935: error: previous declaration of 'AVPacket' was here /opt/local/var/macports/build/_Volumes_wdc-320_opt_macports_trunk_dports_graphics_gimp-gap-devel/work/gimp-gap-devel-2.5.0.840/extern_libs/ffmpeg/libavformat/avformat.h:212: error: static declaration of 'av_free_packet' follows non-static declaration /opt/local/include/libavcodec/avcodec.h:2750: error: previous declaration of 'av_free_packet' was here In file included from gap_vid_api.c:726: gap_vid_api_ffmpeg.c: In function 'p_wrapper_ffmpeg_get_video_chunk': gap_vid_api_ffmpeg.c:762: warning: assignment discards qualifiers from pointer target type gap_vid_api_ffmpeg.c: In function 'p_private_ffmpeg_get_next_frame': gap_vid_api_ffmpeg.c:1048: warning: 'avcodec_decode_video' is deprecated (declared at /opt/local/include/libavcodec/avcodec.h:3215) gap_vid_api_ffmpeg.c:1147: warning: implicit declaration of function 'img_convert' gap_vid_api_ffmpeg.c: In function 'p_wrapper_ffmpeg_seek_frame': gap_vid_api_ffmpeg.c:1327: warning: implicit declaration of function 'gap_base_get_gimprc_gboolean_value' gap_vid_api_ffmpeg.c: In function 'p_reset_proberead_results': gap_vid_api_ffmpeg.c:1355: warning: implicit declaration of function 'gap_base_get_gimprc_int_value' gap_vid_api_ffmpeg.c: In function 'p_seek_native_timcode_based': gap_vid_api_ffmpeg.c:2576: warning: unused variable 'secs' gap_vid_api_ffmpeg.c:2809: warning: assignment makes integer from pointer without a cast gap_vid_api_ffmpeg.c:2810: warning: assignment makes integer from pointer without a cast gap_vid_api_ffmpeg.c:2467: warning: unused variable 'l_readsteps' gap_vid_api_ffmpeg.c:2466: warning: unused variable 'l_rc_rd' gap_vid_api_ffmpeg.c: In function 'p_read_audio_packets': gap_vid_api_ffmpeg.c:4303: warning: 'avcodec_decode_audio2' is deprecated (declared at /opt/local/include/libavcodec/avcodec.h:3158) gap_vid_api_ffmpeg.c: In function 'p_timecode_check_and_log': gap_vid_api_ffmpeg.c:4643: warning: unused variable 'diff_dts' gap_vid_api_ffmpeg.c: In function 'p_save_video_analyse_results': gap_vid_api_ffmpeg.c:4755: warning: unused variable 'ii' gap_vid_api_ffmpeg.c: In function 'p_frame_nr_to_timecode': gap_vid_api_ffmpeg.c:5043: warning: format '%ld' expects type 'long int', but argument 2 has type 'gint32' gap_vid_api_ffmpeg.c: In function 'p_probe_timecode_offset': gap_vid_api_ffmpeg.c:5240: warning: format '%ld' expects type 'long int', but argument 4 has type 'int' gap_vid_api_ffmpeg.c:5240: warning: format '%ld' expects type 'long int', but argument 5 has type 'gint32' gap_vid_api.c: In function 'p_gva_deinterlace_drawable': gap_vid_api.c:1962: warning: unused variable 'col' gap_vid_api.c:1959: warning: unused variable 'dest_buffer' make[2]: *** [gap_vid_api.o] Error 1 make[1]: *** [all-recursive] Error 1 make: *** [all] Error 2 gap_vid_api.c is including /opt/local/include/libavcodec/avcodec.h which is installed by a MacPorts version of ffmpeg (svn 18784) which is more recent than and API incompatible with ffmpeg 0.5. Removing the conflicting ffmpeg installation solves the problem although this is not an acceptable solution for MacPorts. API incompatible with ffmpeg 0.5 Steps to reproduce: Attempt to build gimp-gap 073457de on MacPorts with conflicting MacPorts ffmpeg installed. Actual results: gap_vid_api.c includes avcodec.h from the system installed copy rather than the local embedded copy. Expected results: gap_vid_api.c should always use the local embedded copy of ffmpeg include files even if another copy of ffmpeg is installed in system include paths. Does this happen every time? yes Other information: The problem occurs because elements that contain the system include path are ordered before the local include path in the Makefile. Attached is a patch that reorders the include paths in libgapvidapi/Makefile.am to put the local ffmpeg include paths before other elements that may include the system path. This allows gimp-gap to build correctly without regard to the installation of other MacPorts versions of ffmpeg.
Created attachment 134442 [details] [review] Patch to libgapvidapi/Makefile.am to fix include path ordering
your patch was applied to current git repository. http://git.gnome.org/cgit/gimp-gap/commit/?id=c36ac7a2e5643e3d7e53e044a54422450ccabc97