PF4Public / gentoo-overlay

Personal Gentoo overlay
79 stars 19 forks source link

www-client/ungoogled-chromium-114.0.5735.106_p1: ERROR Unresolved dependencies. (libaom) #232

Closed fordfrog closed 1 year ago

fordfrog commented 1 year ago

i unmasked clang-17 to be able to compile ungoogled-chromium-114, ater patches are applied, i get an error about unresolved dependencies. iirc libaom worked fine with 113 but now there is an issue:

 * Using python3.11 to build (via EPYTHON)
 * Enforcing the use of clang due to USE=clang ...
 * Building with the following compiler settings:
 *   CC = "x86_64-pc-linux-gnu-clang"
 *   CXX = "x86_64-pc-linux-gnu-clang++"
 *   AR = "llvm-ar"
 *   NM = "llvm-nm"
 *   RANLIB = ""
 *   CFLAGS = "-march=native -pipe -frecord-gcc-switches -ggdb -Wno-unknown-warning-option -Wno-builtin-macro-redefined"
 *   CXXFLAGS = "-march=native -pipe -frecord-gcc-switches -ggdb -Wno-unknown-warning-option -Wno-builtin-macro-redefined"
 *   CPPFLAGS = " -D__DATE__= -D__TIME__= -D__TIMESTAMP__="
 *   LDFLAGS = "-Wl,--as-needed -Wl,--thinlto-jobs=17"
 *   EXTRA_GN = ""
 *   UGC_SKIP_PATCHES = ""
 *   UGC_SKIP_SUBSTITUTION = ""
 *   UGC_KEEP_BINARIES = ""
 * Configuring Chromium...
gn gen --args= is_clang=true clang_use_chrome_plugins=false use_lld=true custom_toolchain="//build/toolchain/linux/unbundle:default" host_toolchain="//build/toolchain/linux/unbundle:default" enable_rust=false is_debug=false dcheck_always_on=false dcheck_is_configurable=false enable_nacl=false use_system_libpng=true use_system_harfbuzz=true use_gnome_keyring=false enable_hangout_services_extension=false enable_widevine=true use_cups=true use_kerberos=false use_pulseaudio=true use_vaapi=true rtc_use_pipewire=false gtk_version=3 disable_fieldtrial_testing_config=true is_cfi=false chrome_pgo_phase=2 optimize_webui=true use_system_freetype=true use_system_libopenjpeg2=true enable_pdf=true use_system_lcms2=true enable_print_preview=true enable_platform_hevc=true enable_hevc_parser_and_hw_decoder=true enable_mdns=false enable_mse_mpeg2ts_stream_parser=true enable_reading_list=false enable_remoting=false enable_reporting=false enable_service_discovery=false exclude_unwind_tables=true use_official_google_api_keys=false google_api_key="" google_default_client_id="" google_default_client_secret="" safe_browsing_mode=0 use_unofficial_version_number=false blink_symbol_level=0 symbol_level=0 enable_iterator_debugging=false enable_swiftshader=false build_with_tflite_lib=false perfetto_use_system_zlib=true use_system_zlib=true use_system_libjpeg=true rtc_build_examples=false use_gold=false use_sysroot=false use_custom_libcxx=false enable_pseudolocales=false blink_enable_generated_code_formatting=false proprietary_codecs=true ffmpeg_branding="Chrome" target_cpu="x64" treat_warnings_as_errors=false fatal_linker_warnings=false v8_use_libm_trig_functions=true icu_use_data_file=false use_ozone=true ozone_auto_platforms=false ozone_platform_headless=true use_system_libdrm=true use_system_minigbm=true use_xkbcommon=true use_qt=true ozone_platform_x11=true ozone_platform_wayland=false ozone_platform="x11" is_official_build=true use_thin_lto=true thin_lto_enable_optimizations=true symbol_level=0  out/Release
ERROR Unresolved dependencies.
//media/gpu:common(//build/toolchain/linux/unbundle:default)
  needs //third_party/libaom:libaomrc(//build/toolchain/linux/unbundle:default)
//media/gpu/vaapi:vaapi(//build/toolchain/linux/unbundle:default)
  needs //third_party/libaom:libaomrc(//build/toolchain/linux/unbundle:default)

