PF4Public / gentoo-overlay

Personal Gentoo overlay
77 stars 17 forks source link

www-client/ungoogled-chromium-102.0.5005.61_p1: fails with `system-ffmpeg` #153

Closed PF4Public closed 2 years ago

PF4Public commented 2 years ago

They rolled ffmpeg apparently. In case anyone is willing to fix it, feel free to do the PR. I didn't do a thorough investigation yet.

../../media/filters/audio_file_reader.cc:117:27: error: no member named 'ch_layout' in 'AVCodecContext' codeccontext->ch_layout.u.mask,


../../media/filters/audio_file_reader.cc:118:27: error: no member named 'ch_layout' in 'AVCodecContext'
          codec_context_->ch_layout.nb_channels) ==
          ~~~~~~~~~~~~~~~~^
../../media/filters/audio_file_reader.cc:124:31: error: no member named 'ch_layout' in 'AVCodecContext'
  channels_ = codec_context_->ch_layout.nb_channels;
              ~~~~~~~~~~~~~~~~^
../../media/filters/audio_file_reader.cc:227:31: error: no member named 'ch_layout' in 'AVFrame'
  const int channels = frame->ch_layout.nb_channels;
                       ~~~~~  ^
4 errors generated.
Bogdan107 commented 2 years ago

Error message has the answer:

error: ‘const AVCodecContext’ {aka ‘const struct AVCodecContext’} has no member named ‘ch_layout’; did you mean ‘channel_layout’?

The answer is:

has no member named ‘ch_layout’; did you mean ‘channel_layout’?

This error generated with system-ffmpeg use flag and media-video/ffmpeg-4.4.1-r5 installed.

Full error message:

FAILED: obj/media/ffmpeg/ffmpeg/ffmpeg_common.o 
x86_64-pc-linux-gnu-g++ -MMD -MF obj/media/ffmpeg/ffmpeg/ffmpeg_common.o.d -DUSE_UDEV -DUSE_AURA=1 -DUSE_GLIB=1 -DUSE_OZONE=1 -DOFFICIAL_BUILD -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -DNO_UNWIND_TABLES -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -DIS_MEDIA_IMPL -DUSE_PULSEAUDIO -DDLOPEN_PULSEAUDIO -DGLIB_VERSION_MAX_ALLOWED=GLIB_VERSION_2_40 -DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_40 -DGL_GLEXT_PROTOTYPES -DUSE_GLX -DUSE_EGL -DVK_USE_PLATFORM_XCB_KHR -DVK_USE_PLATFORM_WAYLAND_KHR -DSK_CODEC_DECODES_PNG -DSK_CODEC_DECODES_WEBP -DSK_ENCODE_PNG -DSK_ENCODE_WEBP -DSK_ENABLE_SKSL -DSK_UNTIL_CRBUG_1187654_IS_FIXED -DSK_USER_CONFIG_HEADER=\"../../skia/config/SkUserConfig.h\" -DSK_WIN_FONTMGR_NO_SIMULATIONS -DSK_GL -DSK_CODEC_DECODES_JPEG -DSK_ENCODE_JPEG -DSK_HAS_WUFFS_LIBRARY -DSK_VULKAN=1 -DSK_SUPPORT_GPU=1 -DSK_GPU_WORKAROUNDS_HEADER=\"gpu/config/gpu_driver_bug_workaround_autogen.h\" -DUSING_SYSTEM_ICU=1 -DICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_STATIC -DU_IMPORT=U_EXPORT -Dav_stream_get_first_dts\(stream\)=stream-\>first_dts -I../.. -Igen -I../../third_party/perfetto/include -Igen/third_party/perfetto/build_config -Igen/third_party/perfetto -Igen/shim_headers/zlib_shim -Igen/shim_headers/jsoncpp_shim -Igen/shim_headers/libevent_shim -Igen/shim_headers/icui18n_shim -Igen/shim_headers/icuuc_shim -Igen/shim_headers/libpng_shim -Igen/shim_headers/libwebp_shim -I../../third_party/khronos -I../../gpu -I../../third_party/vulkan-deps/vulkan-headers/src/include -Igen/third_party/dawn/include -I../../third_party/dawn/include -I../../third_party/dawn/src/include -Igen/shim_headers/re2_shim -I../../third_party/libyuv/include -Igen/shim_headers/ffmpeg_shim -Igen/shim_headers/openh264_shim -I../../third_party/abseil-cpp -I../../third_party/boringssl/src/include -I../../third_party/protobuf/src -Igen/protoc_out -I../../third_party/skia -I../../third_party/wuffs/src/release/c -I../../third_party/vulkan/include -I../../third_party/mesa_headers -Wno-unused-local-typedefs -Wno-maybe-uninitialized -Wno-deprecated-declarations -Wno-comments -Wno-packed-not-aligned -Wno-missing-field-initializers -Wno-unused-parameter -fno-ident -fno-strict-aliasing --param=ssp-buffer-size=4 -fstack-protector -fno-unwind-tables -fno-asynchronous-unwind-tables -fPIC -pipe -pthread -O2 -fdata-sections -ffunction-sections -fno-omit-frame-pointer -g0 -fvisibility=hidden -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/sysprof-4 -I/usr/lib64/libffi/include -Wno-narrowing -Wno-class-memaccess -std=gnu++17 -fno-aligned-new -fno-exceptions -fno-rtti -fvisibility-inlines-hidden  -D__DATE__= -D__TIME__= -D__TIMESTAMP__= -march=znver2 -mtune=znver2 -pipe -fdiagnostics-color=always -fstack-protector-strong -D_FORTIFY_SOURCE=2 -Wno-builtin-macro-redefined -c ../../media/ffmpeg/ffmpeg_common.cc -o obj/media/ffmpeg/ffmpeg/ffmpeg_common.o
../../media/ffmpeg/ffmpeg_common.cc: In function ‘bool media::AVCodecContextToAudioDecoderConfig(const AVCodecContext*, media::EncryptionScheme, media::AudioDecoderConfig*)’:
../../media/ffmpeg/ffmpeg_common.cc:348:22: error: ‘const AVCodecContext’ {aka ‘const struct AVCodecContext’} has no member named ‘ch_layout’; did you mean ‘channel_layout’?
  348 |       codec_context->ch_layout.nb_channels > 8
      |                      ^~~~~~~~~
      |                      channel_layout
