maintainer-feedback requested: [Bug 271145] x11-toolkits/gtk40: ffmpeg multimedia backend enabled with ffmpeg 6 breaks compilation

From: <bugzilla-noreply_at_freebsd.org>
Date: Sun, 30 Apr 2023 10:54:57 UTC
Bugzilla Automation <bugzilla@FreeBSD.org> has asked freebsd-desktop (Team)
<desktop@FreeBSD.org> for maintainer-feedback:
Bug 271145: x11-toolkits/gtk40: ffmpeg multimedia backend enabled with ffmpeg 6
breaks compilation
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=271145



--- Description ---
Having ffmpeg-6.0,1 installed and trying to compile gtk40 with ffmpeg
multimedia backend enabled results in the following error:

[ 34% 576/1610] cc -Imodules/media/libmedia-ffmpeg.so.p -Imodules/media
-I../modules/media -I. -I.. -Igtk -I../gtk -Igdk/x11 -I../gdk/x11 -Igdk
-I../gdk -Igtk/css -Igsk -I/usr/local/include -I/usr/local/include/glib-2.0
-I/usr/local/lib/glib-2.0/include -I/usr/local/include/gio-unix-2.0
-I/usr/local/include/pango-1.0 -I/usr/local/include/harfbuzz
-I/usr/local/include/freetype2 -I/usr/local/include/libpng16
-I/usr/local/include/fribidi -I/usr/local/include/cairo
-I/usr/local/include/pixman-1 -I/usr/local/include/gdk-pixbuf-2.0
-I/usr/local/include/graphene-1.0 -I/usr/local/lib/graphene-1.0/include
-I/usr/local/include/libepoll-shim -fno-color-diagnostics
-D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -std=gnu99 -O3
-DG_LOG_USE_STRUCTURED=1 -DGLIB_DISABLE_DEPRECATION_WARNINGS
'-DGTK_VERSION="4.10.3"' -D_GNU_SOURCE -DG_DISABLE_CAST_CHECKS
-DG_DISABLE_ASSERT -O2 -pipe -march=haswell -fstack-protector-strong -isystem
/usr/local/include -fno-strict-aliasing -isystem /usr/local/include -fPIC
-pthread -mfpmath=sse -msse -msse2 -D_THREAD_SAFE -DGTK_COMPILATION
-fno-strict-aliasing -Wno-c++11-extensions -Wno-missing-include-dirs
-Wno-typedef-redefinition -Wno-tautological-constant-out-of-range-compare
-Wformat=2 -Wformat-nonliteral -Wformat-security -Wignored-qualifiers
-Wimplicit-function-declaration -Wmisleading-indentation
-Wmissing-format-attribute -Wmissing-include-dirs -Wmissing-noreturn
-Wnested-externs -Wold-style-definition -Wpointer-arith -Wshadow
-Wstrict-prototypes -Wswitch-default -Wswitch-enum -Wundef -Wuninitialized
-Wunused -Waddress -Warray-bounds -Wempty-body -Wimplicit
-Wimplicit-fallthrough -Winit-self -Wint-to-pointer-cast -Wmain
-Wmissing-braces -Wmissing-declarations -Wmissing-prototypes -Wnonnull
-Wpointer-to-int-cast -Wredundant-decls -Wreturn-type -Wsequence-point
-Wtrigraphs -Wvla -Wwrite-strings -fvisibility=hidden -MD -MQ
modules/media/libmedia-ffmpeg.so.p/gtkffmediafile.c.o -MF
modules/media/libmedia-ffmpeg.so.p/gtkffmediafile.c.o.d -o
modules/media/libmedia-ffmpeg.so.p/gtkffmediafile.c.o -c
../modules/media/gtkffmediafile.c
FAILED: modules/media/libmedia-ffmpeg.so.p/gtkffmediafile.c.o 
cc -Imodules/media/libmedia-ffmpeg.so.p -Imodules/media -I../modules/media -I.
-I.. -Igtk -I../gtk -Igdk/x11 -I../gdk/x11 -Igdk -I../gdk -Igtk/css -Igsk
-I/usr/local/include -I/usr/local/include/glib-2.0
-I/usr/local/lib/glib-2.0/include -I/usr/local/include/gio-unix-2.0
-I/usr/local/include/pango-1.0 -I/usr/local/include/harfbuzz
-I/usr/local/include/freetype2 -I/usr/local/include/libpng16
-I/usr/local/include/fribidi -I/usr/local/include/cairo
-I/usr/local/include/pixman-1 -I/usr/local/include/gdk-pixbuf-2.0
-I/usr/local/include/graphene-1.0 -I/usr/local/lib/graphene-1.0/include
-I/usr/local/include/libepoll-shim -fno-color-diagnostics
-D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -std=gnu99 -O3
-DG_LOG_USE_STRUCTURED=1 -DGLIB_DISABLE_DEPRECATION_WARNINGS
'-DGTK_VERSION="4.10.3"' -D_GNU_SOURCE -DG_DISABLE_CAST_CHECKS
-DG_DISABLE_ASSERT -O2 -pipe -march=haswell -fstack-protector-strong -isystem
/usr/local/include -fno-strict-aliasing -isystem /usr/local/include -fPIC
-pthread -mfpmath=sse -msse -msse2 -D_THREAD_SAFE -DGTK_COMPILATION
-fno-strict-aliasing -Wno-c++11-extensions -Wno-missing-include-dirs
-Wno-typedef-redefinition -Wno-tautological-constant-out-of-range-compare
-Wformat=2 -Wformat-nonliteral -Wformat-security -Wignored-qualifiers
-Wimplicit-function-declaration -Wmisleading-indentation
-Wmissing-format-attribute -Wmissing-include-dirs -Wmissing-noreturn
-Wnested-externs -Wold-style-definition -Wpointer-arith -Wshadow
-Wstrict-prototypes -Wswitch-default -Wswitch-enum -Wundef -Wuninitialized
-Wunused -Waddress -Warray-bounds -Wempty-body -Wimplicit
-Wimplicit-fallthrough -Winit-self -Wint-to-pointer-cast -Wmain
-Wmissing-braces -Wmissing-declarations -Wmissing-prototypes -Wnonnull
-Wpointer-to-int-cast -Wredundant-decls -Wreturn-type -Wsequence-point
-Wtrigraphs -Wvla -Wwrite-strings -fvisibility=hidden -MD -MQ
modules/media/libmedia-ffmpeg.so.p/gtkffmediafile.c.o -MF
modules/media/libmedia-ffmpeg.so.p/gtkffmediafile.c.o.d -o
modules/media/libmedia-ffmpeg.so.p/gtkffmediafile.c.o -c
../modules/media/gtkffmediafile.c
../modules/media/gtkffmediafile.c:379:14: warning: 'channel_layout' is
deprecated [-Wdeprecated-declarations]
  codec_ctx->channel_layout = codec->channel_layouts ?
