ungoogled-software / ungoogled-chromium

Google Chromium, sans integration with Google
BSD 3-Clause "New" or "Revised" License
20.19k stars 816 forks source link

Impossible to compile with VAAPI #2425

Closed TCH68k closed 1 year ago

TCH68k commented 1 year ago

OS/Platform

Debian, Ubuntu, and derivatives

Installed

Compiled from source

Version

115.0.5790.99

Have you tested that this is not an upstream issue or an issue with your configuration?

Description

Impossible to compile with VAAPI

How to Reproduce?

  1. Use these settings in flags.gn:
    enable_av1_decoder=true
    enable_libaom=true
    enable_dav1d_decoder=false
    rtc_include_dav1d_in_internal_decoder_factory=false
    use_libgav1_parser=true
    use_vaapi=true
    use_vaapi_x11=true
  2. Compile.

Actual behaviour

Dies off with tons of error message.

Expected behaviour

Build.

Relevant log output

FAILED: obj/media/gpu/vaapi/vaapi/av1_vaapi_video_encoder_delegate.o
../../third_party/llvm-build/Release+Asserts/bin/clang++ -MMD -MF obj/media/gpu/vaapi/vaapi/av1_vaapi_video_encoder_delegate.o.d -DMEDIA_GPU_IMPLEMENTATION -DUSE_UDEV -DUSE_AURA=1 -DUSE_GLIB=1 -DUSE_OZONE=1 -DOFFICIAL_BUILD -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D_FORTIFY_SOURCE=2 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -DNO_UNWIND_TABLES -D_GNU_SOURCE -DCR_CLANG_REVISION=\"llvmorg-17-init-10134-g3da83fba-2\" -D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS -D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS -DCR_LIBCXX_REVISION=f8279b01085b800724f5c5629dc365b9f040dc53 -D_LIBCPP_ENABLE_ASSERTIONS=1 -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -DGLIB_VERSION_MAX_ALLOWED=GLIB_VERSION_2_56 -DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_56 -DBASE_USE_PERFETTO_CLIENT_LIBRARY=1 -DWEBP_EXTERN=extern -DUSE_EGL -DVK_USE_PLATFORM_XCB_KHR -DLIBYUV_DISABLE_NEON -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_DISABLE_LEGACY_IMAGE_FACTORIES -DSK_DISABLE_LEGACY_MAKE_TEXTURE_IMAGE -DSK_DISABLE_LEGACY_IMAGE_FLUSH -DSK_DISABLE_LEGACY_GET_BACKEND_TEXTURE -DSK_DISABLE_LEGACY_IMAGE_ENCODE_METHODS -DSK_DISABLE_LEGACY_IMAGE_ENCODER -DSK_DISABLE_LEGACY_SKSURFACE_METHODS -DSK_DISABLE_LEGACY_GRAPHITE_IMAGE_FACTORIES -DSK_DISABLE_LEGACY_GRAPHITE_IMAGE_METHODS -DSK_CODEC_DECODES_JPEG -DSK_ENCODE_JPEG -DSK_HAS_WUFFS_LIBRARY -DSK_GANESH -DSK_GPU_WORKAROUNDS_HEADER=\"gpu/config/gpu_driver_bug_workaround_autogen.h\" -DSK_GL -DSK_VULKAN=1 -DSK_GRAPHITE -DU_USING_ICU_NAMESPACE=0 -DU_ENABLE_DYLOAD=0 -DUSE_CHROMIUM_ICU=1 -DU_ENABLE_TRACING=1 -DU_ENABLE_RESOURCE_TRACING=0 -DU_STATIC_IMPLEMENTATION -DICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_FILE -DGOOGLE_PROTOBUF_NO_RTTI -DGOOGLE_PROTOBUF_NO_STATIC_INITIALIZER -DGOOGLE_PROTOBUF_INTERNAL_DONATE_STEAL_INLINE=0 -DHAVE_PTHREAD -DLEVELDB_PLATFORM_CHROMIUM=1 -DCRASHPAD_ZLIB_SOURCE_EXTERNAL -DLIBGAV1_MAX_BITDEPTH=10 -DLIBGAV1_THREADPOOL_USE_STD_MUTEX -DLIBGAV1_ENABLE_LOGGING=0 -DLIBGAV1_PUBLIC= -DVK_NO_PROTOTYPES -DUSE_VULKAN_XCB -I../.. -Igen -I../../buildtools/third_party/libc++ -I../../third_party/libvpx/source/config -I../../third_party/libvpx/source/config/linux/x64 -I../../third_party/libvpx/source/libvpx -I../../third_party/perfetto/include -Igen/third_party/perfetto/build_config -Igen/third_party/perfetto -I../../third_party/libwebp/src/src -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/libyuv/include -I../../third_party/libwebm/source -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/icu/source/common -I../../third_party/icu/source/i18n -I../../third_party/leveldatabase -I../../third_party/leveldatabase/src -I../../third_party/leveldatabase/src/include -I../../third_party/crashpad/crashpad -I../../third_party/crashpad/crashpad/compat/linux -I../../third_party/crashpad/crashpad/compat/non_win -I../../third_party/zlib -I../../third_party/libaom/source/libaom -I../../third_party/ipcz/include -I../../third_party/ced/src -I../../third_party/libgav1/src -I../../third_party/libgav1/src/src -I../../net/third_party/quiche/overrides -I../../net/third_party/quiche/src/quiche/common/platform/default -I../../net/third_party/quiche/src -Igen/net/third_party/quiche/src -Wall -Wextra -Wimplicit-fallthrough -Wextra-semi -Wunreachable-code-aggressive -Wthread-safety -Wno-missing-field-initializers -Wno-unused-parameter -Wno-psabi -Wloop-analysis -Wno-unneeded-internal-declaration -Wenum-compare-conditional -Wno-ignored-pragma-optimize -Wno-deprecated-builtins -Wno-bitfield-constant-conversion -Wno-deprecated-this-capture -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 -fcrash-diagnostics-dir=../../tools/clang/crashreports -mllvm -instcombine-lower-dbg-declare=0 -ffp-contract=off -fcomplete-member-pointers -m64 -msse3 -ffile-compilation-dir=. -no-canonical-prefixes -ftrivial-auto-var-init=pattern -O2 -fdata-sections -ffunction-sections -fno-unique-section-names -fno-omit-frame-pointer -g0 -fvisibility=hidden -Wheader-hygiene -Wstring-conversion -Wtautological-overlap-compare -Wno-conversion -Wno-parentheses-equality -Wno-unused-function -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -Wno-redundant-parens -DPROTOBUF_ALLOW_DEPRECATED=1 -Wno-redundant-parens -I/usr/include/libdrm -I/usr/include/nss -I/usr/include/nspr -std=c++20 -Wno-trigraphs -gsimple-template-names -fno-exceptions -fno-rtti -nostdinc++ -isystem../../buildtools/third_party/libc++/trunk/include -isystem../../buildtools/third_party/libc++abi/trunk/include -fvisibility-inlines-hidden -c ../../media/gpu/vaapi/av1_vaapi_video_encoder_delegate.cc -o obj/media/gpu/vaapi/vaapi/av1_vaapi_video_encoder_delegate.o
In file included from ../../media/gpu/vaapi/av1_vaapi_video_encoder_delegate.cc:5:
../../media/gpu/vaapi/av1_vaapi_video_encoder_delegate.h:91:25: error: unknown type name 'VAEncPictureParameterBufferAV1'; did you mean 'VADecPictureParameterBufferAV1'?
  bool FillPictureParam(VAEncPictureParameterBufferAV1& pic_param,
                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                        VADecPictureParameterBufferAV1
/usr/include/va/va_dec_av1.h:612:3: note: 'VADecPictureParameterBufferAV1' declared here
} VADecPictureParameterBufferAV1;
  ^