../../media/ffmpeg/ffmpeg_common.cc:351:32: error: ‘const AVCodecContext’ {aka ‘const struct AVCodecContext’} has no member named ‘ch_layout’; did you mean ‘channel_layout’?
  351 |                 codec_context->ch_layout.u.mask,
      |                                ^~~~~~~~~
      |                                channel_layout
../../media/ffmpeg/ffmpeg_common.cc:352:32: error: ‘const AVCodecContext’ {aka ‘const struct AVCodecContext’} has no member named ‘ch_layout’; did you mean ‘channel_layout’?
  352 |                 codec_context->ch_layout.nb_channels);
      |                                ^~~~~~~~~
      |                                channel_layout
../../media/ffmpeg/ffmpeg_common.cc:405:51: error: ‘const AVCodecContext’ {aka ‘const struct AVCodecContext’} has no member named ‘ch_layout’; did you mean ‘channel_layout’?
  405 |     config->SetChannelsForDiscrete(codec_context->ch_layout.nb_channels);
      |                                                   ^~~~~~~~~
      |                                                   channel_layout
../../media/ffmpeg/ffmpeg_common.cc: In function ‘void media::AudioDecoderConfigToAVCodecContext(const media::AudioDecoderConfig&, AVCodecContext*)’:
../../media/ffmpeg/ffmpeg_common.cc:474:18: error: ‘AVCodecContext’ {aka ‘struct AVCodecContext’} has no member named ‘ch_layout’; did you mean ‘channel_layout’?
  474 |   codec_context->ch_layout.nb_channels = config.channels();
      |                  ^~~~~~~~~
      |                  channel_layout
ninja: build stopped: subcommand failed.
Bogdan107 commented 2 years ago

The same error:

../../media/filters/audio_file_reader.cc:117:27: error: ‘struct AVCodecContext’ has no member named ‘ch_layout’; did you mean ‘channel_layout’?
../../media/filters/audio_file_reader.cc:118:27: error: ‘struct AVCodecContext’ has no member named ‘ch_layout’; did you mean ‘channel_layout’?
../../media/filters/audio_file_reader.cc:124:31: error: ‘struct AVCodecContext’ has no member named ‘ch_layout’; did you mean ‘channel_layout’?
../../media/filters/audio_file_reader.cc:227:31: error: ‘AVFrame’ {aka ‘struct AVFrame’} has no member named ‘ch_layout’; did you mean ‘channel_layout’?

Full message:

FAILED: obj/media/filters/filters/audio_file_reader.o 
x86_64-pc-linux-gnu-g++ -MMD -MF obj/media/filters/filters/audio_file_reader.o.d -DUSE_UDEV -DUSE_AURA=1 -DUSE_GLIB=1 -DUSE_OZONE=1 -DOFFICIAL_BUILD -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURC
E -D_LARGEFILE64_SOURCE -DNO_UNWIND_TABLES -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -DIS_MEDIA_IMPL -DUSE_PULSEAUDIO -DDLOPEN_PULSEAUDIO -DGLIB_VERSION_MAX_ALLOWED=GLIB_VERSION_2_40 -DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_4
0 -DGL_GLEXT_PROTOTYPES -DUSE_GLX -DUSE_EGL -DVK_USE_PLATFORM_XCB_KHR -DVK_USE_PLATFORM_WAYLAND_KHR -DSK_CODEC_DECODES_PNG -DSK_CODEC_DECODES_WEBP -DSK_ENCODE_PNG -DSK_ENCODE_WEBP -DSK_ENABLE_SKSL -DSK_UNTIL_CRBUG_1187654_IS_FIXED -DSK_US
ER_CONFIG_HEADER=\"../../skia/config/SkUserConfig.h\" -DSK_WIN_FONTMGR_NO_SIMULATIONS -DSK_GL -DSK_CODEC_DECODES_JPEG -DSK_ENCODE_JPEG -DSK_HAS_WUFFS_LIBRARY -DSK_VULKAN=1 -DSK_SUPPORT_GPU=1 -DSK_GPU_WORKAROUNDS_HEADER=\"gpu/config/gpu_driver_bug_workaround_autogen.h\" -DUSING_SYSTEM_ICU=1 -DICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_STATIC -DU_IMPORT=U_EXPORT -Dav_stream_get_first_dts\(stream\)=stream-\>first_dts -DCONFIG_LOG=0 -DSTACK_ALIGNMENT=32 -DHAVE_PTHREAD_GETAFFINITY_NP=1 -DDAV1D_API= -I../.. -Igen -I../../third_party/perfetto/include -Igen/third_party/perfetto/build_config -Igen/third_party/perfetto -Igen/shim_headers/zlib_shim -Igen/shim_headers/jsoncpp_shim -Igen/shim_headers/libevent_shim -Igen/shim_headers/icui18n_shim -Igen/shim_headers/icuuc_shim -Igen/shim_headers/libpng_shim -Igen/shim_headers/libwebp_shim -I../../third_party/khronos -I../../gpu -I../../third_party/vulkan-deps/vulkan-headers/src/include -Igen/third_party/dawn/include -I../../third_party/dawn/include -I../../third_party/dawn/src/include -Igen/shim_headers/re2_shim -I../../third_party/libyuv/include -Igen/shim_headers/ffmpeg_shim -Igen/shim_headers/openh264_shim -Igen/shim_headers/opus_shim -I../../third_party/abseil-cpp -I../../third_party/boringssl/src/include -I../../third_party/protobuf/src -Igen/protoc_out -I../../third_party/skia -I../../third_party/wuffs/src/release/c -I../../third_party/vulkan/include -I../../third_party/mesa_headers -I../../third_party/libaom/source/libaom -I../../third_party/libvpx/source/libvpx -I../../third_party/dav1d/version -Wno-unused-local-typedefs -Wno-maybe-uninitialized -Wno-deprecated-declarations -Wno-comments -Wno-packed-not-aligned -Wno-missing-field-initializers -Wno-unused-parameter -fno-ident -fno-strict-aliasing --param=ssp-buffer-size=4 -fstack-protector -fno-unwind-tables -fno-asynchronous-unwind-tables -fPIC -pipe -pthread -O2 -fdata-sections -ffunction-sections -fno-omit-frame-pointer -g0 -fvisibility=hidden -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/sysprof-4 -I/usr/lib64/libffi/include -I/usr/include/opus -Wno-narrowing -Wno-class-memaccess -std=gnu++17 -fno-aligned-new -fno-exceptions -fno-rtti -fvisibility-inlines-hidden  -D__DATE__= -D__TIME__= -D__TIMESTAMP__= -march=znver2 -mtune=znver2 -pipe -fdiagnostics-color=always -fstack-protector-strong -D_FORTIFY_SOURCE=2 -Wno-builtin-macro-redefined -c ../../media/filters/audio_file_reader.cc -o obj/media/filters/filters/audio_file_reader.o
../../media/filters/audio_file_reader.cc: In member function ‘bool media::AudioFileReader::OpenDecoder()’:
../../media/filters/audio_file_reader.cc:117:27: error: ‘struct AVCodecContext’ has no member named ‘ch_layout’; did you mean ‘channel_layout’?
  117 |           codec_context_->ch_layout.u.mask,
      |                           ^~~~~~~~~
      |                           channel_layout
../../media/filters/audio_file_reader.cc:118:27: error: ‘struct AVCodecContext’ has no member named ‘ch_layout’; did you mean ‘channel_layout’?
  118 |           codec_context_->ch_layout.nb_channels) ==
      |                           ^~~~~~~~~
      |                           channel_layout
../../media/filters/audio_file_reader.cc:124:31: error: ‘struct AVCodecContext’ has no member named ‘ch_layout’; did you mean ‘channel_layout’?
  124 |   channels_ = codec_context_->ch_layout.nb_channels;
      |                               ^~~~~~~~~
      |                               channel_layout
../../media/filters/audio_file_reader.cc: In member function ‘bool media::AudioFileReader::OnNewFrame(int*, std::vector<std::unique_ptr<media::AudioBus> >*, AVFrame*)’:
../../media/filters/audio_file_reader.cc:227:31: error: ‘AVFrame’ {aka ‘struct AVFrame’} has no member named ‘ch_layout’; did you mean ‘channel_layout’?
  227 |   const int channels = frame->ch_layout.nb_channels;
      |                               ^~~~~~~~~
      |                               channel_layout
Bogdan107 commented 2 years ago

I found more files with ch_layout word:

$ cd /tmp/portage/www-client/ungoogled-chromium-102.0.5005.61_p1
$ grep -rl -e ">ch_layout\." -e "\.ch_layout\."
work/chromium-102.0.5005.61/media/cdm/library_cdm/clear_key_cdm/ffmpeg_cdm_audio_decoder.cc
work/chromium-102.0.5005.61/media/ffmpeg/ffmpeg_common.cc
work/chromium-102.0.5005.61/media/filters/ffmpeg_audio_decoder.cc
work/chromium-102.0.5005.61/media/filters/audio_file_reader.cc
work/chromium-102.0.5005.61/media/filters/ffmpeg_aac_bitstream_converter_unittest.cc
work/chromium-102.0.5005.61/media/filters/ffmpeg_aac_bitstream_converter.cc

May bee this error will be resolved by this code:

src_prepare() {
        # bug #153:
        #    ‘struct AVCodecContext’ has no member named ‘ch_layout’; did you mean ‘channel_layout’?
        for i in media/cdm/library_cdm/clear_key_cdm/ffmpeg_cdm_audio_decoder.cc \
                media/ffmpeg/ffmpeg_common.cc \
                media/filters/ffmpeg_audio_decoder.cc \
                media/filters/audio_file_reader.cc \
                media/filters/ffmpeg_aac_bitstream_converter_unittest.cc \
                media/filters/ffmpeg_aac_bitstream_converter.cc;
        do
                sed -i -e 's|->ch_layout\.|->channel_layout\.|g; s|av_frame\.ch_layout\.|av_frame\.channel_layout\.|g' \
                    $i || die
        done
}

But with those patch I have other errors:

