ungoogled-software / ungoogled-chromium

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

Update to Chromium 129.0.6668.58 #3029

Closed Ahrotahn closed 2 months ago

Ahrotahn commented 2 months ago

This PR updates to Chromium 129.0.6668.58.

Notes:


Change log Blog post

clickot commented 2 months ago

portable linux builds fine and runs at least on Manjaro, Ubuntu 20.04/24.04 and Fedora WS 40

clickot commented 2 months ago

portable linux builds also fine for .58

tpearson-ssc commented 2 months ago

Getting a build failure when overlaid on the Debian builds:

../../chrome/browser/ui/lens/lens_overlay_controller.cc:1110:9: error: no member named 'ThreadPool' in namespace 'base'
 1110 |   base::ThreadPool::PostTaskAndReplyWithResult(
      |   ~~~~~~^
2 warnings and 1 error generated.
Cubik65536 commented 2 months ago

I'm getting the following error when building on macOS arm64:

[740/63782] LINK ./protoc-gen-js
FAILED: protoc-gen-js protoc-gen-js.dSYM/Contents/Info.plist protoc-gen-js.dSYM/Contents/Resources/DWARF/protoc-gen-js
TOOL_VERSION=1726610393 ../../build/toolchain/apple/linker_driver.py -Wcrl,driver,../../third_party/llvm-build/Release+Asserts/bin/clang++ -Wcrl,strippath,/Applications/Xcode-16.0.0-Beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/strip -Wcrl,installnametoolpath,../../third_party/llvm-build/Release+Asserts/bin/llvm-install-name-tool  -Wcrl,dsym,. -Wcrl,dsymutilpath,/usr/bin/dsymutil  -fuse-ld=lld -Wl,--icf=all -Wl,--color-diagnostics -Wl,-mllvm,-instcombine-lower-dbg-declare=0 -Wl,-mllvm,-split-threshold-for-reg-with-hint=0 -Wl,-cache_path_lto,thinlto-cache -Wl,--thinlto-cache-policy=cache_size=10\%:cache_size_bytes=40g:cache_size_files=100000 -flto=thin -Wl,--thinlto-jobs=all -Wl,-mllvm,-import-instr-limit=30 -Wcrl,object_path_lto -Wl,-mllvm,-disable-auto-upgrade-debug-info -Wl,-mllvm,-inlinehint-threshold=360 -fwhole-program-vtables -Wl,--strict-auto-link -Wl,--no-call-graph-profile-sort --target=arm64-apple-macos -Wl,-mllvm,-enable-machine-outliner=never -no-canonical-prefixes -Wl,-dead_strip -Wl,-no_data_in_code_info -Wl,-no_function_starts -nostdlib++ -isysroot ../../../../../../../Applications/Xcode-16.0.0-Beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.0.sdk -mmacos-version-min=11.0 -Wl,--lto-O0 -Wl,-ObjC -Wcrl,strip,-x,-S -Wl,--no-warn-duplicate-rpath -Wl,-no_warn_duplicate_libraries -o "./protoc-gen-js" "@./protoc-gen-js.rsp"
ld64.lld: error: unknown argument '--no-warn-duplicate-rpath'
ld64.lld: error: unknown argument '-no_warn_duplicate_libraries'
clang++: error: linker command failed with exit code 1 (use -v to see invocation)
tpearson-ssc commented 2 months ago

Getting a build failure when overlaid on the Debian builds:

Looks like this patch fixes it, no other compilation failures:

--- chrome/browser/ui/lens/lens_overlay_controller.cc
+++ chrome/browser/ui/lens/lens_overlay_controller.cc
@@ -9,6 +9,7 @@
 #include "base/metrics/histogram_functions.h"
 #include "base/no_destructor.h"
 #include "base/system/sys_info.h"
+#include "base/task/thread_pool.h"
 #include "base/task/bind_post_task.h"
 #include "base/task/sequenced_task_runner.h"
 #include "chrome/browser/feedback/show_feedback_page.h"
Cubik65536 commented 2 months ago

I'm getting the following error when building on macOS arm64:

[740/63782] LINK ./protoc-gen-js
FAILED: protoc-gen-js protoc-gen-js.dSYM/Contents/Info.plist protoc-gen-js.dSYM/Contents/Resources/DWARF/protoc-gen-js
TOOL_VERSION=1726610393 ../../build/toolchain/apple/linker_driver.py -Wcrl,driver,../../third_party/llvm-build/Release+Asserts/bin/clang++ -Wcrl,strippath,/Applications/Xcode-16.0.0-Beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/strip -Wcrl,installnametoolpath,../../third_party/llvm-build/Release+Asserts/bin/llvm-install-name-tool  -Wcrl,dsym,. -Wcrl,dsymutilpath,/usr/bin/dsymutil  -fuse-ld=lld -Wl,--icf=all -Wl,--color-diagnostics -Wl,-mllvm,-instcombine-lower-dbg-declare=0 -Wl,-mllvm,-split-threshold-for-reg-with-hint=0 -Wl,-cache_path_lto,thinlto-cache -Wl,--thinlto-cache-policy=cache_size=10\%:cache_size_bytes=40g:cache_size_files=100000 -flto=thin -Wl,--thinlto-jobs=all -Wl,-mllvm,-import-instr-limit=30 -Wcrl,object_path_lto -Wl,-mllvm,-disable-auto-upgrade-debug-info -Wl,-mllvm,-inlinehint-threshold=360 -fwhole-program-vtables -Wl,--strict-auto-link -Wl,--no-call-graph-profile-sort --target=arm64-apple-macos -Wl,-mllvm,-enable-machine-outliner=never -no-canonical-prefixes -Wl,-dead_strip -Wl,-no_data_in_code_info -Wl,-no_function_starts -nostdlib++ -isysroot ../../../../../../../Applications/Xcode-16.0.0-Beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.0.sdk -mmacos-version-min=11.0 -Wl,--lto-O0 -Wl,-ObjC -Wcrl,strip,-x,-S -Wl,--no-warn-duplicate-rpath -Wl,-no_warn_duplicate_libraries -o "./protoc-gen-js" "@./protoc-gen-js.rsp"
ld64.lld: error: unknown argument '--no-warn-duplicate-rpath'
ld64.lld: error: unknown argument '-no_warn_duplicate_libraries'
clang++: error: linker command failed with exit code 1 (use -v to see invocation)

I think update to LLVM will solve this issue, but I am waiting for LLVM to build, or I will remove these flags (ref).

Ahrotahn commented 2 months ago

@tpearson-ssc That change is already in the PR in upstream-fixes/missing-dependencies.patch

@Cubik65536 The first argument was added because of #99289, so if the version you're building has that change then it should be fine.
The second argument was added for ios builds. Removing both should allow you to use your current version of LLVM.

Cubik65536 commented 2 months ago

@Cubik65536 The first argument was added because of #99289, so if the version you're building has that change then it should be fine. The second argument was added for ios builds. Removing both should allow you to use your current version of LLVM.

Yeah, I've seen the LLVM Project PR. The LLVM that is building on GitHub Action now will include #99289, and I will just remove the second later.

tpearson-ssc commented 2 months ago

@tpearson-ssc That change is already in the PR in upstream-fixes/missing-dependencies.patch

Sounds good. Guess I had an earlier version. :wink:

Cubik65536 commented 2 months ago

I now get the following error:

[58216/63782] CXX obj/components/plus_addresses/plus_addresses/plus_address_service.o
FAILED: obj/components/plus_addresses/plus_addresses/plus_address_service.o
../../third_party/llvm-build/Release+Asserts/bin/clang++ -MMD -MF obj/components/plus_addresses/plus_addresses/plus_address_service.o.d -DOFFICIAL_BUILD -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D_FORTIFY_SOURCE=2 -D_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_EXTENSIVE -D__ARM_NEON__=1 -DCR_XCODE_VERSION=1600 -D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS -D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS -DCR_LIBCXX_REVISION=627bf9cce8998515159693e44bcb6e0d734fcb01 -DTEMP_REBUILD_HACK -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -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_INIT_DECODERS -DSK_DISABLE_LEGACY_BACKEND_TEXTURE_FUNCS -DSK_DISABLE_LEGACY_TEXTURE_INFO_FUNCS -DSK_DISABLE_LEGACY_BACKEND_SEMAPHORE_FUNCS -DSK_DISABLE_LEGACY_GRAPHITE_IMAGES -DSK_DISABLE_LEGACY_DAWN_TEXTURE_INFO_FUNCS -DSK_DISABLE_LEGACY_DAWN_BACKEND_TEXTURE_FUNCS -DSK_CODEC_DECODES_JPEG -DSK_ENCODE_JPEG -DSK_ENCODE_PNG -DSK_ENCODE_WEBP -DSK_BUILD_FOR_MAC -DSK_GANESH -DSK_GPU_WORKAROUNDS_HEADER=\"gpu/config/gpu_driver_bug_workaround_autogen.h\" -DSK_GL -DSK_GRAPHITE -DSK_DAWN -DCHROMIUM -DLIBYUV_DISABLE_SME -DLIBYUV_DISABLE_LSX -DLIBYUV_DISABLE_LASX -DGOOGLE_PROTOBUF_NO_RTTI -DGOOGLE_PROTOBUF_NO_STATIC_INITIALIZER -DGOOGLE_PROTOBUF_INTERNAL_DONATE_STEAL_INLINE=0 -DHAVE_PTHREAD -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 -DLEVELDB_PLATFORM_CHROMIUM=1 -DI18N_ADDRESS_VALIDATION_DATA_URL=\"https://chromium-i18n.8pp2p8t.qjz9zk/ssl-aggregate-address/\" -DWEBRTC_ENABLE_AVX2 -DWEBRTC_CHROMIUM_BUILD -DWEBRTC_POSIX -DWEBRTC_MAC -DABSL_ALLOCATOR_NOTHROW=1 -DLOGGING_INSIDE_WEBRTC -I../.. -Igen -I../../buildtools/third_party/libc++ -I../../third_party/perfetto/include -Igen/third_party/perfetto/build_config -Igen/third_party/perfetto -I../../net/third_party/quiche/overrides -I../../net/third_party/quiche/src/quiche/common/platform/default -I../../net/third_party/quiche/src -I../../third_party/skia -Igen/third_party/skia -I../../third_party/wuffs/src/release/c -Igen/third_party/dawn/include -I../../third_party/dawn/include -I../../third_party/libyuv/include -I../../third_party/khronos -I../../gpu -Igen/third_party/private_membership/src -Igen/third_party/shell-encryption/src -Igen/components/policy/proto -I../../base/allocator/partition_allocator/src -Igen/base/allocator/partition_allocator/src -I../../third_party/abseil-cpp -I../../third_party/boringssl/src/include -I../../third_party/protobuf/src -Igen/protoc_out -I../../third_party/icu/source/common -I../../third_party/icu/source/i18n -I../../third_party/ced/src -I../../third_party/ipcz/include -I../../third_party/leveldatabase -I../../third_party/leveldatabase/src -I../../third_party/leveldatabase/src/include -Igen/net/third_party/quiche/src -I../../third_party/libaddressinput/src/cpp/include -I../../third_party/webrtc_overrides -I../../third_party/webrtc -Igen/third_party/webrtc -Wall -Wextra -Wimplicit-fallthrough -Wextra-semi -Wunreachable-code-aggressive -Wthread-safety -Wunguarded-availability -Wno-missing-field-initializers -Wno-unused-parameter -Wno-psabi -Wloop-analysis -Wno-unneeded-internal-declaration -Wno-cast-function-type -Wno-deprecated-this-capture -Wno-invalid-offsetof -Wno-vla-extension -Wno-thread-safety-reference-return -Wshadow -fno-delete-null-pointer-checks -fno-ident -fno-strict-aliasing -fstack-protector -fcolor-diagnostics -fmerge-all-constants -fno-sized-deallocation -fcrash-diagnostics-dir=../../tools/clang/crashreports -mllvm -instcombine-lower-dbg-declare=0 -mllvm -split-threshold-for-reg-with-hint=0 -ffp-contract=off -flto=thin -fsplit-lto-unit -mllvm -inlinehint-threshold=360 -fwhole-program-vtables -fcomplete-member-pointers --target=arm64-apple-macos -Wno-unknown-warning-option -mno-outline -no-canonical-prefixes -ftrivial-auto-var-init=pattern -O2 -fno-math-errno -fno-omit-frame-pointer -g0 -isysroot ../../../../../../../Applications/Xcode-16.0.0-Beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.0.sdk -mmacos-version-min=11.0 -fvisibility=hidden -Wheader-hygiene -Wstring-conversion -Wtautological-overlap-compare -DPROTOBUF_ALLOW_DEPRECATED=1 -Wenum-compare-conditional -Wno-c++11-narrowing-const-reference -Wno-missing-template-arg-list-after-template-kw -Wno-dangling-assignment-gsl -std=c++20 -Wno-trigraphs -fno-exceptions -fno-rtti -nostdinc++ -isystem../../third_party/libc++/src/include -isystem../../third_party/libc++abi/src/include -fvisibility-inlines-hidden -c ../../components/plus_addresses/plus_address_service.cc -o obj/components/plus_addresses/plus_addresses/plus_address_service.o
In file included from ../../components/plus_addresses/plus_address_service.cc:31:
In file included from ../../components/plus_addresses/plus_address_blocklist_data.h:11:
../../third_party/re2/src/re2/re2.h:223:10: fatal error: 're2/stringpiece.h' file not found
  223 | #include "re2/stringpiece.h"
      |          ^~~~~~~~~~~~~~~~~~~
1 error generated.
teeminus commented 2 months ago

I got the same error on windows. I think I fixed it by removing the 're2/' part of that include. I'll post the patch later...

Cubik65536 commented 2 months ago

I got the same error on windows. I think I fixed it by removing the 're2/' part of that include. I'll post the patch later...

I also think it's that, just did it and waiting for rebuild, then it seems that it'll work...

PF4Public commented 2 months ago

They broke it upstream in https://chromium-review.googlesource.com/c/chromium/src/+/5772057 by directly including #include "third_party/re2/src/re2/re2.h" in components/plus_addresses/plus_address_blocklist_data.h. It builds with system re2 library just fine, but fails with the bundled one. I'm not sure we should fix this in ungoogled-chromium, should we? At the very least removing re2 could brake building against the system library. Maybe a gn file should be fixed, or something.

teeminus commented 2 months ago

Maybe we should include the fix in the affected repos rather this repo.

teeminus commented 2 months ago

I got the same error on windows. I think I fixed it by removing the 're2/' part of that include. I'll post the patch later...

For the sake of completeness :)