In file included from ../../media/gpu/vaapi/av1_vaapi_video_encoder_delegate.cc:5:
../../media/gpu/vaapi/av1_vaapi_video_encoder_delegate.h:94:29: error: unknown type name 'VAEncPictureParameterBufferAV1'; did you mean 'VADecPictureParameterBufferAV1'?
  bool SubmitFrameOBU(const VAEncPictureParameterBufferAV1& pic_param,
                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                            VADecPictureParameterBufferAV1
/usr/include/va/va_dec_av1.h:612:3: note: 'VADecPictureParameterBufferAV1' declared here
} VADecPictureParameterBufferAV1;
  ^
In file included from ../../media/gpu/vaapi/av1_vaapi_video_encoder_delegate.cc:5:
../../media/gpu/vaapi/av1_vaapi_video_encoder_delegate.h:97:13: error: unknown type name 'VAEncPictureParameterBufferAV1'; did you mean 'VADecPictureParameterBufferAV1'?
      const VAEncPictureParameterBufferAV1& pic_param,
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
            VADecPictureParameterBufferAV1
/usr/include/va/va_dec_av1.h:612:3: note: 'VADecPictureParameterBufferAV1' declared here
} VADecPictureParameterBufferAV1;
  ^
In file included from ../../media/gpu/vaapi/av1_vaapi_video_encoder_delegate.cc:5:
../../media/gpu/vaapi/av1_vaapi_video_encoder_delegate.h:99:27: error: unknown type name 'VAEncPictureParameterBufferAV1'; did you mean 'VADecPictureParameterBufferAV1'?
  bool SubmitPictureParam(VAEncPictureParameterBufferAV1& pic_param,
                          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                          VADecPictureParameterBufferAV1
/usr/include/va/va_dec_av1.h:612:3: note: 'VADecPictureParameterBufferAV1' declared here
} VADecPictureParameterBufferAV1;
  ^
In file included from ../../media/gpu/vaapi/av1_vaapi_video_encoder_delegate.cc:5:
../../media/gpu/vaapi/av1_vaapi_video_encoder_delegate.h:112:3: error: unknown type name 'VAEncSequenceParameterBufferAV1'
  VAEncSequenceParameterBufferAV1 seq_param_;
  ^
../../media/gpu/vaapi/av1_vaapi_video_encoder_delegate.cc:368:34: error: cannot initialize object parameter of type 'media::VaapiVideoEncoderDelegate' with an expression of type 'media::AV1VaapiVideoEncoderDelegate'
      VaapiVideoEncoderDelegate::GetMetadata(encode_job, payload_size);
                                 ^~~~~~~~~~~
../../media/gpu/vaapi/av1_vaapi_video_encoder_delegate.cc:463:33: error: use of undeclared identifier 'VAEncSequenceParameterBufferAV1'
  memset(&seq_param_, 0, sizeof(VAEncSequenceParameterBufferAV1));
                                ^
../../media/gpu/vaapi/av1_vaapi_video_encoder_delegate.cc:502:46: error: use of undeclared identifier 'VAEncSequenceParameterBufferAV1'
                                      sizeof(VAEncSequenceParameterBufferAV1),
                                             ^
../../media/gpu/vaapi/av1_vaapi_video_encoder_delegate.cc:590:3: error: unknown type name 'VAEncPictureParameterBufferAV1'; did you mean 'VADecPictureParameterBufferAV1'?
  VAEncPictureParameterBufferAV1 pic_param{};
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  VADecPictureParameterBufferAV1
/usr/include/va/va_dec_av1.h:612:3: note: 'VADecPictureParameterBufferAV1' declared here
} VADecPictureParameterBufferAV1;
  ^
../../media/gpu/vaapi/av1_vaapi_video_encoder_delegate.cc:616:5: error: use of undeclared identifier 'VAEncPictureParameterBufferAV1'; did you mean 'VAEncPictureParameterBufferType'?
    VAEncPictureParameterBufferAV1& pic_param,
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    VAEncPictureParameterBufferType
/usr/include/va/va.h:1803:5: note: 'VAEncPictureParameterBufferType' declared here
    VAEncPictureParameterBufferType     = 23,
    ^
../../media/gpu/vaapi/av1_vaapi_video_encoder_delegate.cc:615:36: error: redefinition of 'FillPictureParam' as different kind of symbol
bool AV1VaapiVideoEncoderDelegate::FillPictureParam(
                                   ^
../../media/gpu/vaapi/av1_vaapi_video_encoder_delegate.h:91:8: note: previous definition is here
  bool FillPictureParam(VAEncPictureParameterBufferAV1& pic_param,
       ^
../../media/gpu/vaapi/av1_vaapi_video_encoder_delegate.cc:617:5: error: expected expression
    const EncodeJob& job,
    ^
../../media/gpu/vaapi/av1_vaapi_video_encoder_delegate.cc:618:5: error: expected expression
    const AV1Picture& pic) const {
    ^
../../media/gpu/vaapi/av1_vaapi_video_encoder_delegate.cc:616:37: error: use of undeclared identifier 'pic_param'
    VAEncPictureParameterBufferAV1& pic_param,
                                    ^
../../media/gpu/vaapi/av1_vaapi_video_encoder_delegate.cc:618:27: error: expected ';' after top level declarator
    const AV1Picture& pic) const {
                          ^
                          ;
../../media/gpu/vaapi/av1_vaapi_video_encoder_delegate.cc:618:34: error: expected unqualified-id
    const AV1Picture& pic) const {
                                 ^
../../media/gpu/vaapi/av1_vaapi_video_encoder_delegate.cc:800:11: error: unknown type name 'VAEncPictureParameterBufferAV1'; did you mean 'VADecPictureParameterBufferAV1'?
    const VAEncPictureParameterBufferAV1& pic_param,
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          VADecPictureParameterBufferAV1
/usr/include/va/va_dec_av1.h:612:3: note: 'VADecPictureParameterBufferAV1' declared here
} VADecPictureParameterBufferAV1;
  ^
../../media/gpu/vaapi/av1_vaapi_video_encoder_delegate.cc:832:11: error: unknown type name 'VAEncPictureParameterBufferAV1'; did you mean 'VADecPictureParameterBufferAV1'?
    const VAEncPictureParameterBufferAV1& pic_param,
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          VADecPictureParameterBufferAV1
/usr/include/va/va_dec_av1.h:612:3: note: 'VADecPictureParameterBufferAV1' declared here
} VADecPictureParameterBufferAV1;
  ^