FAILED: obj/media/filters/filters/audio_file_reader.o 
x86_64-pc-linux-gnu-g++ -MMD -MF obj/media/filters/filters/audio_file_reader.o.d -DUSE_UDEV -DUSE_AURA=1 -DUSE_GLIB=1 -DUSE_OZONE=1 -DOFFICIAL_BUILD -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURC
E -D_LARGEFILE64_SOURCE -DNO_UNWIND_TABLES -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -DIS_MEDIA_IMPL -DUSE_PULSEAUDIO -DDLOPEN_PULSEAUDIO -DGLIB_VERSION_MAX_ALLOWED=GLIB_VERSION_2_40 -DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_4
0 -DGL_GLEXT_PROTOTYPES -DUSE_GLX -DUSE_EGL -DVK_USE_PLATFORM_XCB_KHR -DVK_USE_PLATFORM_WAYLAND_KHR -DSK_CODEC_DECODES_PNG -DSK_CODEC_DECODES_WEBP -DSK_ENCODE_PNG -DSK_ENCODE_WEBP -DSK_ENABLE_SKSL -DSK_UNTIL_CRBUG_1187654_IS_FIXED -DSK_US
ER_CONFIG_HEADER=\"../../skia/config/SkUserConfig.h\" -DSK_WIN_FONTMGR_NO_SIMULATIONS -DSK_GL -DSK_CODEC_DECODES_JPEG -DSK_ENCODE_JPEG -DSK_HAS_WUFFS_LIBRARY -DSK_VULKAN=1 -DSK_SUPPORT_GPU=1 -DSK_GPU_WORKAROUNDS_HEADER=\"gpu/config/gpu_dr
iver_bug_workaround_autogen.h\" -DUSING_SYSTEM_ICU=1 -DICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_STATIC -DU_IMPORT=U_EXPORT -Dav_stream_get_first_dts\(stream\)=stream-\>first_dts -DCONFIG_LOG=0 -DSTACK_ALIGNMENT=32 -DHAVE_PTHREAD_GETAFFINITY_NP=1 
-DDAV1D_API= -I../.. -Igen -I../../third_party/perfetto/include -Igen/third_party/perfetto/build_config -Igen/third_party/perfetto -Igen/shim_headers/zlib_shim -Igen/shim_headers/jsoncpp_shim -Igen/shim_headers/libevent_shim -Igen/shim_he
aders/icui18n_shim -Igen/shim_headers/icuuc_shim -Igen/shim_headers/libpng_shim -Igen/shim_headers/libwebp_shim -I../../third_party/khronos -I../../gpu -I../../third_party/vulkan-deps/vulkan-headers/src/include -Igen/third_party/dawn/incl
ude -I../../third_party/dawn/include -I../../third_party/dawn/src/include -Igen/shim_headers/re2_shim -I../../third_party/libyuv/include -Igen/shim_headers/ffmpeg_shim -Igen/shim_headers/openh264_shim -Igen/shim_headers/opus_shim -I../../
third_party/abseil-cpp -I../../third_party/boringssl/src/include -I../../third_party/protobuf/src -Igen/protoc_out -I../../third_party/skia -I../../third_party/wuffs/src/release/c -I../../third_party/vulkan/include -I../../third_party/mes
a_headers -I../../third_party/libaom/source/libaom -I../../third_party/libvpx/source/libvpx -I../../third_party/dav1d/version -Wno-unused-local-typedefs -Wno-maybe-uninitialized -Wno-deprecated-declarations -Wno-comments -Wno-packed-not-a
ligned -Wno-missing-field-initializers -Wno-unused-parameter -fno-ident -fno-strict-aliasing --param=ssp-buffer-size=4 -fstack-protector -fno-unwind-tables -fno-asynchronous-unwind-tables -fPIC -pipe -pthread -O2 -fdata-sections -ffunctio
n-sections -fno-omit-frame-pointer -g0 -fvisibility=hidden -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/sysprof-4 -I/usr/lib64/libffi/include -I/usr/include/opus -Wno-narrowing -Wno-class-memaccess -std=gnu++17 -fn
o-aligned-new -fno-exceptions -fno-rtti -fvisibility-inlines-hidden  -D__DATE__= -D__TIME__= -D__TIMESTAMP__= -march=znver2 -mtune=znver2 -pipe -fdiagnostics-color=always -fstack-protector-strong -D_FORTIFY_SOURCE=2 -Wno-builtin-macro-red
efined -c ../../media/filters/audio_file_reader.cc -o obj/media/filters/filters/audio_file_reader.o
../../media/filters/audio_file_reader.cc: In member function ‘bool media::AudioFileReader::OpenDecoder()’:
../../media/filters/audio_file_reader.cc:117:42: error: request for member ‘u’ in ‘((media::AudioFileReader*)this)->media::AudioFileReader::codec_context_.std::unique_ptr<AVCodecContext, media::ScopedPtrAVFreeContext>::operator->()->AVCod
ecContext::channel_layout’, which is of non-class type ‘uint64_t’ {aka ‘long unsigned int’}
  117 |           codec_context_->channel_layout.u.mask,
      |                                          ^
../../media/filters/audio_file_reader.cc:118:42: error: request for member ‘nb_channels’ in ‘((media::AudioFileReader*)this)->media::AudioFileReader::codec_context_.std::unique_ptr<AVCodecContext, media::ScopedPtrAVFreeContext>::operator-
>()->AVCodecContext::channel_layout’, which is of non-class type ‘uint64_t’ {aka ‘long unsigned int’}
  118 |           codec_context_->channel_layout.nb_channels) ==
      |                                          ^~~~~~~~~~~
