Bug 271145 - x11-toolkits/gtk40: ffmpeg multimedia backend enabled with ffmpeg 6 breaks compilation
Summary: x11-toolkits/gtk40: ffmpeg multimedia backend enabled with ffmpeg 6 breaks co...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: freebsd-desktop (Team)
URL: https://gitlab.gnome.org/GNOME/gtk/-/...
Keywords:
: 271160 (view as bug list)
Depends on:
Blocks: 261302
  Show dependency treegraph
 
Reported: 2023-04-30 10:54 UTC by Jack
Modified: 2023-07-05 18:58 UTC (History)
5 users (show)

See Also:
vishwin: maintainer-feedback+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jack 2023-04-30 10:54:57 UTC
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.
Comment 1 Daniel Engberg freebsd_committer freebsd_triage 2023-05-01 06:01:50 UTC
I'd suggest that we disable the plugin for now as upstream lists it as "experimental" and considers dropping it.
Comment 2 Charlie Li freebsd_committer freebsd_triage 2023-05-01 19:46:16 UTC
*** Bug 271160 has been marked as a duplicate of this bug. ***
Comment 3 commit-hook freebsd_committer freebsd_triage 2023-06-24 16:38:28 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=231505b7a0a17b15b74c2fa741783b6268c8e8e2

commit 231505b7a0a17b15b74c2fa741783b6268c8e8e2
Author:     Daniel Engberg <diizzy@FreeBSD.org>
AuthorDate: 2023-06-24 16:32:53 +0000
Commit:     Daniel Engberg <diizzy@FreeBSD.org>
CommitDate: 2023-06-24 16:36:14 +0000

    x11-toolkits/gtk40: Remove broken FFmpeg option

    This option is considered experimental by upstream and there's
    little to no interest of maintaining it so remove it

    Reference: https://gitlab.gnome.org/GNOME/gtk/-/issues/5581

    PR:             271145
    Approved by:    desktop (maintainer timeout, 6+ weeks)

 x11-toolkits/gtk40/Makefile  | 10 ++--------
 x11-toolkits/gtk40/pkg-plist |  1 -
 2 files changed, 2 insertions(+), 9 deletions(-)