../../media/gpu/vaapi/av1_vaapi_video_encoder_delegate.cc:836:49: error: no member named 'picture_flags' in '_VADecPictureParameterBufferAV1'
      static_cast<libgav1::FrameType>(pic_param.picture_flags.bits.frame_type);
                                      ~~~~~~~~~ ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.

Additional context

No response

PF4Public commented 1 year ago

enable_dav1d_decoder=false

Maybe it should be true instead.

TCH68k commented 1 year ago

IIRC it did not make any difference, or caused a different error, but i'll build 116 with your BT patch soon (hopefully tomorrow) anyway, so i'll try it again with this enabled, thanks for the tip.

TCH68k commented 1 year ago

flags.gn:

enable_ffmpeg_video_decoders=true
media_use_ffmpeg=true
proprietary_codecs=true
ffmpeg_branding="Chrome"
use_webaudio_ffmpeg=true
use_webaudio_pffft=true
enable_av1_decoder=true
enable_libaom=true
enable_dav1d_decoder=true
rtc_include_dav1d_in_internal_decoder_factory=true
use_libgav1_parser=true
use_vaapi=true
use_vaapi_x11=true

Result:

In file included from ../../media/gpu/vaapi/av1_vaapi_video_encoder_delegate.cc:5:
../../media/gpu/vaapi/av1_vaapi_video_encoder_delegate.h:91:25: error: unknown type name 'VAEncPictureParameterBufferAV1'; did you mean 'VADecPictureParameterBufferAV1'?
  bool FillPictureParam(VAEncPictureParameterBufferAV1& pic_param,
                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                        VADecPictureParameterBufferAV1
/usr/include/va/va_dec_av1.h:612:3: note: 'VADecPictureParameterBufferAV1' declared here
} VADecPictureParameterBufferAV1;
  ^
In file included from ../../media/gpu/vaapi/av1_vaapi_video_encoder_delegate.cc:5:
../../media/gpu/vaapi/av1_vaapi_video_encoder_delegate.h:94:29: error: unknown type name 'VAEncPictureParameterBufferAV1'; did you mean 'VADecPictureParameterBufferAV1'?
  bool SubmitFrameOBU(const VAEncPictureParameterBufferAV1& pic_param,
                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                            VADecPictureParameterBufferAV1
/usr/include/va/va_dec_av1.h:612:3: note: 'VADecPictureParameterBufferAV1' declared here
} VADecPictureParameterBufferAV1;
  ^
In file included from ../../media/gpu/vaapi/av1_vaapi_video_encoder_delegate.cc:5:
../../media/gpu/vaapi/av1_vaapi_video_encoder_delegate.h:97:13: error: unknown type name 'VAEncPictureParameterBufferAV1'; did you mean 'VADecPictureParameterBufferAV1'?
      const VAEncPictureParameterBufferAV1& pic_param,
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
            VADecPictureParameterBufferAV1
/usr/include/va/va_dec_av1.h:612:3: note: 'VADecPictureParameterBufferAV1' declared here
} VADecPictureParameterBufferAV1;
  ^
In file included from ../../media/gpu/vaapi/av1_vaapi_video_encoder_delegate.cc:5:
../../media/gpu/vaapi/av1_vaapi_video_encoder_delegate.h:99:27: error: unknown type name 'VAEncPictureParameterBufferAV1'; did you mean 'VADecPictureParameterBufferAV1'?
  bool SubmitPictureParam(VAEncPictureParameterBufferAV1& pic_param,
                          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                          VADecPictureParameterBufferAV1
/usr/include/va/va_dec_av1.h:612:3: note: 'VADecPictureParameterBufferAV1' declared here
} VADecPictureParameterBufferAV1;
  ^
In file included from ../../media/gpu/vaapi/av1_vaapi_video_encoder_delegate.cc:5:
../../media/gpu/vaapi/av1_vaapi_video_encoder_delegate.h:112:3: error: unknown type name 'VAEncSequenceParameterBufferAV1'
  VAEncSequenceParameterBufferAV1 seq_param_;
  ^
../../media/gpu/vaapi/av1_vaapi_video_encoder_delegate.cc:368:34: error: cannot initialize object parameter of type 'media::VaapiVideoEncoderDelegate' with an expression of type 'media::AV1VaapiVideoEncoderDelegate'
      VaapiVideoEncoderDelegate::GetMetadata(encode_job, payload_size);
                                 ^~~~~~~~~~~
../../media/gpu/vaapi/av1_vaapi_video_encoder_delegate.cc:463:33: error: use of undeclared identifier 'VAEncSequenceParameterBufferAV1'
  memset(&seq_param_, 0, sizeof(VAEncSequenceParameterBufferAV1));
                                ^
../../media/gpu/vaapi/av1_vaapi_video_encoder_delegate.cc:502:46: error: use of undeclared identifier 'VAEncSequenceParameterBufferAV1'
                                      sizeof(VAEncSequenceParameterBufferAV1),
                                             ^
../../media/gpu/vaapi/av1_vaapi_video_encoder_delegate.cc:590:3: error: unknown type name 'VAEncPictureParameterBufferAV1'; did you mean 'VADecPictureParameterBufferAV1'?
  VAEncPictureParameterBufferAV1 pic_param{};
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  VADecPictureParameterBufferAV1
/usr/include/va/va_dec_av1.h:612:3: note: 'VADecPictureParameterBufferAV1' declared here
} VADecPictureParameterBufferAV1;
  ^
../../media/gpu/vaapi/av1_vaapi_video_encoder_delegate.cc:616:5: error: use of undeclared identifier 'VAEncPictureParameterBufferAV1'; did you mean 'VAEncPictureParameterBufferType'?
    VAEncPictureParameterBufferAV1& pic_param,
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    VAEncPictureParameterBufferType
/usr/include/va/va.h:1803:5: note: 'VAEncPictureParameterBufferType' declared here
    VAEncPictureParameterBufferType     = 23,
    ^