[ebuild     U #] www-client/ungoogled-chromium-114.0.5735.106_p1::pf4public [113.0.5672.92_p1::pf4public] USE="X clang convert-dict cups hevc nvidia official optimize-thinlto optimize-webui pgo proprietary-codecs pulseaudio qt5 system-av1 system-brotli system-crc32c system-double-conversion system-ffmpeg system-harfbuzz system-icu system-jsoncpp system-libevent system-libusb system-openh264 system-openjpeg system-png system-re2 system-snappy system-woff2 thinlto vaapi widevine -cfi -custom-cflags -debug -enable-driver -gtk4 -hangouts -headless -kerberos -pax-kernel -pic -screencast (-selinux) -suid -system-abseil-cpp -system-libvpx -wayland" L10N="cs -af -am -ar -bg -bn -ca -da -de -el -en-GB -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" 0 KiB

# equery list libaom
 * Searching for libaom ...
[IP-] [  ] media-libs/libaom-9999:0/3
PF4Public commented 1 year ago

I've pushed 36188e46d03cf6b202bfbedf847c380dfe942819 that should address this issue. Try building and report back if the build finishes and the result is functional. I suspect there might be other issues when building or running.

fordfrog commented 1 year ago

the configuration passed now, but compilation failed:

FAILED: obj/media/gpu/common/video_rate_control.o 
x86_64-pc-linux-gnu-clang++ -MMD -MF obj/media/gpu/common/video_rate_control.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_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -DNO_UNWIND_TABLES -D_GNU_SOURCE -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 -DUSE_EGL -DVK_USE_PLATFORM_XCB_KHR -DLIBYUV_DISABLE_NEON -DLIBGAV1_MAX_BITDEPTH=10 -DLIBGAV1_THREADPOOL_USE_STD_MUTEX -DLIBGAV1_ENABLE_LOGGING=0 -DLIBGAV1_PUBLIC= -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_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 -DUSING_SYSTEM_ICU=1 -DICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_STATIC -DU_IMPORT=U_EXPORT -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 -DUSE_SYSTEM_ZLIB=1 -I../.. -Igen -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 -Igen/shim_headers/zlib_shim -Igen/shim_headers/jsoncpp_shim -Igen/shim_headers/double_conversion_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 -Igen/shim_headers/brotli_shim -Igen/shim_headers/libXNVCtrl_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 -Igen/shim_headers/re2_shim -I../../third_party/libyuv/include -Igen/shim_headers/ffmpeg_shim -Igen/shim_headers/flac_shim -Igen/shim_headers/opus_shim -Igen/shim_headers/crc32c_shim -Igen/shim_headers/snappy_shim -Igen/shim_headers/aom_shim -Igen/shim_headers/openh264_shim -Igen/shim_headers/dav1d_shim -I../../third_party/libgav1/src -I../../third_party/libgav1/src/src -I../../third_party/abseil-cpp -I../../third_party/boringssl/src/include -I../../third_party/protobuf/src -Igen/protoc_out -I../../third_party/libwebm/source -I../../third_party/skia -I../../third_party/wuffs/src/release/c -I../../third_party/vulkan/include -I../../third_party/mesa_headers -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 -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 -flto=thin -fsplit-lto-unit -fwhole-program-vtables -no-canonical-prefixes -ftrivial-auto-var-init=pattern -O2 -fdata-sections -ffunction-sections -fno-unique-section-names -fno-omit-frame-pointer -g0 -fprofile-use=../../chrome/build/pgo_profiles/chrome-linux-5735-1685113972-6d147d8b86f0b3738d3578feacebd344e1e0402a.profdata -Wno-profile-instr-unprofiled -Wno-profile-instr-out-of-date -Wno-backend-plugin -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/lib64/glib-2.0/include -I/usr/lib64/libffi/include -Wno-redundant-parens -DPROTOBUF_ALLOW_DEPRECATED=1 -Wno-redundant-parens -std=c++20 -Wno-trigraphs -gsimple-template-names -fno-exceptions -fno-rtti -fvisibility-inlines-hidden  -D__DATE__= -D__TIME__= -D__TIMESTAMP__= -march=native -pipe -frecord-gcc-switches -ggdb -Wno-unknown-warning-option -Wno-builtin-macro-redefined -c ../../media/gpu/video_rate_control.cc -o obj/media/gpu/common/video_rate_control.o
../../media/gpu/video_rate_control.cc:7:10: fatal error: 'third_party/libaom/source/libaom/av1/ratectrl_rtc.h' file not found
    7 | #include "third_party/libaom/source/libaom/av1/ratectrl_rtc.h"
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
fordfrog commented 1 year ago

also, do we really need clang-17? i just checked chromium-115 ebuild and it needs at least clang-16, not 17.

PF4Public commented 1 year ago

Apparently they've implemented a RateControl-thingie similarly to vpx. This needs some internal functions which are not provided by libraries as such this resolves vaapi incompatible with system-av1 and system-libvpx. Chromium uses RateControl only in encoder, so it could be theoretically possible to disable only the encoder and get rid of RateControl, which should make vaapi again compatible with system-av1 and system-libvpx, but this looks to fragile to me. Another possibility would be to revert all RateControl code, but it is way to interconnected to cause even more trouble. So I'm making vaapi incompatible with system-av1 and system-libvpx and call it a day.

also, do we really need clang-17?

image

:)

mortezadadgar commented 1 year ago

emerging with system-av1 (not vaapi) complains about missing ratectrl_rtc.h

mortezadadgar commented 1 year ago

similar error with system-libvpx

../../media/gpu/video_rate_control.cc:8:10: fatal error: 'third_party/libvpx/source/libvpx/vp8/vp8_ratectrl_rtc.h' file not found
#include "third_party/libvpx/source/libvpx/vp8/vp8_ratectrl_rtc.h"
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
PF4Public commented 1 year ago

@mortezadadgar You have enabled vaapi