../../media/filters/audio_file_reader.cc:124:46: error: request for member ‘nb_channels’ in ‘((media::AudioFileReader*)this)->media::AudioFileReader::codec_context_.std::unique_ptr<AVCodecContext, media::ScopedPtrAVFreeContext>::operator-
>()->AVCodecContext::channel_layout’, which is of non-class type ‘uint64_t’ {aka ‘long unsigned int’}
  124 |   channels_ = codec_context_->channel_layout.nb_channels;
      |                                              ^~~~~~~~~~~
../../media/filters/audio_file_reader.cc: In member function ‘bool media::AudioFileReader::OnNewFrame(int*, std::vector<std::unique_ptr<media::AudioBus> >*, AVFrame*)’:
../../media/filters/audio_file_reader.cc:227:46: error: request for member ‘nb_channels’ in ‘frame->AVFrame::channel_layout’, which is of non-class type ‘uint64_t’ {aka ‘long unsigned int’}
  227 |   const int channels = frame->channel_layout.nb_channels;
      |                                              ^~~~~~~~~~~

and

FAILED: obj/media/ffmpeg/ffmpeg/ffmpeg_common.o 
x86_64-pc-linux-gnu-g++ -MMD -MF obj/media/ffmpeg/ffmpeg/ffmpeg_common.o.d -DUSE_UDEV -DUSE_AURA=1 -DUSE_GLIB=1 -DUSE_OZONE=1 -DOFFICIAL_BUILD -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -DNO_UNWIND_TABLES -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -DIS_MEDIA_IMPL -DUSE_PULSEAUDIO -DDLOPEN_PULSEAUDIO -DGLIB_VERSION_MAX_ALLOWED=GLIB_VERSION_2_40 -DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_40 -DGL_GLEXT_PROTOTYPES -DUSE_GLX -DUSE_EGL -DVK_USE_PLATFORM_XCB_KHR -DVK_USE_PLATFORM_WAYLAND_KHR -DSK_CODEC_DECODES_PNG -DSK_CODEC_DECODES_WEBP -DSK_ENCODE_PNG -DSK_ENCODE_WEBP -DSK_ENABLE_SKSL -DSK_UNTIL_CRBUG_1187654_IS_FIXED -DSK_USER_CONFIG_HEADER=\"../../skia/config/SkUserConfig.h\" -DSK_WIN_FONTMGR_NO_SIMULATIONS -DSK_GL -DSK_CODEC_DECODES_JPEG -DSK_ENCODE_JPEG -DSK_HAS_WUFFS_LIBRARY -DSK_VULKAN=1 -DSK_SUPPORT_GPU=1 -DSK_GPU_WORKAROUNDS_HEADER=\"gpu/config/gpu_driver_bug_workaround_autogen.h\" -DUSING_SYSTEM_ICU=1 -DICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_STATIC -DU_IMPORT=U_EXPORT -Dav_stream_get_first_dts\(stream\)=stream-\>first_dts -I../.. -Igen -I../../third_party/perfetto/include -Igen/third_party/perfetto/build_config -Igen/third_party/perfetto -Igen/shim_headers/zlib_shim -Igen/shim_headers/jsoncpp_shim -Igen/shim_headers/libevent_shim -Igen/shim_headers/icui18n_shim -Igen/shim_headers/icuuc_shim -Igen/shim_headers/libpng_shim -Igen/shim_headers/libwebp_shim -I../../third_party/khronos -I../../gpu -I../../third_party/vulkan-deps/vulkan-headers/src/include -Igen/third_party/dawn/include -I../../third_party/dawn/include -I../../third_party/dawn/src/include -Igen/shim_headers/re2_shim -I../../third_party/libyuv/include -Igen/shim_headers/ffmpeg_shim -Igen/shim_headers/openh264_shim -I../../third_party/abseil-cpp -I../../third_party/boringssl/src/include -I../../third_party/protobuf/src -Igen/protoc_out -I../../third_party/skia -I../../third_party/wuffs/src/release/c -I../../third_party/vulkan/include -I../../third_party/mesa_headers -Wno-unused-local-typedefs -Wno-maybe-uninitialized -Wno-deprecated-declarations -Wno-comments -Wno-packed-not-aligned -Wno-missing-field-initializers -Wno-unused-parameter -fno-ident -fno-strict-aliasing --param=ssp-buffer-size=4 -fstack-protector -fno-unwind-tables -fno-asynchronous-unwind-tables -fPIC -pipe -pthread -O2 -fdata-sections -ffunction-sections -fno-omit-frame-pointer -g0 -fvisibility=hidden -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/sysprof-4 -I/usr/lib64/libffi/include -Wno-narrowing -Wno-class-memaccess -std=gnu++17 -fno-aligned-new -fno-exceptions -fno-rtti -fvisibility-inlines-hidden  -D__DATE__= -D__TIME__= -D__TIMESTAMP__= -march=znver2 -mtune=znver2 -pipe -fdiagnostics-color=always -fstack-protector-strong -D_FORTIFY_SOURCE=2 -Wno-builtin-macro-redefined -c ../../media/ffmpeg/ffmpeg_common.cc -o obj/media/ffmpeg/ffmpeg/ffmpeg_common.o
../../media/ffmpeg/ffmpeg_common.cc: In function ‘bool media::AVCodecContextToAudioDecoderConfig(const AVCodecContext*, media::EncryptionScheme, media::AudioDecoderConfig*)’:
../../media/ffmpeg/ffmpeg_common.cc:348:37: error: request for member ‘nb_channels’ in ‘codec_context->AVCodecContext::channel_layout’, which is of non-class type ‘const uint64_t’ {aka ‘const long unsigned int’}
  348 |       codec_context->channel_layout.nb_channels > 8
      |                                     ^~~~~~~~~~~