../../media/gpu/vaapi/av1_vaapi_video_encoder_delegate.cc:615:36: error: redefinition of 'FillPictureParam' as different kind of symbol
bool AV1VaapiVideoEncoderDelegate::FillPictureParam(
                                   ^
../../media/gpu/vaapi/av1_vaapi_video_encoder_delegate.h:91:8: note: previous definition is here
  bool FillPictureParam(VAEncPictureParameterBufferAV1& pic_param,
       ^
../../media/gpu/vaapi/av1_vaapi_video_encoder_delegate.cc:617:5: error: expected expression
    const EncodeJob& job,
    ^
../../media/gpu/vaapi/av1_vaapi_video_encoder_delegate.cc:618:5: error: expected expression
    const AV1Picture& pic) const {
    ^
../../media/gpu/vaapi/av1_vaapi_video_encoder_delegate.cc:616:37: error: use of undeclared identifier 'pic_param'
    VAEncPictureParameterBufferAV1& pic_param,
                                    ^
../../media/gpu/vaapi/av1_vaapi_video_encoder_delegate.cc:618:27: error: expected ';' after top level declarator
    const AV1Picture& pic) const {
                          ^
                          ;
../../media/gpu/vaapi/av1_vaapi_video_encoder_delegate.cc:618:34: error: expected unqualified-id
    const AV1Picture& pic) const {
                                 ^
../../media/gpu/vaapi/av1_vaapi_video_encoder_delegate.cc:800:11: error: unknown type name 'VAEncPictureParameterBufferAV1'; did you mean 'VADecPictureParameterBufferAV1'?
    const VAEncPictureParameterBufferAV1& pic_param,
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          VADecPictureParameterBufferAV1
/usr/include/va/va_dec_av1.h:612:3: note: 'VADecPictureParameterBufferAV1' declared here
} VADecPictureParameterBufferAV1;
  ^
../../media/gpu/vaapi/av1_vaapi_video_encoder_delegate.cc:832:11: error: unknown type name 'VAEncPictureParameterBufferAV1'; did you mean 'VADecPictureParameterBufferAV1'?
    const VAEncPictureParameterBufferAV1& pic_param,
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          VADecPictureParameterBufferAV1
/usr/include/va/va_dec_av1.h:612:3: note: 'VADecPictureParameterBufferAV1' declared here
} VADecPictureParameterBufferAV1;
  ^
../../media/gpu/vaapi/av1_vaapi_video_encoder_delegate.cc:836:49: error: no member named 'picture_flags' in '_VADecPictureParameterBufferAV1'
      static_cast<libgav1::FrameType>(pic_param.picture_flags.bits.frame_type);
                                      ~~~~~~~~~ ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
[39192/55376] CXX obj/media/gpu/vaapi/common/vaapi_wrapper.o
ninja: build stopped: subcommand failed.
PF4Public commented 1 year ago

I've already hinted that you should start with Debian repository as a starting point and deviate from there after successful build.

Likely problem here is that you do not set use_sysroot=false.

Please do not use issue tracker as a chat. We expect this issue tracker to be used solely for ungoogled-chromium issues and not as a general FAQ about building Chromium from source. Please try doing your own research on this first.

I'll close this issue as it is not an issue of ungoogled-chromium.

TCH68k commented 1 year ago

I did as you told. I have a successfully built Ungoogled Chromium 115, but with Aura instead of Qt5 and without VAAPI. And when i tried to "deviate", i've ran into these walls. What else do you want from me? I cannot do research, when i have no idea what is what and what should i look for... I can RTFM, but TFM does not tell me why flags which should work fail instead. And on top of that they do it with error messages i do not understand at all; why does a video decoding unit look for encoding functions...?

Should i go to the Chromium Team to ask these questions? I'm sure they will send me to /dev/null if i tell them that i try to build Ungoogled Chromium...

As for the use_sysroot flag, I did set it, i just did not copied the entire flags.gn, only those which i thought are relevant. My bad. Full flags.gn:

build_with_tflite_lib=false
chrome_pgo_phase=0
clang_use_chrome_plugins=false
disable_fieldtrial_testing_config=true
enable_hangout_services_extension=false
enable_mdns=false
enable_mse_mpeg2ts_stream_parser=true
enable_nacl=false
enable_reading_list=false
enable_remoting=false
enable_reporting=false
enable_service_discovery=false
enable_widevine=true
exclude_unwind_tables=true
google_api_key=""
google_default_client_id=""
google_default_client_secret=""
safe_browsing_mode=0
treat_warnings_as_errors=false
use_official_google_api_keys=false
use_unofficial_version_number=false

is_official_build=true
is_chrome_branded=false
is_chrome_for_testing=false
is_chrome_for_testing_branded=false

is_clang=true
is_component_build=false
optimize_webui=true

is_debug=false
symbol_level=0
blink_symbol_level=0
v8_symbol_level=0
v8_enable_backtrace=false
enable_iterator_debugging=false
blink_enable_generated_code_formatting=false

dcheck_always_on=false
is_cfi=false
use_thin_lto=false
angle_build_tests=false
build_dawn_tests=false
build_libsrtp_tests=false
enable_assistant_integration_tests=false
enable_downstream_media_tests=false
enable_nocompile_tests=false
enable_perfetto_integration_tests=false
enable_perfetto_unittests=false
enable_printing_unittests=false
enable_soda_integration_tests=false
force_enable_fieldtrial_testing_config=false
internal_gles2_conform_tests=false
internal_khronos_glcts_tests=false
rtc_include_tests=false
skia_enable_skshaper_tests=false
tint_build_unittests=false
use_base_test_suite=false
use_rts=false

use_gnome_keyring=false
use_pulseaudio=false
link_pulseaudio=false
use_alsa=true
use_cups=true
use_goma=false
use_kerberos=false
use_gio=true
use_sysroot=false
enable_vr=false
use_bluez=true
use_system_libffi=true

enable_ffmpeg_video_decoders=true
media_use_ffmpeg=true
proprietary_codecs=true
ffmpeg_branding="Chrome"
use_webaudio_ffmpeg=true
use_webaudio_pffft=true
enable_av1_decoder=true
enable_libaom=true
enable_dav1d_decoder=true
rtc_include_dav1d_in_internal_decoder_factory=true
use_libgav1_parser=true
use_vaapi=true
use_vaapi_x11=true

ozone_auto_platforms=false
ozone_platform="x11"
ozone_platform_cast=false
ozone_platform_drm=false
ozone_platform_flatland=false
ozone_platform_gbm=false
ozone_platform_headless=false
ozone_platform_scenic=false
ozone_platform_wayland=false
ozone_platform_x11=true
use_ozone=true

