ungoogled-software / ungoogled-chromium-windows

Windows packaging for ungoogled-chromium
BSD 3-Clause "New" or "Revised" License
1.12k stars 112 forks source link

Update to version 77 #2

Closed Eloston closed 5 years ago

Eloston commented 5 years ago

Continuation of https://github.com/Eloston/ungoogled-chromium/issues/619 and https://github.com/Eloston/ungoogled-chromium/issues/675.

I have updated build.py and package.py for the new system (post-fragmentation refactor). The rest of the work should be updating GN flags and patches.

ghost commented 5 years ago

Reposting from old issue:

I tried latest master version (new build instructions) and result is still error:

INFO: Applying patches from patches
Traceback (most recent call last):
  File "C:\ungoogled-chromium\utils\patches.py", line 162, in <module>
    main()
  File "C:\ungoogled-chromium\utils\patches.py", line 158, in main
    args.callback(args)
  File "C:\ungoogled-chromium\utils\patches.py", line 116, in _apply_callback
    patch_bin_path=args.patch_bin)
  File "C:\ungoogled-chromium\utils\patches.py", line 35, in apply_patches
    raise ValueError('Could not find the patch binary')

It expects patch.exe available on disk but it is missing.

--

Also I tried to use py build.py command for windos repo but it also does not work:

C:\ungoogled-chromium-windows>py build.py
INFO: Downloading required files...
Traceback (most recent call last):
  File "build.py", line 209, in <module>
    main()
  File "build.py", line 141, in main
    downloads.retrieve_downloads(download_info, args.downloads_cache, True,
AttributeError: 'Namespace' object has no attribute 'downloads_cache'

--

After reading of all related issues I think it is because Windows platform scripts are not updated yet.

tonkku107 commented 5 years ago

I fixed the problem in build.py by adding args.downloads_cache = _ROOT_DIR / 'build' / 'downloads_cache' below line 122

after that a patch fails to apply as it can't find the file it's looking for.

INFO: * Applying mojo.patch (6/32)
DEBUG: D:\git\ungoogled-chromium-windows\build\src\third_party\git\usr\bin\patch.exe -p1 --ignore-whitespace -i D:\git\ungoogled-chromium-windows\patches\debian_buster\fixes\mojo.patch -d D:\git\ungoogled-chromium-windows\build\src --no-backup-if-mismatch --forward
(Stripping trailing CRs from patch; use --binary to disable.)
patching file content/shell/BUILD.gn
Hunk #1 FAILED at 125.
Hunk #2 FAILED at 289.
2 out of 2 hunks FAILED -- saving rejects to file content/shell/BUILD.gn.rej
(Stripping trailing CRs from patch; use --binary to disable.)
can't find file to patch at input line 27
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|--- a/content/shell/browser/layout_test/layout_test_content_browser_client.cc
|+++ b/content/shell/browser/layout_test/layout_test_content_browser_client.cc
--------------------------
File to patch:
Eloston commented 5 years ago

@tonkku107 The patches will need to be updated for 73, which is why you're seeing that error with patches.

r4sas commented 5 years ago

btw, adding list of files without substitutions:

INFO: Path has no substitutions: chrome/browser/plugins/plugins_resource_service.cc
INFO: Path has no substitutions: chrome/browser/safe_browsing/client_side_model_loader.cc
INFO: Path has no substitutions: chrome/common/google_url_loader_throttle.cc
INFO: Path has no substitutions: chrome/common/page_load_metrics/page_load_metrics_util.cc
INFO: Path has no substitutions: components/dom_distiller/content/browser/dom_distiller_viewer_source.cc
INFO: Path has no substitutions: components/dom_distiller/core/html/preview.html
INFO: Path has no substitutions: components/domain_reliability/google_configs.cc
INFO: Path has no substitutions: components/google/core/browser/google_url_tracker.cc
INFO: Path has no substitutions: components/variations/net/variations_http_headers.cc
INFO: Path has no substitutions: net/tools/transport_security_state_generator/transport_security_state_generator.cc
INFO: Path has no substitutions: rlz/lib/lib_values.cc
INFO: Path has no substitutions: third_party/catapult/third_party/polymer/components/font-roboto/roboto.html
INFO: Path has no substitutions: third_party/catapult/tracing/third_party/gl-matrix/jsdoc-template/static/default.css
INFO: Path has no substitutions: third_party/crashpad/crashpad/doc/support/crashpad_doxygen.css
INFO: Path has no substitutions: tools/md_browser/base.css

Also needed update offsets in patches...

Eloston commented 5 years ago

@r4sas That's fine. Those files are probably patched or removed, so they show up as files without substitution. Domain substitution is computed based on the original Chromium source tree (i.e. without any modifications).

tonkku107 commented 5 years ago

The gn bootstrap script expects to find ninja from the path. Maybe the build script should be updated to add the path of the downloaded ninja to path?

Then there's this error at the gn gen phase

ERROR at //chrome/browser/BUILD.gn:4090:5: Label not in deps.
    allow_circular_includes_from += [
    ^--------------------------------
The label "//chrome/browser/safe_browsing:safe_browsing"
was not in the deps of this target. allow_circular_includes_from only allows
targets present in the deps.
See //build/config/jumbo.gni:257:3: whence it was called.
  internal_jumbo_target(target_name) {
  ^-----------------------------------
See //chrome/browser/BUILD.gn:75:1: whence it was called.
jumbo_split_static_library("browser") {
^--------------------------------------
See //chrome/BUILD.gn:168:11: which caused the file to be included.
          "//chrome/browser:active_use_util",
          ^---------------------------------
r4sas commented 5 years ago

The gn bootstrap script expects to find ninja from the path. Maybe the build script should be updated to add the path of the downloaded ninja to path?

Here problem not in ninja, Remove line 1714 in chrome\browser\BUILD.gn: "//chrome/browser/safe_browsing",

There is many changes needed to remove safe_browsing....

tonkku107 commented 5 years ago

That error was after adding the location of ninja.exe to path, if that was unclear.

r4sas commented 5 years ago

Ah, I think that you said about ninja according to error cut=)

tonkku107 commented 5 years ago

So, how is this going to progress? Chrome 74 was released to stable yesterday.

Eloston commented 5 years ago

Yes, and ungoogled-chromium's been updated to 74 as well. Do you guys want to switch to 74?

tonkku107 commented 5 years ago

I would switch to 74, yes.

PonyPC commented 5 years ago

The gn bootstrap script expects to find ninja from the path. Maybe the build script should be updated to add the path of the downloaded ninja to path?

Here problem not in ninja, Remove line 1714 in chrome\browser\BUILD.gn: "//chrome/browser/safe_browsing", There is many changes needed to remove safe_browsing....

also need remove "//chrome/browser/safe_browsing" in "chrome\browser\extensions\BUILD.gn", replace "//chrome/browser/safe_browsing" with "//chrome/browser/safe_browsing:safe_browsing" in "chrome\browser\ui\BUILD.gn", remove

      "webui/settings/chrome_cleanup_handler.cc",
      "webui/settings/chrome_cleanup_handler.h",

and

      "webui/settings/change_password_handler.cc",
      "webui/settings/change_password_handler.h",

in "chrome\browser\ui\BUILD.gn", move

source_set("binary_feature_extractor") {
    sources = [
      "pe_image_reader_win.cc",
      "pe_image_reader_win.h",
    ]
  }

out side

if (safe_browsing_mode == 1) {

in "chrome\common\safe_browsing\BUILD.gn"

Then next step I meet:

FAILED: obj/chrome/elevation_service/elevation_service/elevation_service.res
E:/depot_tools/win_tools-2_7_6_bin/python/bin/python.exe ../../build/toolchain/win/tool_wrapper.py rc-wrapper environment.x64 rc.exe /nologo -DUSE_AURA=1 -DNO_TCMALLOC -DOFFICIAL_BUILD -DCHROMIUM_BUILD "-DCR_CLANG_REVISION=\"354873-1\"" -D_HAS_NODISCARD -D_HAS_EXCEPTIONS=0 -D__STD_C -D_CRT_RAND_S -D_CRT_SECURE_NO_DEPRECATE -D_SCL_SECURE_NO_DEPRECATE -D_ATL_NO_OPENGL -D_WINDOWS -DCERT_CHAIN_PARA_HAS_EXTRA_FIELDS -DPSAPI_VERSION=2 -DWIN32 -D_SECURE_ATL -D_USING_V110_SDK71_ -DWINAPI_FAMILY=WINAPI_FAMILY_DESKTOP_APP -DWIN32_LEAN_AND_MEAN -DNOMINMAX -D_UNICODE -DUNICODE -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -DNTDDI_VERSION=NTDDI_WIN7 -D_WIN32_WINNT=_WIN32_WINNT_WIN7 -DWINVER=_WIN32_WINNT_WIN7 -DGOOGLE_PROTOBUF_NO_RTTI -DGOOGLE_PROTOBUF_NO_STATIC_INITIALIZER -I../.. -Igen -I../../third_party/protobuf/src -Igen/protoc_out -I../../third_party/protobuf/src /foobj/chrome/elevation_service/elevation_service/elevation_service.res ../../chrome/elevation_service/elevation_service.rc

../../chrome/elevation_service/elevation_service.rc(38) : error RC2135 : file not found: chrome/elevation_service/elevation_service_idl.tlb

according to #675 replace all "tmp_dir" with "outdir" in "/build/toolchain/win/midl.py" except

    if os.path.exists(tmp_dir) and delete_tmp_dir:
      shutil.rmtree(tmp_dir)

can resolve the problem above ugly


according to @r4sas chrome\browser\browser_resources.grd

@@ -148,9 +148,7 @@
       <include name="IDR_DOMAIN_RELIABILITY_INTERNALS_HTML" file="resources\domain_reliability_internals.html" compress="gzip" type="BINDATA" />
       <include name="IDR_DOMAIN_RELIABILITY_INTERNALS_CSS" file="resources\domain_reliability_internals.css" compress="gzip" type="BINDATA" />
       <include name="IDR_DOMAIN_RELIABILITY_INTERNALS_JS" file="resources\domain_reliability_internals.js" compress="gzip" type="BINDATA" />
-      <if expr="safe_browsing_mode != 0">
-        <include name="IDR_DOWNLOAD_FILE_TYPES_PB" file="${root_gen_dir}\chrome\browser\resources\safe_browsing\download_file_types.pb" use_base_dir="false" type="BINDATA" />
-      </if>
+      <include name="IDR_DOWNLOAD_FILE_TYPES_PB" file="${root_gen_dir}\chrome\browser\resources\safe_browsing\download_file_types.pb" use_base_dir="false" type="BINDATA" />
       <include name="IDR_DOWNLOAD_INTERNALS_HTML" file="resources\download_internals\download_internals.html" flattenhtml="true" allowexternalscript="true" type="BINDATA" compress="gzip" />
       <include name="IDR_DOWNLOAD_INTERNALS_CSS" file="resources\download_internals\download_internals.css" type="BINDATA" compress="gzip" />
       <include name="IDR_DOWNLOAD_INTERNALS_JS" 
file="resources\download_internals\download_internals.js" type="BINDATA" compress="gzip" />

replace

  if (safe_browsing_mode > 0) {
    deps +=
        [ "//chrome/browser/resources/safe_browsing:make_file_types_protobuf" ]
  }

with

    deps +=
        [ "//chrome/browser/resources/safe_browsing:make_file_types_protobuf" ]

in "chrome\browser\BUILD.gn"


add

  sources = [
      "settings_reset_prompt/settings_reset_prompt_controller.cc",
      "settings_reset_prompt/settings_reset_prompt_controller.h",
  ]
  deps = [
      "//extensions/browser",
  ]

below "jumbo_static_library("safe_browsing") {" in "chrome\browser\safe_browsing\BUILD.gn"

PonyPC commented 5 years ago

Then I success build, but chrome.exe cannot run correctly. need fix later.

tonkku107 commented 5 years ago

Create a PR with updated patches for your changes?

PonyPC commented 5 years ago

I'm sorry I can't confirm my patch is correct... @tonkku107

tonkku107 commented 5 years ago

@Eloston or someone else will review the patches. If something's wrong you'll get feedback and you can update the patches again.

PonyPC commented 5 years ago

The patch still need to be fix for running. I'll try later.

JackP74 commented 5 years ago

So it's 21 days later, with the modifications it builds and just crashes at startup. The last build for windows is version 67. Anyone still working on this?

PonyPC commented 5 years ago

@evo744 I'm still finding the crash issue. But it seems that it beyonds my ability. ๐Ÿ˜‚๐Ÿ˜‚๐Ÿ˜‚ Maybe you can help this project.

JackP74 commented 5 years ago

@PonyPC I'm trying, maybe I'll get lucky

tangalbert919 commented 5 years ago

I managed to fix the patches so they apply correctly this time. However, expect this error:

ERROR at //tools/grit/grit_rule.gni:101:3: Assertion failed.
  assert(
  ^-----
resource whitelist generation only works on non-component builds with debug info enabled.
See //tools/grit/grit_rule.gni:102:7:
      symbol_level > 0 && !strip_debug_info && !is_component_build,
      ^-----------------------------------------------------------
This is where it was set.
See //net/BUILD.gn:16:1: whence it was imported.
import("//tools/grit/grit_rule.gni")
^----------------------------------
See //BUILD.gn:69:5: which caused the file to be included.
    "//net:net_unittests",
    ^--------------------
maxk1968 commented 5 years ago

I managed to fix the patches so they apply correctly this time. However, expect this error:

ERROR at //tools/grit/grit_rule.gni:101:3: Assertion failed.
  assert(
  ^-----
resource whitelist generation only works on non-component builds with debug info enabled.
See //tools/grit/grit_rule.gni:102:7:
      symbol_level > 0 && !strip_debug_info && !is_component_build,
     ...
See //BUILD.gn:69:5: which caused the file to be included.
    "//net:net_unittests",
    ^--------------------

I have a similar problem:

ERROR at //tools/grit/grit_rule.gni:101:3: Assertion failed. assert( ^----- resource whitelist generation only works on non-component builds with debug info enabled. See //tools/grit/grit_rule.gni:102:7: symbol_level > 0 && !strip_debug_info && !is_component_build, ^----------------------------------------------------------- This is where it was set. See //tools/grit/repack.gni:5:1: whence it was imported. import("//tools/grit/grit_rule.gni") ^---------------------------------- See //components/BUILD.gn:15:1: whence it was imported. import("//tools/grit/repack.gni") ^------------------------------- See //BUILD.gn:87:7: which caused the file to be included. "//components:components_unittests", ^----------------------------------

tangalbert919 commented 5 years ago

It looks like for this, we need to disable enable_resource_whitelist_generation to fix that error. Adding the following entry to flags.windows.gn will do just that:

enable_resource_whitelist_generation=false

maxk1968 commented 5 years ago

Added flag enable_resource_whitelist_generation=false and got an error similar to https://github.com/ungoogled-software/ungoogled-chromium-windows/issues/2#issuecomment-485256254 ahhh! I really want to try to use ungoogle-chromium-windows. Maybe there are suggestions on how to move the process forward.

ERROR at //chrome/browser/ui/BUILD.gn:3419:5: Label not in deps.
    allow_circular_includes_from += [
    ^--------------------------------
The label "//chrome/browser/safe_browsing:safe_browsing"
was not in the deps of this target. allow_circular_includes_from only allows
targets present in the deps.
See //build/config/jumbo.gni:279:3: whence it was called.
  internal_jumbo_target(target_name) {
  ^-----------------------------------
See //chrome/browser/ui/BUILD.gn:29:1: whence it was called.
jumbo_split_static_library("ui") {
^---------------------------------
See //chrome/browser/devtools/BUILD.gn:233:7: which caused the file to be included.
      "//chrome/browser/ui",
      ^--------------------
Kieaer commented 5 years ago
[175/175] LINK gn.exe
FAILED: gn.exe
ninja -t msvc -- link.exe /nologo /OUT:gn.exe /PDB:gn.exe.pdb @gn.exe.rsp
LINK : fatal error LNK1181: 'dbghelp.lib' can not open input file.
ninja: build stopped: subcommand failed.
Traceback (most recent call last):
  File "tools\gn\bootstrap\bootstrap.py", line 142, in <module>
    sys.exit(main(sys.argv[1:]))
  File "tools\gn\bootstrap\bootstrap.py", line 128, in main
    ['ninja', '-C', gn_build_dir, 'gn.exe', '-w', 'dupbuild=err'])
  File "C:\Users\cloud\depot_tools\win_tools-2_7_15_chromium14_bin\python\bin\lib\subprocess.py", line 186, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['ninja', '-C', 'C:\\Users\\cloud\\work\\ungoogled-chromium-windows\\build\\src\\out\\Release\\gn_build', 'gn.exe', '-w', 'dupbuild=err']' returned non-zero exit status 1
C:\Users\cloud\work\ungoogled-chromium-windows\build\src>exit
Traceback (most recent call last):
  File "build.py", line 210, in <module>
    main()
  File "build.py", line 199, in main
    '--skip-generate-buildfiles')
  File "build.py", line 67, in _run_build_process
    **kwargs)
  File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python37_64\lib\subprocess.py", line 487, in run
    output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '('cmd.exe', '/k')' returned non-zero exit status 1.

C:\Users\cloud\work\ungoogled-chromium-windows>

How to solve this?

Kieaer commented 5 years ago

OK, I solve dbghelp.lib not found bug. However, there was an error presumed to be the source's own problem.

[175/175] LINK gn.exe
FAILED: gn.exe
ninja -t msvc -- link.exe /nologo /OUT:gn.exe /PDB:gn.exe.pdb @gn.exe.rsp
base.lib(command_line.obj) : error LNK2001: __imp_CommandLineToArgvW ์™ธ๋ถ€ ๊ธฐํ˜ธ๋ฅผ ํ™•์ธํ•  ์ˆ˜ ์—†์Šต๋‹ˆ๋‹ค.
gn_lib.lib(command_args.obj) : error LNK2001: __imp_ShellExecuteExW ์™ธ๋ถ€ ๊ธฐํ˜ธ๋ฅผ ํ™•์ธํ•  ์ˆ˜ ์—†์Šต๋‹ˆ๋‹ค.
gn.exe : fatal error LNK1120: 2๊ฐœ์˜ ํ™•์ธํ•  ์ˆ˜ ์—†๋Š” ์™ธ๋ถ€ ์ฐธ์กฐ์ž…๋‹ˆ๋‹ค.
ninja: build stopped: subcommand failed.
Traceback (most recent call last):
  File "tools\gn\bootstrap\bootstrap.py", line 142, in <module>
    sys.exit(main(sys.argv[1:]))
  File "tools\gn\bootstrap\bootstrap.py", line 128, in main
    ['ninja', '-C', gn_build_dir, 'gn.exe', '-w', 'dupbuild=err'])
  File "C:\Python27\lib\subprocess.py", line 190, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['ninja', '-C', 'C:\\Users\\cloud\\work\\ungoogled-chromium-windows\\build\\src\\out\\Release\\gn_build', 'gn.exe', '-w', 'dupbuild=err']' returned non-zero exit status 1

C:\Users\cloud\work\ungoogled-chromium-windows\build\src>exit
Traceback (most recent call last):
  File "build.py", line 210, in <module>
    main()
  File "build.py", line 199, in main
    '--skip-generate-buildfiles')
  File "build.py", line 67, in _run_build_process
    **kwargs)
  File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python37_64\lib\subprocess.py", line 487, in run
    output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '('cmd.exe', '/k')' returned non-zero exit status 1.

C:\Users\cloud\work\ungoogled-chromium-windows>

@Eloston After this error, I tried various means, including resetting the PATH and running it directly in Visual Studio, but they all arrived at this error, and I was convinced that this was a 100% source problem. I want the above error to be the key to the solution.

diingus commented 5 years ago

Added flag enable_resource_whitelist_generation=false and got an error similar to #2 (comment) ahhh! I really want to try to use ungoogle-chromium-windows. Maybe there are suggestions on how to move the process forward.

ERROR at //chrome/browser/ui/BUILD.gn:3419:5: Label not in deps.
    allow_circular_includes_from += [
    ^--------------------------------
The label "//chrome/browser/safe_browsing:safe_browsing"
was not in the deps of this target. allow_circular_includes_from only allows
targets present in the deps.
See //build/config/jumbo.gni:279:3: whence it was called.
  internal_jumbo_target(target_name) {
  ^-----------------------------------
See //chrome/browser/ui/BUILD.gn:29:1: whence it was called.
jumbo_split_static_library("ui") {
^---------------------------------
See //chrome/browser/devtools/BUILD.gn:233:7: which caused the file to be included.
      "//chrome/browser/ui",
      ^--------------------

I've had the same errors pop up, and the fix is to just remove the safe_browsing circular deps it fails on.

Currently I'm facing this error:

>"out\Default\gn.exe" "gen" "out\Default" "--fail-on-unused-args"
ERROR Unresolved dependencies.
//chrome/browser/conflicts:module_info(//build/toolchain/win:win_clang_x64)
  needs //chrome/common/safe_browsing:binary_feature_extractor(//build/toolchain/win:win_clang_x64)

It seems trivial, if you know the gn build system. As far as I can tell, safe_browsing cannot be imported, nor can the source/header pair it requires.

A naive approach would be copying the two over to //chrome/browser/conflicts(:module_info) and patching the namespace changes.

diingus commented 5 years ago

I managed getting through the meta-build system by copying the dependency source/header files to chrome\browser\conflicts as module_info_binary_feature_extractor.cc and .h.

I also changed the header guard to CHROME_COMMON_SAFE_BROWSING_BINARY_FEATURE_EXTRACTOR_H_A and the .cc include to #include "chrome/browser/conflicts/module_info_binary_feature_extractor.h",

as well as adding

"module_info_binary_feature_extractor.cc",
"module_info_binary_feature_extractor.h",

in chrome\browser\conflicts\BUILD.gn's sources

This got through to ninja target building (?) This leads to:

In file included from ../../chrome/browser/conflicts/module_info_binary_feature_extractor.cc:5:
In file included from ../..\chrome/browser/conflicts/module_info_binary_feature_extractor.h:19:
In file included from ../..\third_party/protobuf/src/google/protobuf/repeated_field.h:60:
In file included from ../..\third_party/protobuf/src/google/protobuf/stubs/casts.h:36:
../..\third_party/protobuf/src/google/protobuf/stubs/common.h(46,10):  fatal error: 'google/protobuf/stubs/port.h' file not found
#include <google/protobuf/stubs/port.h>
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

The <> includes cannot seem to resolve third_party/protobuf/src/google... header includes, and replacing <google/etc/.../header.h> with "third_party/protobuf/src/google/etc/.../header.h" seems to suppress the errors.

The issue is that this needs to be regex automated since the entire protobuf folder has this issue, it would seem.

TCB13 commented 5 years ago

@diingus thank you for your continuous effort!

diingus commented 5 years ago

After having replaced the foul #includes, this shows up:

../../chrome/browser/conflicts/module_info_binary_feature_extractor.cc(13,10):  fatal error: 'components/safe_browsing/proto/csd.pb.h' file not found
#include "components/safe_browsing/proto/csd.pb.h"
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

There exists a csd.proto file in that folder, it's just that it hasn't been generated. Any help with the issue of proto generation would be appreciated, as I've never touched the subsystem.

diingus commented 5 years ago

After having replaced the foul #includes, this shows up:

../../chrome/browser/conflicts/module_info_binary_feature_extractor.cc(13,10):  fatal error: 'components/safe_browsing/proto/csd.pb.h' file not found
#include "components/safe_browsing/proto/csd.pb.h"
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

There exists a csd.proto file in that folder, it's just that it hasn't been generated. Any help with the issue of proto generation would be appreciated, as I've never touched the subsystem.

Adding

public_deps = [
  "//components/safe_browsing:csd_proto",
]

to chrome\browser\conflicts\BUILD.gn seems to have fixed the issue. Currently compiling.

diingus commented 5 years ago

Adding

public_deps = [
  "//components/safe_browsing:csd_proto",
]

to chrome\browser\conflicts\BUILD.gn seems to have fixed the issue. Currently compiling.

An error cropped up saying chrome\elevation_service\elevation_service_idl.idl hadn't been compiled into a .tlb, which I had to do manually with MIDL. It seems to be a remnant from COM programming and one of Microsoft's many bodges with the Visual C toolkit(s). As such, very little can be found on MSDN about it. MIDL is installed alongisde the Windows SDK, and running vcvars64.bat will get everything you need on your PATH to do midl elevation_service_idl.idl.

After reaching the 9300 job mark, the following happened:

In file included from gen/content/browser/browser_jumbo_15.cc:53:
.\../../content/browser/tracing/tracing_controller_impl.cc(188,8):  error: use of undeclared identifier 'coordinator_'
  if (!coordinator_) {
       ^
.\../../content/browser/tracing/tracing_controller_impl.cc(190,40):  error: use of undeclared identifier 'coordinator_'
        tracing::mojom::kServiceName, &coordinator_);
                                       ^
.\../../content/browser/tracing/tracing_controller_impl.cc(195,3):  error: use of undeclared identifier 'coordinator_'
  coordinator_ = nullptr;
  ^
.\../../content/browser/tracing/tracing_controller_impl.cc(367,3):  error: use of undeclared identifier 'coordinator_'
  coordinator_->StartTracing(
  ^
.\../../content/browser/tracing/tracing_controller_impl.cc(405,5):  error: use of undeclared identifier 'coordinator_'
    coordinator_->StopAndFlush(
    ^
.\../../content/browser/tracing/tracing_controller_impl.cc(411,5):  error: use of undeclared identifier 'coordinator_'
    coordinator_->StopAndFlushAgent(
    ^
.\../../content/browser/tracing/tracing_controller_impl.cc(425,3):  error: use of undeclared identifier 'coordinator_'
  coordinator_->RequestBufferUsage(base::BindOnce(
  ^

Reading the code, coordinator_ appears only in class methods, suggesting it might be referencing this->coordinator_, but this causes

error: no member named 'coordinator_' in 'content::TracingControllerImpl'

EDIT: Adding

tracing::mojom::CoordinatorPtr coordinator_;

to tracing_controller_impl.h fixed it. Might be due to a file version mismatch?

diingus commented 5 years ago

safe_browsing seems to never be compiled, causing this:

LINK(DLL) chrome.dll chrome.dll.lib chrome.dll.pdb
FAILED: chrome.dll chrome.dll.lib chrome.dll.pdb
ninja -t msvc -e environment.x64 -- ../../third_party/llvm-build/Release+Asserts/bin/lld-link.exe /nologo /IMPLIB:./chrome.dll.lib /DLL /OUT:./chrome.dll /PDB:./chrome.dll.pdb @./chrome.dll.rsp
lld-link.exe: error: could not open obj/chrome/browser/safe_browsing/safe_browsing.lib: no such file or directory
tonkku107 commented 5 years ago

Remember that removal of safe browsing is part of ungoogled-chromium

diingus commented 5 years ago

The issues I'm facing so far are that of removing safe browsing integration, it seems. If I were to guess, more was delegated to that module, which hasn't been properly dealt with yet. I'd take a shot at removing references, but I don't feel confident enough or knowledgeable enough to deal with those kinds of edits, especially when it comes to privacy issues.

As it stands, this thread was enough to get me to here.

diingus commented 5 years ago

For those interested, I've gathered the undefined reference errors caused by placing a dummy safe_browsing.lib:

Eloston commented 5 years ago

I did some work on this in d2674a9204ba474b859fd2ddbcd820ad1455ea38. However, the Safe Browsing patch (and the few that follow) still need to be updated. #8 discusses what needs to be done with the Safe Browsing patch.

Eloston commented 5 years ago

Also, make sure to re-read the README. The build requirements have changed, and I've added my workflow for updating patches. Most notably, I dropped Python 2 because Google's working on porting all the Python scripts to Python 3, and it seems the ones we're using might be usable in Python 3. If not, we can cherry-pick changes from upstream.

tangalbert919 commented 5 years ago

And so, the chaos in getting the latest version of Ungoogled Chromium built for Windows continues.

I've managed to get the build started, but expect an error like this:

ERROR at //third_party/protobuf/proto_library.gni:175:48: Array subscript out of range.
    proto_in_dir = get_path_info(proto_sources[0], "dir")
                                               ^
You gave me 0 but the array has no elements.
See //chrome/test/BUILD.gn:4976:3: whence it was called.
  proto_library("test_proto") {
  ^----------------------------
See //BUILD.gn:104:7: which caused the file to be included.
      "//chrome/test:browser_tests",
      ^----------------------------

This is triggered when gn gen is run.

EDIT: Easiest way to fix this is by going into chrome/test/BUILD.gn and removing this at line 4974:

  import("//third_party/protobuf/proto_library.gni")

  proto_library("test_proto") {
    sources = []
  }
tangalbert919 commented 5 years ago

For those who want the latest version of Ungoogled Chromium for Windows (and not version 67), just click here.

With this, the chaos should be over. At least for a while.

Eloston commented 5 years ago

Thanks @tangalbert919! Since this issue is getting pretty long, please open a new issue if there are issues with the update.

r4sas commented 5 years ago

Yeah, thanks, @tangalbert919 :tada:

But I want to ask: have anyone reproduced build and how result works for you? I built with latest changes, but at the end I got that all pages is empty. Settings nor websites is not shown. Context menu (right mouse button) doesn't works too. image Same for prebuilt by @tangalbert919 package.

Eloston commented 5 years ago

@r4sas https://github.com/ungoogled-software/ungoogled-chromium-windows/issues/2#issuecomment-538730326. But yes, this is a pretty serious issue.

ghost commented 5 years ago

For those who want the latest version of Ungoogled Chromium for Windows (and not version 67), just click here.

With this, the chaos should be over. At least for a while.

Unfortunately it crashes on some pages.