ungoogled-software / ungoogled-chromium

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

Compiling 127.0.6533.72 fails on Slackware #2960

Closed alienbob closed 3 months ago

alienbob commented 3 months ago

OS/Platform

Debian, Ubuntu, and derivatives

Installed

Other (please use 'Additional context' field below to mention how exactly)

Version

127.0.6533.72

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

Description

Ungoogled Chromium fails to compile using the same script that can successfully compile 126.0.6478.x releases

How to Reproduce?

Run the build script in http://www.slackware.com/~alien/slackbuilds/chromium-ungoogled/build/ (but updated for the 127.0.6533.72 release).

Actual behaviour

Compilation fails with error almost immediately when running "ninja -C out/Release":

ninja: Entering directory `out/Release'
ninja: error: '../../third_party/llvm-build/Release+Asserts/lib/clang/19/lib/x86_64-unknown-linux-gnu/libclang_rt.builtins.a', needed by 'obj/third_party/protobuf/libprotoc_lib.a', missing and no known rule to make it

Expected behaviour

Compilation ideally runs to completion without error. It looks like the pruning.list started pruning some stuff I need. I have removed all lines starting with "third_party/rust-toolchain/" and "third_party/llvm-build/Release+Asserts/" from pruning.list. Still I get the above error almost immediately when running "ninja -C out/Release".

Relevant log output

No response

Additional context

First: I am slightly offended because you let me choose between several specific Linux OS flavors - but Slackware is not a selectable option. Please make this dropdown carry a set of sensible options. Really :-) I am the distro packager for Slackware and have been providing a "chromium-ungoogled" package for years. Compiling the M126 release was already somewhat problematic due to pruning of the sysroots, and now with ungoogled chromium 127.0.6533.72 I find myself in a similar situation. I compile the browser using a provided sysroot as well as Google's clang and rust binaries which are now also being pruned.

Both files mentioned in the error message do actually exist, so the error must be triggered by something I do not see. Do you have a hint on where to look or how to solve this?

Thanks, Eric Hameleers (alienBOB)

rany2 commented 3 months ago

@alienbob I had the same issue on Flatpak, the issue is caused by the fact that the chromium src tarball now includes third_party/llvm-build. After you extract the tarball, remove the contents of that folder and it should work fine afterwards.

Edit: made a typo, third_party/llvm_build => third_party/llvm-build

Ahrotahn commented 3 months ago

Does it continue the build if you skip running the pruning script? The paths you removed from the list were the majority of the new changes, so it could possibly be more fallout from them moving things to DEPS. I seem to recall seeing issues like this before so I'll see what I can find out.

alienbob commented 3 months ago

Thanks rany2 and Ahrotahn, I will try your suggestions in order. First manually removing 'third_party/llvm-build' after extracting the Chromium sources, and if that does not un-break the compilation, I will try skipping the prune. I will let you know once I have built (and optionally failed the build).

alienbob commented 3 months ago

So far I can say that rany2's suggestion did not make a difference - I get the same error right at the start. Ahrotahn's suggestion on the other hand - to skip the pruning - does indeed make a difference. The build continues and currently ninja is at step [25926/61217]. I'll wait until it completes its compilation, but I thought I already share this with you.

Ahrotahn commented 3 months ago

I had started work on some changes to how we prune things due to the new DEPS inclusions. I'll add a couple more commits to that and make a PR later today. Hopefully that will allow you to build successfully without removing something you rely on.

alienbob commented 3 months ago

I'll be on the watch out for that PR then.

alienbob commented 3 months ago

Unfortunately the build still fails, at a late stage:

[53704/61217] CXX obj/chrome/browser/ui/views/side_panel/side_panel/companion_side_panel_web_view.o
FAILED: obj/chrome/browser/ui/views/side_panel/side_panel/companion_side_panel_web_view.o 

../../third_party/llvm-build/Release+Asserts/bin/clang++ -MMD -MF obj<LONG_COMPILER_COMMANDLINE> -o obj/chrome/browser/ui/views/side_panel/side_panel/companion_tab_helper.o
In file included from ../../chrome/browser/ui/views/side_panel/companion/companion_tab_helper.cc:15:
In file included from ../../chrome/browser/ui/webui/side_panel/companion/companion_page_handler.h:15:
In file included from ../../chrome/browser/companion/visual_query/visual_query_classifier_host.h:14:
../../chrome/browser/companion/visual_query/visual_query_suggestions_service.h:12:10: fatal error: 'chrome/common/companion/visual_query.mojom.h' file not found
   12 | #include "chrome/common/companion/visual_query.mojom.h"
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.

There are several more before ninja decides it's had enough, all related to "fatal error: 'chrome/browser/ui/webui_name_variants.h' file not found", for example:

[53704/61217] CXX obj/chrome/browser/ui/views/side_panel/side_panel/companion_side_panel_web_view.o
FAILED: obj/chrome/browser/ui/views/side_panel/side_panel/companion_side_panel_web_view.o 
...
In file included from ../../chrome/browser/ui/views/side_panel/companion_side_pa
nel_web_view.cc:5:
In file included from ../../chrome/browser/ui/views/side_panel/companion_side_panel_web_view.h:10:
In file included from ../../chrome/browser/ui/views/side_panel/side_panel_web_ui_view.h:12:
../../chrome/browser/ui/webui/top_chrome/webui_contents_wrapper.h:13:10: fatal error: 'chrome/browser/ui/webui_name_variants.h' file not found
   13 | #include "chrome/browser/ui/webui_name_variants.h"
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.

I am stumped.

rany2 commented 3 months ago

Really odd that it worked out for me on Flatpak. This stinks :(

Maybe there's something about my order that made it work? This is the commit that fixed my issue: https://github.com/flathub/io.github.ungoogled_software.ungoogled_chromium/commit/95ee60d472f1612f7f4363011f2f6b1498b3acf0

Ahrotahn commented 3 months ago

That's a newer ninja dependency issue, I posted a patch to fix it in this comment: https://github.com/ungoogled-software/ungoogled-chromium/pull/2954#issuecomment-2242767534

alienbob commented 3 months ago

Ungoogled Chromium 127.0.6533.72 compiled on Slackware without issue, after applying both the patch dealing with recent ninja as well as PR2961, and adding --keep-contingent-paths as argument to prune_binaries.py. Thanks to all for fixing this.