../../media/ffmpeg/ffmpeg_common.cc:351:47: error: request for member ‘u’ in ‘codec_context->AVCodecContext::channel_layout’, which is of non-class type ‘const uint64_t’ {aka ‘const long unsigned int’}
  351 |                 codec_context->channel_layout.u.mask,
      |                                               ^
../../media/ffmpeg/ffmpeg_common.cc:352:47: error: request for member ‘nb_channels’ in ‘codec_context->AVCodecContext::channel_layout’, which is of non-class type ‘const uint64_t’ {aka ‘const long unsigned int’}
  352 |                 codec_context->channel_layout.nb_channels);
      |                                               ^~~~~~~~~~~
../../media/ffmpeg/ffmpeg_common.cc:405:66: error: request for member ‘nb_channels’ in ‘codec_context->AVCodecContext::channel_layout’, which is of non-class type ‘const uint64_t’ {aka ‘const long unsigned int’}
  405 |     config->SetChannelsForDiscrete(codec_context->channel_layout.nb_channels);
      |                                                                  ^~~~~~~~~~~
../../media/ffmpeg/ffmpeg_common.cc: In function ‘void media::AudioDecoderConfigToAVCodecContext(const media::AudioDecoderConfig&, AVCodecContext*)’:
../../media/ffmpeg/ffmpeg_common.cc:474:33: error: request for member ‘nb_channels’ in ‘codec_context->AVCodecContext::channel_layout’, which is of non-class type ‘uint64_t’ {aka ‘long unsigned int’}
  474 |   codec_context->channel_layout.nb_channels = config.channels();
a61kt commented 2 years ago

@Bogdan107 and does it works well (ffmpeg) if u build without system_ffmpeg (aka using chromium's own ffmpeg)

Bogdan107 commented 2 years ago

With USE="-system-ffmpeg", error stil present.

My config is:

$ emerge -apv ungoogled-chromium 
[ebuild     U ] www-client/ungoogled-chromium-102.0.5005.61_p1 [101.0.4951.64_p1-r2] \
  USE="convert-dict cups enable-driver js-type-check official proprietary-codecs pulseaudio (selinux) \
  system-harfbuzz system-icu system-jsoncpp system-libevent system-libusb system-openh264 \
  system-openjpeg system-png system-re2 system-snappy vaapi vdpau wayland \
  -cfi -clang -custom-cflags -debug -gtk4 -hangouts -headless -kerberos -optimize-thinlto -optimize-webui \
  -pgo -pic -screencast -suid -system-ffmpeg* -system-libvpx -thinlto -widevine" \
  L10N="ru uk"

Error like in previous comment:

FAILED: obj/media/ffmpeg/ffmpeg/ffmpeg_common.o 
x86_64-pc-linux-gnu-g++ -MMD -MF obj/media/ffmpeg/ffmpeg/ffmpeg_common.o.d -DUSE_UDEV -DUSE_AURA=1 -DUSE_GLIB=1 -DUSE_OZONE=1 -DOFFICIAL_BUILD -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -DNO_UNWIND_TABLES -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -DIS_MEDIA_IMPL -DUSE_PULSEAUDIO -DDLOPEN_PULSEAUDIO -DGLIB_VERSION_MAX_ALLOWED=GLIB_VERSION_2_40 -DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_40 -DGL_GLEXT_PROTOTYPES -DUSE_GLX -DUSE_EGL -DVK_USE_PLATFORM_XCB_KHR -DVK_USE_PLATFORM_WAYLAND_KHR -DSK_CODEC_DECODES_PNG -DSK_CODEC_DECODES_WEBP -DSK_ENCODE_PNG -DSK_ENCODE_WEBP -DSK_ENABLE_SKSL -DSK_UNTIL_CRBUG_1187654_IS_FIXED -DSK_USER_CONFIG_HEADER=\"../../skia/config/SkUserConfig.h\" -DSK_WIN_FONTMGR_NO_SIMULATIONS -DSK_GL -DSK_CODEC_DECODES_JPEG -DSK_ENCODE_JPEG -DSK_HAS_WUFFS_LIBRARY -DSK_VULKAN=1 -DSK_SUPPORT_GPU=1 -DSK_GPU_WORKAROUNDS_HEADER=\"gpu/config/gpu_driver_bug_workaround_autogen.h\" -DUSING_SYSTEM_ICU=1 -DICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_STATIC -DU_IMPORT=U_EXPORT -I../.. -Igen -I../../third_party/perfetto/include -Igen/third_party/perfetto/build_config -Igen/third_party/perfetto -Igen/shim_headers/zlib_shim -Igen/shim_headers/jsoncpp_shim -Igen/shim_headers/libevent_shim -Igen/shim_headers/icui18n_shim -Igen/shim_headers/icuuc_shim -Igen/shim_headers/libpng_shim -Igen/shim_headers/libwebp_shim -I../../third_party/khronos -I../../gpu -I../../third_party/vulkan-deps/vulkan-headers/src/include -Igen/third_party/dawn/include -I../../third_party/dawn/include -I../../third_party/dawn/src/include -Igen/shim_headers/re2_shim -I../../third_party/libyuv/include -Igen/shim_headers/openh264_shim -I../../third_party/abseil-cpp -I../../third_party/boringssl/src/include -I../../third_party/protobuf/src -Igen/protoc_out -I../../third_party/skia -I../../third_party/wuffs/src/release/c -I../../third_party/vulkan/include -I../../third_party/mesa_headers -I../../third_party/ffmpeg/chromium/config/Chrome/linux/x64 -I../../third_party/ffmpeg -Wno-unused-local-typedefs -Wno-maybe-uninitialized -Wno-deprecated-declarations -Wno-comments -Wno-packed-not-aligned -Wno-missing-field-initializers -Wno-unused-parameter -fno-ident -fno-strict-aliasing --param=ssp-buffer-size=4 -fstack-protector -fno-unwind-tables -fno-asynchronous-unwind-tables -fPIC -pipe -pthread -O2 -fdata-sections -ffunction-sections -fno-omit-frame-pointer -g0 -fvisibility=hidden -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/sysprof-4 -I/usr/lib64/libffi/include -Wno-narrowing -Wno-class-memaccess -std=gnu++17 -fno-aligned-new -fno-exceptions -fno-rtti -fvisibility-inlines-hidden  -D__DATE__= -D__TIME__= -D__TIMESTAMP__= -march=znver2 -mtune=znver2 -pipe -fdiagnostics-color=always -fstack-protector-strong -D_FORTIFY_SOURCE=2 -Wno-builtin-macro-redefined -c ../../media/ffmpeg/ffmpeg_common.cc -o obj/media/ffmpeg/ffmpeg/ffmpeg_common.o
../../media/ffmpeg/ffmpeg_common.cc: In function ‘bool media::AVCodecContextToAudioDecoderConfig(const AVCodecContext*, media::EncryptionScheme, media::AudioDecoderConfig*)’:
../../media/ffmpeg/ffmpeg_common.cc:348:37: error: request for member ‘nb_channels’ in ‘codec_context->AVCodecContext::channel_layout’, which is of non-class type ‘const uint64_t’ {aka ‘const long unsigned int’}
  348 |       codec_context->channel_layout.nb_channels > 8
      |                                     ^~~~~~~~~~~
../../media/ffmpeg/ffmpeg_common.cc:351:47: error: request for member ‘u’ in ‘codec_context->AVCodecContext::channel_layout’, which is of non-class type ‘const uint64_t’ {aka ‘const long unsigned int’}
  351 |                 codec_context->channel_layout.u.mask,
      |                                               ^
../../media/ffmpeg/ffmpeg_common.cc:352:47: error: request for member ‘nb_channels’ in ‘codec_context->AVCodecContext::channel_layout’, which is of non-class type ‘const uint64_t’ {aka ‘const long unsigned int’}
  352 |                 codec_context->channel_layout.nb_channels);
      |                                               ^~~~~~~~~~~