codec->channel_layouts[0] : AV_CH_LAYOUT_STEREO;
	     ^
/usr/local/include/libavcodec/avcodec.h:1099:5: note: 'channel_layout' has been
explicitly marked deprecated here
    attribute_deprecated
    ^
/usr/local/include/libavutil/attributes.h:100:49: note: expanded from macro
'attribute_deprecated'
#    define attribute_deprecated __attribute__((deprecated))
						^
../modules/media/gtkffmediafile.c:379:38: warning: 'channel_layouts' is
deprecated [-Wdeprecated-declarations]
  codec_ctx->channel_layout = codec->channel_layouts ?
codec->channel_layouts[0] : AV_CH_LAYOUT_STEREO;
				     ^
/usr/local/include/libavcodec/codec.h:213:5: note: 'channel_layouts' has been
explicitly marked deprecated here
    attribute_deprecated
    ^
/usr/local/include/libavutil/attributes.h:100:49: note: expanded from macro
'attribute_deprecated'
#    define attribute_deprecated __attribute__((deprecated))
						^
../modules/media/gtkffmediafile.c:379:63: warning: 'channel_layouts' is
deprecated [-Wdeprecated-declarations]
  codec_ctx->channel_layout = codec->channel_layouts ?
codec->channel_layouts[0] : AV_CH_LAYOUT_STEREO;
							      ^
/usr/local/include/libavcodec/codec.h:213:5: note: 'channel_layouts' has been
explicitly marked deprecated here
    attribute_deprecated
    ^
/usr/local/include/libavutil/attributes.h:100:49: note: expanded from macro
'attribute_deprecated'
#    define attribute_deprecated __attribute__((deprecated))
						^
../modules/media/gtkffmediafile.c:380:14: warning: 'channels' is deprecated
[-Wdeprecated-declarations]
  codec_ctx->channels = av_get_channel_layout_nb_channels
(codec_ctx->channel_layout);
	     ^
