PF4Public / gentoo-overlay

Personal Gentoo overlay
81 stars 20 forks source link

cromite/cromite-117.0.5938.88: fails to build #258

Closed skunk73 closed 1 year ago

skunk73 commented 1 year ago

`FAILED: obj/chrome/browser/browser_process/browser_process.o x86_64-pc-linux-gnu-clang++ -MMD -MF obj/chrome/browser/browser_process/browser_process.o.d -DUSE_UDEV -DUSE_AURA=1 -DUSE_GLIB=1 -DUSE_OZONE=1 -DOFFICIAL_BUILD -DSTDC_CONSTANT_MACROS -DSTDC_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 -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/double_conversion_shim -Igen/shim_headers/libevent_shim -Igen/shim_headers/icui18n_shim -Igen/shim_headers/icuuc_shim -I../../third_party/abseil-cpp -I../../third_party/boringssl/src/include -I../../third_party/protobuf/src -Igen/protoc_out -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 -fstack-protector-strong -fwrapv -ftrivial-auto-var-init=zero -enable-trivial-auto-var-init-zero-knowing-it-will-be-removed-from-clang -Wno-unused-command-line-argument -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 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/lib64/libffi/include -DPROTOBUF_ALLOW_DEPRECATED=1 -std=c++20 -Wno-trigraphs -gsimple-template-names -fno-exceptions -fno-rtti -fvisibility-inlines-hidden -DDATE= -DTIME= -DTIMESTAMP= -march=znver3 -mshstk -mtune=znver3 -O2 -pipe -fcf-protection=full -Wno-unknown-warning-option -Wno-builtin-macro-redefined -c ../../chrome/browser/browser_process.cc -o obj/chrome/browser/browser_process/browser_process.o In file included from ../../chrome/browser/browser_process.cc:5: In file included from ../../chrome/browser/browser_process.h:24: In file included from ../../components/component_updater/adblock_updater_service.h:33: In file included from ../../components/component_updater/download_filters_task.h:29: ../../services/network/public/cpp/shared_url_loader_factory.h:13:10: fatal error: 'services/network/public/mojom/url_loader_factory.mojom.h' file not found

include "services/network/public/mojom/url_loader_factory.mojom.h"

     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

1 error generated.`

while www-client/ungoogled-chromium-117.0.5938.88_p1 with same USE flags +uazo-bromite enabled did build fine...

note: services/network/public/mojom/url_loader_factory.mojom.h doesn't exist inside the cromite work directiry nor inside ungoogled-chromium's.

PF4Public commented 1 year ago

Wow, wow, wow, not so fast please! It is Work in Progress :) See also https://github.com/uazo/cromite/issues/310

I'm aware of this issue and I have a fix for that, have some patience please :)

skunk73 commented 1 year ago

up, sorry... indeed take your time! it wasn't my intention to make you hurry, just informing... thank you for your great work :)

PF4Public commented 1 year ago

Builds and runs, you can give it a try too

skunk73 commented 1 year ago

yay! thank you!

skunk73 commented 1 year ago

yes it builds fine now, however i had to uncomment doexe out/Release/chrome_crashpad_handler inside the ebuild else it refuse to run with the following message: [26517:26517:0924/164143.381952:FATAL:spawn_subprocess.cc(221)] posix_spawn: No such file or directory (2) Trace/breakpoint trap

PF4Public commented 1 year ago

Which flags you used to build? It runs fine without crashpad on my system.

skunk73 commented 1 year ago

`[ebuild R ~] www-client/cromite-117.0.5938.92::local USE="X bluetooth clang cups custom-cflags official pic proprietary-codecs pulseaudio qt5 screencast system-ffmpeg system-harfbuzz system-icu system-jsoncpp system-libevent system-libusb system-openh264 system-png system-snappy vaapi wayland -cfi -convert-dict -debug -enable-driver -gtk4 -hangouts -headless -hevc -kerberos -nvidia -optimize-thinlto -optimize-webui -override-data-dir -pax-kernel -pgo -qt6 (-selinux) -suid -system-abseil-cpp -system-av1 -system-brotli -system-crc32c -system-double-conversion -system-libvpx -system-openjpeg -system-re2 -system-woff2 -thinlto -widevine" L10N="de es it -af -am -ar -bg -bn -ca -cs -da -el -en-GB -es-419 -et -fa -fi -fil -fr -gu -he -hi -hr -hu -id -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" 3078817 KiB

COMMON_FLAGS="-march=znver2 --param l1-cache-size=32 --param l1-cache-line-size=64 --param l2-cache-size=512 -mtune=znver2 -O2 -pipe" COMMON_FLAGS="${COMMON_FLAGS} -fcf-protection=full" CFLAGS="${COMMON_FLAGS}" CXXFLAGS="${COMMON_FLAGS}"`

PF4Public commented 1 year ago

Do you need pic specifically? Try disabling it.

skunk73 commented 1 year ago