../../media/ffmpeg/ffmpeg_common.cc:405:66: error: request for member ‘nb_channels’ in ‘codec_context->AVCodecContext::channel_layout’, which is of non-class type ‘const uint64_t’ {aka ‘const long unsigned int’}
  405 |     config->SetChannelsForDiscrete(codec_context->channel_layout.nb_channels);
      |                                                                  ^~~~~~~~~~~
../../media/ffmpeg/ffmpeg_common.cc: In function ‘void media::AudioDecoderConfigToAVCodecContext(const media::AudioDecoderConfig&, AVCodecContext*)’:
../../media/ffmpeg/ffmpeg_common.cc:474:33: error: request for member ‘nb_channels’ in ‘codec_context->AVCodecContext::channel_layout’, which is of non-class type ‘uint64_t’ {aka ‘long unsigned int’}
  474 |   codec_context->channel_layout.nb_channels = config.channels();
Bogdan107 commented 2 years ago

As the same error still present with USE="system-ffmpeg" and with USE="-system-ffmpeg", then ebuild may be incorrect.

Why ebuild build ffmpeg code if system-ffmpeg switched on?

PF4Public commented 2 years ago

With USE="-system-ffmpeg", error stil present.

Builds fine for me.

Why ebuild build ffmpeg code if system-ffmpeg switched on?

Because README.md says:

Testing keywords ( ~arch ) signify that these ebuilds could possibly be built, or need some more work to be built. They may be compilable, but lacking some functionality. Alternatively they may be perfectly compilable, but having some dependencies in testing.

If you do not like breakages, do not accept Testing keywords ( ~arch ) — as easy as that.

Bogdan107 commented 2 years ago

Builds fine for me.

Which config for your ebuild? Please, post output of emerge -pv ungoogled-chromium command.

PF4Public commented 2 years ago

Please, post output of emerge -pv ungoogled-chromium command.

[ebuild R ~] www-client/ungoogled-chromium-102.0.5005.61_p1::pf4public USE="clang convert-dict cups custom-cflags js-type-check official optimize-thinlto optimize-webui pgo proprietary-codecs pulseaudio system-ffmpeg* system-harfbuzz system-icu system-jsoncpp system-libevent system-libusb system-openh264 system-openjpeg system-png system-re2 system-snappy thinlto vaapi -cfi -debug -enable-driver -gtk4 -hangouts -headless -kerberos -pic -screencast (-selinux) -suid -system-libvpx -vdpau -wayland -widevine" L10N="de en-GB ru -af -am -ar -bg -bn -ca -cs -da -el -es -es-419 -et -fa -fi -fil -fr -gu -he -hi -hr -hu -id -it -ja -kn -ko -lt -lv -ml -mr -ms -nb -nl -pl -pt-BR -pt-PT -ro -sk -sl -sr -sv -sw -ta -te -th -tr -uk -ur -vi -zh-CN -zh-TW" 0 KiB