/usr/local/include/libavcodec/avcodec.h:1041:5: note: 'channels' has been
explicitly marked deprecated here
    attribute_deprecated
    ^
/usr/local/include/libavutil/attributes.h:100:49: note: expanded from macro
'attribute_deprecated'
#    define attribute_deprecated __attribute__((deprecated))
						^
../modules/media/gtkffmediafile.c:380:25: warning:
'av_get_channel_layout_nb_channels' is deprecated [-Wdeprecated-declarations]
  codec_ctx->channels = av_get_channel_layout_nb_channels
(codec_ctx->channel_layout);
			^
/usr/local/include/libavutil/channel_layout.h:473:1: note:
'av_get_channel_layout_nb_channels' has been explicitly marked deprecated here
attribute_deprecated
^
/usr/local/include/libavutil/attributes.h:100:49: note: expanded from macro
'attribute_deprecated'
#    define attribute_deprecated __attribute__((deprecated))
						^
../modules/media/gtkffmediafile.c:380:71: warning: 'channel_layout' is
deprecated [-Wdeprecated-declarations]
  codec_ctx->channels = av_get_channel_layout_nb_channels
(codec_ctx->channel_layout);
								      ^
/usr/local/include/libavcodec/avcodec.h:1099:5: note: 'channel_layout' has been
explicitly marked deprecated here
    attribute_deprecated
    ^
/usr/local/include/libavutil/attributes.h:100:49: note: expanded from macro
'attribute_deprecated'
#    define attribute_deprecated __attribute__((deprecated))
						^
../modules/media/gtkffmediafile.c:448:10: warning: 'channel_layout' is
deprecated [-Wdeprecated-declarations]
  frame->channel_layout = channel_layout;
	 ^
/usr/local/include/libavutil/frame.h:523:5: note: 'channel_layout' has been
explicitly marked deprecated here
    attribute_deprecated
    ^
/usr/local/include/libavutil/attributes.h:100:49: note: expanded from macro
'attribute_deprecated'
#    define attribute_deprecated __attribute__((deprecated))
						^
../modules/media/gtkffmediafile.c:486:73: warning: 'channel_layout' is
deprecated [-Wdeprecated-declarations]
							    
codec_ctx->channel_layout,
									^
/usr/local/include/libavcodec/avcodec.h:1099:5: note: 'channel_layout' has been
explicitly marked deprecated here
    attribute_deprecated
    ^
/usr/local/include/libavutil/attributes.h:100:49: note: expanded from macro
'attribute_deprecated'
#    define attribute_deprecated __attribute__((deprecated))
						^
../modules/media/gtkffmediafile.c:835:68: warning: 'channels' is deprecated
[-Wdeprecated-declarations]
  av_opt_set_int (self->swr_ctx, "in_channel_count", in_codec_ctx->channels,
0);
								   ^
/usr/local/include/libavcodec/avcodec.h:1041:5: note: 'channels' has been
explicitly marked deprecated here
    attribute_deprecated
    ^
/usr/local/include/libavutil/attributes.h:100:49: note: expanded from macro
'attribute_deprecated'
#    define attribute_deprecated __attribute__((deprecated))
						^
../modules/media/gtkffmediafile.c:838:70: warning: 'channels' is deprecated
[-Wdeprecated-declarations]
  av_opt_set_int (self->swr_ctx, "out_channel_count", out_codec_ctx->channels,
0);
								     ^
/usr/local/include/libavcodec/avcodec.h:1041:5: note: 'channels' has been
explicitly marked deprecated here
    attribute_deprecated
    ^
/usr/local/include/libavutil/attributes.h:100:49: note: expanded from macro
'attribute_deprecated'
#    define attribute_deprecated __attribute__((deprecated))
						^
../modules/media/gtkffmediafile.c:864:22: error: no member named
'control_message' in 'struct AVOutputFormat'
      if (candidate->control_message)
	  ~~~~~~~~~  ^
../modules/media/gtkffmediafile.c:942:102: warning: 'channel_layout' is
deprecated [-Wdeprecated-declarations]
							      
self->output_audio_stream->codec_ctx->channel_layout,
									       
		     ^
/usr/local/include/libavcodec/avcodec.h:1099:5: note: 'channel_layout' has been
explicitly marked deprecated here
    attribute_deprecated
    ^
/usr/local/include/libavutil/attributes.h:100:49: note: expanded from macro
'attribute_deprecated'
#    define attribute_deprecated __attribute__((deprecated))
						^
11 warnings and 1 error generated.