use_gtk=false
use_aura=true
use_qt=false
use_qt6=false
moc_qt5_path="/usr/lib/x86_64-linux-gnu/qt5/bin/"
PF4Public commented 1 year ago

I did as you told. I have a successfully built Ungoogled Chromium 115, but with Aura instead of Qt5 and without VAAPI.

You did not. You build with Debian flags first and only then add yours. For example, in order for vaapi to work one only needs use_vaapi=true. What you do is just jumble everything in one place. And yes, use_vaapi=true already present in Debian flag list, so should work from the start. There's no mention of enable_av1_decoder=true in Debian flags, why would you add it? You do random things — you get random results!

You wonder, why did you get aura? Of-course if you ask for it via use_aura=true 🤷🏻

TCH68k commented 1 year ago

If i do not enable use_libgav1_parser, then i'll get this error message:

ERROR at //media/gpu/vaapi/BUILD.gn:36:3: Assertion failed.
  assert(use_libgav1_parser)
  ^-----
See //ui/gl/BUILD.gn:618:7: which caused the file to be included.
      "//media/gpu/vaapi",
      ^------------------

So much for VAAPI only needing use_vaapi... Also, i already have a successfully built Ungoogled Chromium 106 with no AV1 support, half of the internet's videos are not working with it!

As for Aura: i did not set it! You simply did not read the parameter list in the Qt5 topic! This a modified flags.gn, to bypass the error with the parameters which i shown to you in #2421:

use_system_libffi=true

ozone_auto_platforms=false
ozone_platform="x11"
ozone_platform_cast=false
ozone_platform_drm=false
ozone_platform_flatland=false
ozone_platform_gbm=false
ozone_platform_headless=false
ozone_platform_scenic=false
ozone_platform_wayland=false
ozone_platform_x11=true
use_ozone=true

use_gtk=false
use_aura=false
use_qt=true
use_qt6=false
moc_qt5_path="/usr/lib/x86_64-linux-gnu/qt5/bin/"
ERROR at //ui/wm/BUILD.gn:10:1: Assertion failed.
assert(use_aura)
^-----
See //ui/aura/BUILD.gn:245:5: which caused the file to be included.
    "//ui/wm",
    ^--------

See? I did not set Aura, yet it tried to use it and failed. I wanted to bypass this error, to at least get to VAAPI, that's why it is set here, but originally it wasn't, but you simply ignored it.

TCH68k commented 1 year ago

I've removed all the AV1 flags, except for the mentioned use_libgav1_parser, because of the mentioned errors and with these flags:

build_with_tflite_lib=false
chrome_pgo_phase=0
clang_use_chrome_plugins=false
disable_fieldtrial_testing_config=true
enable_hangout_services_extension=false
enable_mdns=false
enable_mse_mpeg2ts_stream_parser=true
enable_nacl=false
enable_reading_list=false
enable_remoting=false
enable_reporting=false
enable_service_discovery=false
enable_widevine=true
exclude_unwind_tables=true
google_api_key=""
google_default_client_id=""
google_default_client_secret=""
safe_browsing_mode=0
treat_warnings_as_errors=false
use_official_google_api_keys=false
use_unofficial_version_number=false

is_official_build=true
is_chrome_branded=false
is_chrome_for_testing=false
is_chrome_for_testing_branded=false

is_clang=true
is_component_build=false
optimize_webui=true

is_debug=false
symbol_level=0
blink_symbol_level=0
v8_symbol_level=0
v8_enable_backtrace=false
enable_iterator_debugging=false
blink_enable_generated_code_formatting=false

dcheck_always_on=false
is_cfi=false
use_thin_lto=false
angle_build_tests=false
build_dawn_tests=false
build_libsrtp_tests=false
enable_assistant_integration_tests=false
enable_downstream_media_tests=false
enable_nocompile_tests=false
enable_perfetto_integration_tests=false
enable_perfetto_unittests=false
enable_printing_unittests=false
enable_soda_integration_tests=false
force_enable_fieldtrial_testing_config=false
internal_gles2_conform_tests=false
internal_khronos_glcts_tests=false
rtc_include_tests=false
skia_enable_skshaper_tests=false
tint_build_unittests=false
use_base_test_suite=false
use_rts=false

use_gnome_keyring=false
use_pulseaudio=false
link_pulseaudio=false
use_alsa=true
use_cups=true
use_goma=false
use_kerberos=false
use_gio=true
use_sysroot=false
enable_vr=false
use_bluez=true
use_system_libffi=true

enable_ffmpeg_video_decoders=true
media_use_ffmpeg=true
proprietary_codecs=true
ffmpeg_branding="Chrome"
use_webaudio_ffmpeg=true
use_webaudio_pffft=false
enable_av1_decoder=false
enable_libaom=false
enable_dav1d_decoder=false
rtc_include_dav1d_in_internal_decoder_factory=false
use_libgav1_parser=true
use_vaapi=true
use_vaapi_x11=true

ozone_auto_platforms=false
ozone_platform="x11"
ozone_platform_cast=false
ozone_platform_drm=false
ozone_platform_flatland=false
ozone_platform_gbm=false
ozone_platform_headless=false
ozone_platform_scenic=false
ozone_platform_wayland=false
ozone_platform_x11=true
use_ozone=true

use_gtk=false
use_aura=true
use_qt=false
use_qt6=false
moc_qt5_path="/usr/lib/x86_64-linux-gnu/qt5/bin/"

it failed with these errror messages:

In file included from ../../media/gpu/vaapi/av1_vaapi_video_encoder_delegate.cc:5:
../../media/gpu/vaapi/av1_vaapi_video_encoder_delegate.h:91:25: error: unknown type name 'VAEncPictureParameterBufferAV1'; did you mean 'VADecPictureParameterBufferAV1'?
  bool FillPictureParam(VAEncPictureParameterBufferAV1& pic_param,
                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                        VADecPictureParameterBufferAV1
/usr/include/va/va_dec_av1.h:612:3: note: 'VADecPictureParameterBufferAV1' declared here
} VADecPictureParameterBufferAV1;
  ^
In file included from ../../media/gpu/vaapi/av1_vaapi_video_encoder_delegate.cc:5:
../../media/gpu/vaapi/av1_vaapi_video_encoder_delegate.h:94:29: error: unknown type name 'VAEncPictureParameterBufferAV1'; did you mean 'VADecPictureParameterBufferAV1'?
  bool SubmitFrameOBU(const VAEncPictureParameterBufferAV1& pic_param,
                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                            VADecPictureParameterBufferAV1
/usr/include/va/va_dec_av1.h:612:3: note: 'VADecPictureParameterBufferAV1' declared here
} VADecPictureParameterBufferAV1;
  ^