--- a/third_party/re2/src/re2/re2.h
+++ b/third_party/re2/src/re2/re2.h
@@ -220,7 +220,7 @@
 #include "absl/base/call_once.h"
 #include "absl/strings/string_view.h"
 #include "absl/types/optional.h"
-#include "re2/stringpiece.h"
+#include "stringpiece.h"

 #if defined(__APPLE__)
 #include <TargetConditionals.h>
rany2 commented 2 months ago

For the record, this issue doesn't occur when compiling regular Chromium so it is UGC specific. I try to follow the standard Chromium package on Flatpak as closely as possible, but only UGC has this issue with the same build configuration.

I attempted this as a workaround: https://github.com/flathub/io.github.ungoogled_software.ungoogled_chromium/pull/53/commits/fb0c3ea757a0b6ae7d5c4d6e9fb916c0b15aa427

Not sure if it will work.

Edit: use_system_re2 fixes the issue as well.

iskunk commented 2 months ago

I believe this is the real fix:

--- a/components/plus_addresses/BUILD.gn
+++ b/components/plus_addresses/BUILD.gn
@@ -95,6 +95,7 @@ source_set("plus_addresses") {
     "//net",
     "//services/data_decoder/public/cpp",
     "//services/network/public/cpp",
+    "//third_party/re2",
     "//ui/base",
   ]
   public_deps = [
--- a/components/component_updater/installer_policies/BUILD.gn
+++ b/components/component_updater/installer_policies/BUILD.gn
@@ -45,6 +45,7 @@ static_library("installer_policies_no_co
     "//components/update_client",
     "//mojo/public/cpp/base:protobuf_support",
     "//services/network/public/cpp",
+    "//third_party/re2",
   ]

   # Disallow depending on content.

Verified in a successful u-c test build on Ubuntu 22.04. The build was failing in two places:

obj/components/plus_addresses/plus_addresses/plus_address_service.o
obj/components/component_updater/installer_policies/installer_policies_no_content_deps/plus_address_blocklist_component_installer.o

Dozens of other source files in the tree have that same exact #include, together with that item in deps. These two instances lacked the latter.

PF4Public commented 2 months ago

Exactly as I suspected! Should we add this patch as "fixes" until fixed upstream?

rany2 commented 2 months ago

Just out of curiosity but why does this occur only for Ungoogled Chromium? I've got identical build manifest to regular Chromium on flatpak (excl applying UGC patches) yet only UGC has this issue.

iskunk commented 2 months ago

Exactly as I suspected! Should we add this patch as "fixes" until fixed upstream?

I think so. This issue affects multiple platforms, and it would be cumbersome if each one had to patch it separately.

Just out of curiosity but why does this occur only for Ungoogled Chromium?

Good question. I can confirm that (1) the regular Chromium build (on Debian/Ubuntu) does compile the same two object files at issue, and (2) the compiler command line for them has -I../../third_party/re2/src despite the dependency not being listed. Maybe some kind of transitive dependency mechanism is pulling it in at the GN level?

Ahrotahn commented 2 months ago

Yeah that's something we should add to the missing-dependencies patch. This happens more often with ungoogled-chromium because those dependencies are sometimes indirectly supplied by something we've removed. They really should be adding the deps they use when they add them. I feel like they've been getting sloppier with that over the years, but the ninja upgrade showed that it was happening before as well and we just weren't aware until recently.

Would it be better to create a new PR with a -2 revision or wait to add it to the update in a couple days?

teeminus commented 2 months ago

I'm fine with waiting for the next minor release.

rany2 commented 2 months ago

I'm fine with it being fixed by the next release. I already have that workaround working but would rather revert it so I don't deviate too much from the regular Chromium package.

PF4Public commented 2 months ago

@iskunk The honor is yours to submit the PR before the next release, if you will of course :)

iskunk commented 2 months ago

@PF4Public: Thanks, I've posted it at #3036. Let me know if anything needs touching up!

PF4Public commented 1 month ago

BTW, uazo had to do the same: https://github.com/uazo/cromite/blob/bbcb812cffa4e2815760cd7fc3e34b00b4e39ea1/build/patches/Fix-chromium-build-bugs.patch#L90-L100