i've added the pic use flag globally some time ago on an attempt to harden my box (i'm conspiranoid since 2020) and never had any issue, however i see now the "Do not utilize this flag unless you know what you're doing." warning so i did remove it and rebuilded all affecting packages... unfortunately cromite still bails out on startup without chrome_crashpad_handler.

PF4Public commented 1 year ago

You mentioned you used same flags with ungoogled-chromium, did it also require crashpad handler?

Two other things that I do not have are: screencast and wayland. Could be screencast needs it for some reason?

an attempt to harden my box

~Have you also taken measures "against" Intel Management Engine / AMD Platform Security?~ Jaja, ich necke nur.

skunk73 commented 1 year ago

no, ungoogled-chromium was starting up fine without chrome_crashpad_handler i don't understand why any of those two frags would made any difference since it didn't with ungoogled-chromium... ja, ich hab mir ein ein pinebook laptop gekauft denn ich mach mir sorgen ueber hardware backdoors seit die neue normalitaet :)

PF4Public commented 1 year ago

no, ungoogled-chromium was starting up fine without chrome_crashpad_handler i don't understand why any of those two frags would made any difference since it didn't with ungoogled-chromium...

Even though ungoogled-chromium and cromite use some of each other's patches, they are not equivalent and may behave differently at runtime.

BTW it may be related to https://github.com/PF4Public/gentoo-overlay/issues/186. I don't experience this issue, but I always build with "-O3", therefore I didn't get it then with ungoogled-chromium. … and now with cromite.

Please try building with "-O3" instead of "-O2". Using "-O2" with custom-cflags you limit Chromium to "-O2", while parts of it are intended to be built with "-O3". See https://github.com/PF4Public/gentoo-overlay/issues/25.

skunk73 commented 1 year ago

unsetting custom-cflags, screencast and wayland USE flags didn't make any difference regarding the crashpad requirement: [ebuild R #] www-client/cromite-117.0.5938.132::pf4public USE="X bluetooth clang cups official proprietary-codecs pulseaudio qt5 system-ffmpeg system-harfbuzz system-icu system-jsoncpp system-libevent system-libusb system-openh264 system-png system-snappy vaapi -cfi -convert-dict -custom-cflags -debug -enable-driver -gtk4 -hangouts -headless -hevc -kerberos -nvidia -optimize-thinlto -optimize-webui -override-data-dir -pax-kernel -pgo -pic -qt6 -screencast (-selinux) -suid -system-abseil-cpp -system-av1 -system-brotli -system-crc32c -system-double-conversion -system-libvpx -system-openjpeg -system-re2 -system-woff2 -thinlto -wayland -widevine" L10N="de es it -af -am -ar -bg -bn -ca -cs -da -el -en-GB -es-419 -et -fa -fi -fil -fr -gu -he -hi -hr -hu -id -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" 3080740 KiB i'll just copy the cromite ebuild to my local repository with the doexe line uncommented and archive this issue with the other IT misteries i've was faced with... thank you again for your efforts!

PF4Public commented 1 year ago

unsetting custom-cflags

Still you didn't set -O3 as I suggested. (-O3 + custom-cflags)

skunk73 commented 1 year ago

sorry, i did't undertand i had to rebuild the whole package with O3, as i thought that unsetting custom-cflags would be enough to avoid overriding with O2 code supposed to be compiled with O3... i'll try setting O3 per package and rebuild asap, however most gentoo users still are using O2 globally (even gentoo's install guide still says so), therefore if compiling with O3 will solve the crashpad requirement i think a warning should be issued asking to do so.

PF4Public commented 1 year ago

compiling with O3 will solve the crashpad requirement

I don't know! I'm just guessing at this point.

skunk73 commented 1 year ago

unfortunately building with O3 results in an unusable page rendering and still yet complain about the crashpad

PF4Public commented 1 year ago

It could be ccache artifact on my side. I'll try building cromite without ccache and let you know if you're interested.

PF4Public commented 1 year ago

I've rebuilt it without ccache — cannot reproduce. I've rebuilt with your use-flags — still nothing:

[binary R ] www-client/cromite-117.0.5938.149::pf4public USE="X bluetooth clang cups official override-data-dir proprietary-codecs pulseaudio qt5 system-ffmpeg system-harfbuzz system-icu system-jsoncpp system-libevent system-libusb system-openh264 system-png system-snappy vaapi -cfi -convert-dict -custom-cflags -debug -enable-driver -gtk4 -hangouts -headless -hevc -kerberos -nvidia -optimize-thinlto -optimize-webui -pax-kernel -pgo -pic -qt6 -screencast (-selinux) -suid -system-abseil-cpp -system-av1 -system-brotli -system-crc32c -system-double-conversion -system-libvpx -system-openjpeg -system-re2 -system-woff2 -thinlto* -wayland -widevine"

So It could be either your CFLAGS, or the way your toolchain is built.

PF4Public commented 11 months ago

Perhaps Chromium wants chrome_crashpad_handler on wayland specifically?

skunk73 commented 11 months ago

i've the wayland USE flag globally enabled however i'm still on a xsession because plasma 5 still shows glitches with my config, so no, i don't think that wayland is triggering the chrome_crashpad_handler...