In file included from ../../media/gpu/vaapi/av1_vaapi_video_encoder_delegate.cc:5:
../../media/gpu/vaapi/av1_vaapi_video_encoder_delegate.h:97:13: error: unknown type name 'VAEncPictureParameterBufferAV1'; did you mean 'VADecPictureParameterBufferAV1'?
      const VAEncPictureParameterBufferAV1& pic_param,
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
            VADecPictureParameterBufferAV1
/usr/include/va/va_dec_av1.h:612:3: note: 'VADecPictureParameterBufferAV1' declared here
} VADecPictureParameterBufferAV1;
  ^
In file included from ../../media/gpu/vaapi/av1_vaapi_video_encoder_delegate.cc:5:
../../media/gpu/vaapi/av1_vaapi_video_encoder_delegate.h:99:27: error: unknown type name 'VAEncPictureParameterBufferAV1'; did you mean 'VADecPictureParameterBufferAV1'?
  bool SubmitPictureParam(VAEncPictureParameterBufferAV1& pic_param,
                          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                          VADecPictureParameterBufferAV1
/usr/include/va/va_dec_av1.h:612:3: note: 'VADecPictureParameterBufferAV1' declared here
} VADecPictureParameterBufferAV1;
  ^
In file included from ../../media/gpu/vaapi/av1_vaapi_video_encoder_delegate.cc:5:
../../media/gpu/vaapi/av1_vaapi_video_encoder_delegate.h:112:3: error: unknown type name 'VAEncSequenceParameterBufferAV1'
  VAEncSequenceParameterBufferAV1 seq_param_;
  ^
../../media/gpu/vaapi/av1_vaapi_video_encoder_delegate.cc:368:34: error: cannot initialize object parameter of type 'media::VaapiVideoEncoderDelegate' with an expression of type 'media::AV1VaapiVideoEncoderDelegate'
      VaapiVideoEncoderDelegate::GetMetadata(encode_job, payload_size);
                                 ^~~~~~~~~~~
../../media/gpu/vaapi/av1_vaapi_video_encoder_delegate.cc:463:33: error: use of undeclared identifier 'VAEncSequenceParameterBufferAV1'
  memset(&seq_param_, 0, sizeof(VAEncSequenceParameterBufferAV1));
                                ^
../../media/gpu/vaapi/av1_vaapi_video_encoder_delegate.cc:502:46: error: use of undeclared identifier 'VAEncSequenceParameterBufferAV1'
                                      sizeof(VAEncSequenceParameterBufferAV1),
                                             ^
../../media/gpu/vaapi/av1_vaapi_video_encoder_delegate.cc:590:3: error: unknown type name 'VAEncPictureParameterBufferAV1'; did you mean 'VADecPictureParameterBufferAV1'?
  VAEncPictureParameterBufferAV1 pic_param{};
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  VADecPictureParameterBufferAV1
/usr/include/va/va_dec_av1.h:612:3: note: 'VADecPictureParameterBufferAV1' declared here
} VADecPictureParameterBufferAV1;
  ^
../../media/gpu/vaapi/av1_vaapi_video_encoder_delegate.cc:616:5: error: use of undeclared identifier 'VAEncPictureParameterBufferAV1'; did you mean 'VAEncPictureParameterBufferType'?
    VAEncPictureParameterBufferAV1& pic_param,
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    VAEncPictureParameterBufferType
/usr/include/va/va.h:1803:5: note: 'VAEncPictureParameterBufferType' declared here
    VAEncPictureParameterBufferType     = 23,
    ^
../../media/gpu/vaapi/av1_vaapi_video_encoder_delegate.cc:615:36: error: redefinition of 'FillPictureParam' as different kind of symbol
bool AV1VaapiVideoEncoderDelegate::FillPictureParam(
                                   ^
../../media/gpu/vaapi/av1_vaapi_video_encoder_delegate.h:91:8: note: previous definition is here
  bool FillPictureParam(VAEncPictureParameterBufferAV1& pic_param,
       ^
../../media/gpu/vaapi/av1_vaapi_video_encoder_delegate.cc:617:5: error: expected expression
    const EncodeJob& job,
    ^
../../media/gpu/vaapi/av1_vaapi_video_encoder_delegate.cc:618:5: error: expected expression
    const AV1Picture& pic) const {
    ^
../../media/gpu/vaapi/av1_vaapi_video_encoder_delegate.cc:616:37: error: use of undeclared identifier 'pic_param'
    VAEncPictureParameterBufferAV1& pic_param,
                                    ^
../../media/gpu/vaapi/av1_vaapi_video_encoder_delegate.cc:618:27: error: expected ';' after top level declarator
    const AV1Picture& pic) const {
                          ^
                          ;
../../media/gpu/vaapi/av1_vaapi_video_encoder_delegate.cc:618:34: error: expected unqualified-id
    const AV1Picture& pic) const {
                                 ^
../../media/gpu/vaapi/av1_vaapi_video_encoder_delegate.cc:800:11: error: unknown type name 'VAEncPictureParameterBufferAV1'; did you mean 'VADecPictureParameterBufferAV1'?
    const VAEncPictureParameterBufferAV1& pic_param,
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          VADecPictureParameterBufferAV1
/usr/include/va/va_dec_av1.h:612:3: note: 'VADecPictureParameterBufferAV1' declared here
} VADecPictureParameterBufferAV1;
  ^
../../media/gpu/vaapi/av1_vaapi_video_encoder_delegate.cc:832:11: error: unknown type name 'VAEncPictureParameterBufferAV1'; did you mean 'VADecPictureParameterBufferAV1'?
    const VAEncPictureParameterBufferAV1& pic_param,
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          VADecPictureParameterBufferAV1
/usr/include/va/va_dec_av1.h:612:3: note: 'VADecPictureParameterBufferAV1' declared here
} VADecPictureParameterBufferAV1;
  ^
../../media/gpu/vaapi/av1_vaapi_video_encoder_delegate.cc:836:49: error: no member named 'picture_flags' in '_VADecPictureParameterBufferAV1'
      static_cast<libgav1::FrameType>(pic_param.picture_flags.bits.frame_type);
                                      ~~~~~~~~~ ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.

So, for me, it very much seems that for VAAPI, AV1 is a musthave, but it cannot build with AV1. I also had to disable use_webaudio_pffft, because with it, it died with these error messages:

../../third_party/blink/renderer/platform/audio/pffft/fft_frame_pffft.cc:26:11: error: no member named 'FFTSetup' in 'blink::FFTFrame'
FFTFrame::FFTSetup::FFTSetup(unsigned fft_size) {
~~~~~~~~~~^
../../third_party/blink/renderer/platform/audio/pffft/fft_frame_pffft.cc:36:11: error: no member named 'FFTSetup' in 'blink::FFTFrame'
FFTFrame::FFTSetup::~FFTSetup() {
~~~~~~~~~~^
../../third_party/blink/renderer/platform/audio/pffft/fft_frame_pffft.cc:42:45: error: no member named 'FFTSetup' in 'blink::FFTFrame'
HashMap<unsigned, std::unique_ptr<FFTFrame::FFTSetup>>& FFTFrame::FFTSetups() {
                                  ~~~~~~~~~~^
../../third_party/blink/renderer/platform/audio/pffft/fft_frame_pffft.cc:50:45: error: use of undeclared identifier 'FFTSetup'
  typedef HashMap<unsigned, std::unique_ptr<FFTSetup>> FFTHashMap_t;
                                            ^
../../third_party/blink/renderer/platform/audio/pffft/fft_frame_pffft.cc:77:58: error: member reference base type 'FFTHashMap_t' (aka 'int') is not a structure or union
          if (size <= kMaxConvolverFFTSize && !fft_setups.Contains(size)) {
                                               ~~~~~~~~~~^~~~~~~~~
../../third_party/blink/renderer/platform/audio/pffft/fft_frame_pffft.cc:78:23: error: member reference base type 'FFTHashMap_t' (aka 'int') is not a structure or union
            fft_setups.insert(size, nullptr);
            ~~~~~~~~~~^~~~~~~
../../third_party/blink/renderer/platform/audio/pffft/fft_frame_pffft.cc:85:25: error: member reference base type 'FFTHashMap_t' (aka 'int') is not a structure or union
    DCHECK_EQ(fft_setups.size(), 87u);
              ~~~~~~~~~~^~~~~
../../base/check_op.h:219:49: note: expanded from macro 'DCHECK_EQ'
#define DCHECK_EQ(val1, val2) DCHECK_OP(EQ, ==, val1, val2)
                                                ^~~~
../../base/check_op.h:213:55: note: expanded from macro 'DCHECK_OP'
  EAT_CHECK_STREAM_PARAMS((::logging::CheckOpValueStr(val1), \
                                                      ^~~~
../../base/check.h:58:35: note: expanded from macro 'EAT_CHECK_STREAM_PARAMS'
       : ::logging::VoidifyStream(expr) & (*::logging::g_swallow_stream)
                                  ^~~~
../../third_party/blink/renderer/platform/audio/pffft/fft_frame_pffft.cc:85:25: error: member reference base type 'FFTHashMap_t' (aka 'int') is not a structure or union
    DCHECK_EQ(fft_setups.size(), 87u);
              ~~~~~~~~~~^~~~~
../../base/check_op.h:219:49: note: expanded from macro 'DCHECK_EQ'
#define DCHECK_EQ(val1, val2) DCHECK_OP(EQ, ==, val1, val2)
                                                ^~~~
../../base/check_op.h:214:63: note: expanded from macro 'DCHECK_OP'
                           ::logging::CheckOpValueStr(val2), (val1)op(val2)))
                                                              ^~~~
../../base/check.h:58:35: note: expanded from macro 'EAT_CHECK_STREAM_PARAMS'
       : ::logging::VoidifyStream(expr) & (*::logging::g_swallow_stream)
                                  ^~~~
../../third_party/blink/renderer/platform/audio/pffft/fft_frame_pffft.cc:91:16: error: out-of-line definition of 'InitializeFFTSetupForSize' does not match any declaration in 'blink::FFTFrame'
void FFTFrame::InitializeFFTSetupForSize(wtf_size_t fft_size) {
               ^~~~~~~~~~~~~~~~~~~~~~~~~
../../third_party/blink/renderer/platform/audio/pffft/fft_frame_pffft.cc:104:38: error: use of undeclared identifier 'FFTSetup'
    auto fft_data = std::make_unique<FFTSetup>(fft_size);
                                     ^
../../third_party/blink/renderer/platform/audio/pffft/fft_frame_pffft.cc:110:24: error: out-of-line definition of 'FFTSetupForSize' does not match any declaration in 'blink::FFTFrame'
PFFFT_Setup* FFTFrame::FFTSetupForSize(wtf_size_t fft_size) {
                       ^~~~~~~~~~~~~~~
../../third_party/blink/renderer/platform/audio/pffft/fft_frame_pffft.cc:125:7: error: member initializer 'pffft_work_' does not name a non-static data member or base class
      pffft_work_(fft_size) {
      ^~~~~~~~~~~~~~~~~~~~~
../../third_party/blink/renderer/platform/audio/pffft/fft_frame_pffft.cc:142:7: error: member initializer 'pffft_work_' does not name a non-static data member or base class
      pffft_work_(frame.fft_size_) {
      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../third_party/blink/renderer/platform/audio/pffft/fft_frame_pffft.cc:164:3: error: call to non-static member function without an object argument
  FFTSetups();
  ^~~~~~~~~
../../third_party/blink/renderer/platform/audio/pffft/fft_frame_pffft.cc:178:3: error: call to non-static member function without an object argument
  InitializeFFTSetupForSize(hrtf_fft_size);
  ^~~~~~~~~~~~~~~~~~~~~~~~~
../../third_party/blink/renderer/platform/audio/pffft/fft_frame_pffft.cc:179:3: error: call to non-static member function without an object argument
  InitializeFFTSetupForSize(hrtf_fft_size / 2);
  ^~~~~~~~~~~~~~~~~~~~~~~~~
../../third_party/blink/renderer/platform/audio/pffft/fft_frame_pffft.cc:183:22: error: call to non-static member function without an object argument
  for (auto& setup : FFTSetups()) {
                     ^~~~~~~~~
../../third_party/blink/renderer/platform/audio/pffft/fft_frame_pffft.cc:192:13: error: use of undeclared identifier 'pffft_work_'
  DCHECK_EQ(pffft_work_.size(), fft_size_);
            ^
../../third_party/blink/renderer/platform/audio/pffft/fft_frame_pffft.cc:192:13: error: use of undeclared identifier 'pffft_work_'
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
PF4Public commented 1 year ago

Full flags.gn:

I see neither custom_toolchain nor host_toolchain

TCH68k commented 1 year ago

According to this doc: http://oscomp.hu/depot/chromium_gn_flags.txt

host_toolchain
    Current value (from the default) = ""
      From //build/config/BUILDCONFIG.gn:151

    This should not normally be set as a build argument.  It's here so that
    every toolchain can pass through the "global" value via toolchain_args().
custom_toolchain
    Current value (from the default) = ""
      From //build/config/BUILDCONFIG.gn:147

    Allows the path to a custom target toolchain to be injected as a single
    argument, and set as the default toolchain.

host_toolchain is not needed by default, and since the target is not a different platform, but the building machine itself (Linux/x86_64), custom_toolchain is not needed here.

Did i miss something?

PF4Public commented 1 year ago

Did i miss something?

Yes, twice:

you should start with Debian repository as a starting point and deviate from there after successful build

You did not. You build with Debian flags first and only then add yours.

If The Fine Manual does not help, one simply returns to a good known working combination of flags and tries again. Why is it so difficult to just copy those flags verbatim?

TCH68k commented 1 year ago

What do you think, from where did i copy my flags in the first place? Out of my head? I've copied the Debian ones. And i have several successful builds. 72, 73, 83, 106 and 115. Don't you understand? I have a good known working combination, but it lacks VAAPI, AV1 and a Qt5 surface and i would like to have VAAPI and AV1 support and a Qt5 surface. (Or, if there is a solution which allows me to configure Aura's colour scheme more in details, not just a theme selector with two colors, then Aura is OK too. Anything is acceptable for me, except GTK3.) I am at the "deviation" part, but none of the "deviations" are working.

So, why are these toolchain options needed?

PF4Public commented 1 year ago

You may need this fix for building with vaapi.

I'm not familiar with building on Debian and therefore cannot tell you why it may be so complicated compared to my experience on Gentoo. :(

TCH68k commented 1 year ago

Thanks. Now, that helped. Not on solving the problem, but on finding out what the problem really is.

The errors are the same as before, but now, that i knew where to look i've figured out that not va/va_dec_av1.h, but va/va_enc_av1.h would be needed: http://evelikov.github.io/libva/structVAEncPictureParameterBufferAV1.html And here comes the funny part: that file is not available on Debian 11, because libvaapi-dev is only 2.10 and does not contains it. So neither Chromium 115, nor 116 are compilable on Debian 11, with VAAPI (yes, i already tried both), as VAAPI demands use_libgav1_parser, which causes this error. (Which is still beyond me...why on Earth a video acceleration subsystem would require video encoding functions? I understand why it does need video decoding functions. I even understand why the browser needs video encoding functions in the world of web-cameras...but that does not needed to be video accelerated! Inconceivable...) So, i either upgrade to Debian 12 (which i really do not want to do right now, considering what things i've heard about it), or risk a system-level package-ecosystem screwup, by forcefully upgrading libvaapi from source, or i start trying to build Chromium versions and see where and when this has broke. And i think i'll do that. Slowest, but safest.

106.0.5249.119 was successfully built here before, so i'll try to rebuild that with VAAPI. If it works, i'll try incrementing versions until i run into this problem. It will be so much fun, as it takes nearly 8 hours to build Ungoogled Chromium from scratch. And also the .git and third_party directories eat up up to 70 GB, so i have to keep this much free space on the disk... But if i get to build at least UGC 108, then i won, as UGC 108 introduced the Qt5 support. (But if there is really no other way, i'll go with Aura and try to "hack" the color scheme. Anything but GTK3 and anything to get rid of GTK3...)

TCH68k commented 1 year ago

Hit, sunk! I write this in Ungoogled Chromium 106 with Aura and with VAAPI and AV1 support! I told you, that it was not my fault, that it did not compiled, that the VAAPI support has issues: it seems to be, that Ungoogled Chromium 115 and 116 are really uncompilable on Debian 11, if you want VAAPI support. I am not sure when this gone broken, but 106 is compilable.

Caveat: After you've applied the patches from https://github.com/ungoogled-software/ungoogled-chromium-portablelinux too, the configuring will fail with these error messages:

ERROR at //build/config/compiler/BUILD.gn:1305:22: Script returned non-zero exit code.
    clang_revision = exec_script("//tools/clang/scripts/update.py",
                     ^----------
Current dir: /root/kocsog_gugli/chromium/src/out/Release/
Command: python3 /root/kocsog_gugli/chromium/src/tools/clang/scripts/update.py --print-revision --verify-version=16.0.0
Returned 1.
stderr:

  File "/root/kocsog_gugli/chromium/src/tools/clang/scripts/update.py", line 372
    global LLVM_BUILD_DIR, STAMP_FILE
    ^
SyntaxError: name 'STAMP_FILE' is used prior to global declaration

See //build/config/BUILDCONFIG.gn:337:3: which caused the file to be included.
  "//build/config/compiler:default_init_stack_vars",
  ^------------------------------------------------
ninja: Entering directory `out/Release'
ninja: error: loading 'build.ninja': No such file or directory

but there is a solution: before configuring, run this command in chromium/src/tools/clang/scripts/: mv update.py.orig update.py

Then it'll compile uneventfully.

Now, i'll try 108 with the same setup. If it works, i'll try to compile it with Qt5.

TCH68k commented 1 year ago

108 had successfully built with Aura and with VAAPI+AV1. The total build time was 7:14:06, so this gonna take a lot of time...

I could spare a lot of time, if i would not have to re-download, re-sync, re-patch and re-build everything every time, but unfortunately, to even be able to build, i have to delete the .git directory which takes up several dozens of GB-s. Which means no way to simply change branch, patch, configure and build only what is needed to be built.

Off to build 108 with Qt5.

PF4Public commented 1 year ago

Instead of brute-forcing you could try browsing the blame/history overview of files in question.

For example media/gpu/vaapi/av1_vaapi_video_encoder_delegate.cc has VAEncPictureParameterBufferAV1 from the start at fddc0ba. After opening this commit on github https://github.com/chromium/chromium/commit/fddc0ba5fcad7675c655f815976810d7842e13b0 one could infer that this change was merged no earlier than 114.0.5700.0

Have you considered moving off of Debian to another Linux distribution? Debian is very conservative, hence your troubles. Give another distribution a try.

TCH68k commented 1 year ago

Thanks for the info. (I am not familiar with Git/github functions.) Now, at least i know that with Aura, i can go up to 113. However, with Qt5 it is different. I've posted the config in #2421 which compiles flawlessly, with the UI parameters changed to for Qt5 and it is still tries to build with Aura.

I am "very conservative" too. (No, i am not, it's just newer software is continously getting worse most of the time...) But with web2 (sic!), you cannot be "conservative"; the web almost entirely became latest-Chrome-only.

TCH68k commented 1 year ago

I tried to compile 113 with GTK3, where at least i will have dialogs, but now - even with GTK3 - it fails after configuration:

ERROR at //ui/wm/BUILD.gn:9:1: Assertion failed.
assert(use_aura)
^-----
See //ui/aura/BUILD.gn:244:5: which caused the file to be included.
    "//ui/wm",
    ^--------
ninja: Entering directory `out/Release'
ninja: error: loading 'build.ninja': No such file or directory

Why? What pulls Aura in regardless what toolkit i chose?

TCH68k commented 1 year ago

Debian (and Devuan) backport contains VAAPI 2.17, so i've managed to upgrade to Chromium 116.