rokonrad commented 2 years ago

with system-ffmeg I had the same error, with -system-ffmeg it builds also fine for me.

[ebuild R ~] www-client/ungoogled-chromium-102.0.5005.61_p1::pf4public USE="clang cups official optimize-thinlto optimize-webui proprietary-codecs pulseaudio system-harfbuzz system-icu system-jsoncpp system-libevent system-libusb system-openh264 system-png system-re2 system-snappy thinlto vaapi vdpau widevine -cfi -convert-dict -custom-cflags -debug -enable-driver -gtk4 -hangouts -headless -js-type-check -kerberos -pgo -pic -screencast (-selinux) -suid -system-ffmpeg -system-libvpx -system-openjpeg -wayland" L10N="cs de en-GB -af -am -ar -bg -bn -ca -da -el -es -es-419 -et -fa -fi -fil -fr -gu -he -hi -hr -hu -id -it -ja -kn -ko -lt -lv -ml -mr -ms -nb -nl -pl -pt-BR -pt-PT -ro -ru -sk -sl -sr -sv -sw -ta -te -th -tr -uk -ur -vi -zh-CN -zh-TW" 1.400.402 KiB

perfect7gentleman commented 2 years ago
ninja: job failed: clang++ -MMD -MF obj/third_party/pdfium/core/fxcodec/fxcodec/cjpx_decoder.o.d -DUSE_UDEV -DUSE_AURA=1 -DUSE_GLIB=1 -DUSE_OZONE=1 -DOFFICIAL_BUILD -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -DNO_UNWIND_TABLES -D_GNU_SOURCE -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -DPNG_PREFIX -DPNG_USE_READ_MACROS -DPDF_ENABLE_V8 -DPDF_ENABLE_XFA -DPDF_ENABLE_XFA_BMP -DPDF_ENABLE_XFA_GIF -DPDF_ENABLE_XFA_PNG -DPDF_ENABLE_XFA_TIFF -DUSE_SYSTEM_LCMS2 -DUSE_SYSTEM_LIBOPENJPEG2 -DUSE_SYSTEM_ZLIB -DUSING_SYSTEM_ICU=1 -DICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_STATIC -DU_IMPORT=U_EXPORT -DUSE_SYSTEM_LIBJPEG -DUSE_SYSTEM_LIBPNG -I../.. -Igen -I../../third_party/pdfium -Igen/shim_headers/icuuc_shim -I../../third_party/abseil-cpp -Wimplicit-fallthrough -Wunreachable-code-aggressive -Wthread-safety -Wno-missing-field-initializers -Wno-unused-parameter -Wloop-analysis -Wno-unneeded-internal-declaration -Wenum-compare-conditional -Wno-psabi -Wno-ignored-pragma-optimize -Wno-unqualified-std-cast-call -Wno-deprecated-non-prototype -Wshadow -fno-delete-null-pointer-checks -fno-ident -fno-strict-aliasing --param=ssp-buffer-size=4 -fstack-protector -fno-unwind-tables -fno-asynchronous-unwind-tables -fPIC -pthread -fcolor-diagnostics -fmerge-all-constants -flto=thin -fsplit-lto-unit -fwhole-program-vtables -no-canonical-prefixes -ftrivial-auto-var-init=pattern -fno-omit-frame-pointer -fvisibility=hidden -Wheader-hygiene -Wstring-conversion -Wtautological-overlap-compare -Wc++11-narrowing -Wdeprecated-copy -Wtautological-unsigned-zero-compare -Wshadow -Wexit-time-destructors -Wglobal-constructors -Wshorten-64-to-32 -I/usr/include/openjpeg-2.5 -I/usr/include/freetype2 -I/usr/include/harfbuzz -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -std=c++17 -Wno-trigraphs -fno-aligned-new -fno-exceptions -fno-rtti -fvisibility-inlines-hidden  -D__DATE__= -D__TIME__= -D__TIMESTAMP__= -march=native -mtune=native -O3 -pipe -mllvm -polly -mllvm -polly-vectorizer=stripmine -fdata-sections -ffunction-sections -flto=thin -fomit-frame-pointer -fno-asynchronous-unwind-tables -fno-common -fno-plt -fno-stack-protector -fno-standalone-debug -fno-unwind-tables -stdlib=libc++ -Wno-unknown-warning-option -Wno-builtin-macro-redefined -c ../../third_party/pdfium/core/fxcodec/jpx/cjpx_decoder.cpp -o obj/third_party/pdfium/core/fxcodec/fxcodec/cjpx_decoder.o
In file included from ../../third_party/pdfium/core/fxcodec/jpx/cjpx_decoder.cpp:7:
../../third_party/pdfium/core/fxcodec/jpx/cjpx_decoder.h:16:10: fatal error: 'openjpeg-2.4/openjpeg.h' file not found
#include <openjpeg-2.4/openjpeg.h>
         ^~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
ninja: subcommand failed
media-libs/openjpeg-2.5.0-r2
PF4Public commented 2 years ago

@perfect7gentleman You'd better open a separate issue. There must be a better way of doing this.

This looks promising.

perfect7gentleman commented 2 years ago

"${FILESDIR}/reverse-roll-src-third_party-ffmpeg.patch" should be applied for ffmpeg-5.0 too.

Bogdan107 commented 2 years ago

Error resolved with _reverse-roll-src-thirdparty-ffmpeg.patch