Closed TCH68k closed 2 years ago
Open repo for platform you want to build for. (link) First part of the build process is downloading of chromium source and all necessary dependencies and it's all automated as long as you follow instractions on platform repo you chose.
I have already checked these.
I use Debian, but i cannot use that description as they only support latest Debian (10.0 Buster) and i have an older one (9.0 Stretch).
As for the portable Linux, i tried that, but after
wget https://github.com/ungoogled-software/ungoogled-chromium-portablelinux/archive/86.0.4240.183-1.1.tar.gz
untgz 86.0.4240.183-1.1.tar.gz
rm 86.0.4240.183-1.1.tar.gz
cd ungoogled-chromium-portablelinux-86.0.4240.183-1.1/
./build.sh
I only get the message
/build.sh: sor: 16: /media/WORKDISK/r/downloads/ungoogled-chromium-portablelinux-86.0.4240.183-1.1/ungoogled-chromium/utils/downloads.py: No such file or directory
It seems like you are missing the core submodule. Try git update submodule --init
, if its not working try to manually download and extract ungoogled-chromium.
EDIT:
git submodule update --init
is the right command
There is no git involved, i tried to use a source package, because if i follow the git instructions on the portable Linux page
git clone --recurse-submodules https://github.com/ungoogled-software/ungoogled-chromium-portablelinux.git
cd ungoogled-chromium-portablelinux
git checkout --recurse-submodules 86.0.4240.183-1.1
error: unknown option `recurse-submodules'
If i try to do
git checkout 86.0.4240.183-1.1
then it works, but still miss the utils dir. If i try your command
git update submodule --init
Then
git: 'update' is not a git command. See 'git --help'.
Did you mean this?
update-ref
I've already downloaded and extracted the package from that repo, but as i asked in the OP: what then? It has no "build.sh" like the portable Linux repo. What should i do with those files? No manual or guide covers this part.
Sorry, I swapped two commands. It should be git submodule update --init
So inside of ungoogled-chromium-portablelinux
folder you should extract ungoogled-chromium
. Command above should do it automatically.
Ah, i see, now it started to build with these commands:
git clone --recurse-submodules https://github.com/ungoogled-software/ungoogled-chromium-portablelinux.git
cd ungoogled-chromium-portablelinux
git checkout 86.0.4240.183-1.1
git submodule update --init
./build.sh
Please update the building instructions, because the command you've just suggested is missing from it and also
git checkout --recurse-submodules TAG_OR_BRANCH_HERE
should be just
git checkout TAG_OR_BRANCH_HERE
Also, the information about manually extracting ungoogled-chromium
into ungoogled-chromium-portablelinux
is missing from the manual.
Now i am facing a different problem: it needs GTK3 by default. I've checked if i can tweak this by editing ungoogled-chromium-portablelinux/build/src/build/config/linux/gtk/gtk.gni
, but the answer was negative.
It's strange as i have normal Chromium 73.0.3683.75 here, built on GTK2 and that particular file was the same...
How can i force building on GTK2? Or it is fully abandoned, no chance? In that case, can you please tell me what was the last Chromium which was able to build on GTK2?
Okay, i've tried to build with 72.0.3626.122-4.1 which is the earliest ungoogled-chromium i found. But this also have failed to build:
ERROR at //build/config/linux/pkg_config.gni:103:17: Script returned non-zero exit code.
pkgresult = exec_script(pkg_config_script, args, "value")
^----------
Current dir: /media/WORKDISK/r/downloads/ungoogled-chromium-portablelinux/build/src/out/Default/
Command: python /media/WORKDISK/r/downloads/ungoogled-chromium-portablelinux/build/src/build/config/linux/pkg-config.py gmodule-2.0 gtk+-3.0 gthread-2.0
Returned 1.
stderr:
Package gtk+-3.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `gtk+-3.0.pc'
to the PKG_CONFIG_PATH environment variable
No package 'gtk+-3.0' found
Could not run pkg-config.
See //build/config/linux/gtk/BUILD.gn:13:1: whence it was called.
pkg_config("gtk_internal_config") {
^----------------------------------
See //chrome/test/BUILD.gn:3915:15: which caused the file to be included.
deps += [ "//build/config/linux/gtk" ]
^-------------------------
And this is clearly not possible. I have Chromium 73 here which were built upon GTK2 successfully and this was earlier than that. Unfortunately i do not remember how can i force GTK2 build. Can you help me please?
Hello? A bit of help please? Or can you tell me where can i get help about this?
Try add use_gtk3=false
in gn flags.
I've tried that, but it has yielded the very same results: no gtk3 found. This was Chromium 72.0.3626.122-4.1 and here is a Chromium 73.0.3683.75 which uses GTK2: https://debian.pkgs.org/9/debian-main-amd64/chromium_73.0.3683.75-1~deb9u1_amd64.deb.html It must be possible somehow.
I cannot edit my last post and i forgot to post what files i've modified:
echo "use_gtk3=false" >> flags.portable.gn
echo "use_pulseaudio=false" >> flags.portable.gn
echo "use_gtk3=false" >> ungoogled-chromium/flags.gn
echo "use_pulseaudio=false" >> ungoogled-chromium/flags.gn
Okay, it turned out, that the Debian team has patched their Chrome 73. Here are the patches: http://deb.debian.org/debian/pool/main/c/chromium/chromium_73.0.3683.75-1~deb9u1.debian.tar.xz Inside there is a GTK2 patch. However, this patch is for Chromium 73 and there is no Ungoogled-Chromium 73 package in the repo you've suggested. I've tried to build the v75, but that failed.
How can i make the buildscript fetch Chromium 73?
Are you trying to build portable version on Debian? There is a debian repo: https://github.com/ungoogled-software/ungoogled-chromium-debian.
I've already checked this repo, but it only supports Buster (10.0) and i have Stretch (9.0). This portable one would be good, but unfortunately the one version which would be good for me (73.0.3683.75-1) is not available in their repository: https://github.com/ungoogled-software/ungoogled-chromium-portablelinux/releases?after=75.0.3770.100-1.1
After 72.0.3626.122-4.1, there is only 75.0.3770.80-1.1. How can i tell the buildscript to fetch a different chromium? Change the script itself?
Wrong phrasing, and i cannot edit my post... By different chromium, i mean a direct link, or a different repo than the portable's. Or that will not work?
I looked at the Debian repo and it have v73 but only on Buster nad Bionic, so there is no Stretch from beginning unfortunately. I think the best you can do is trying to manually apply the patches in the ofiicial debian repo first and then apply the ungoogled-chromium patches after.
Thanks, that is a great idea, i'll do that. This is the correct dir, right? (https://github.com/Eloston/ungoogled-chromium/tree/master/patches)
Note: if you just need version 73 specifically, you can install GNU Guix and run guix time-machine --commit=821222433ad37fd9a43dd4c7ccb9cef9f9249f6c -- build ungoogled-chromium
(or install
instead of build
, etc).
Guix only has .86 and .103 from the 73.xx releases though (but getting to .75
from there is relatively easy).
Obviously you can also install the latest version with Guix.
@wchen342: Yes, you're right, i almost forgot. Thanks for pointing out.
@mbakke: Thanks for the tip. If i will not manage to build UGC by this two step patching setup, i'll try Guix.
The patching works. I've just patched Chromium 73.0.3683.75 with both the Debian and UGC patches. There were some files which did not exists (i mean anywhere, they were not just misplaced), but aside from that no errors. However, when i tried to build Chromium by following the instructions at this page (https://chromium.googlesource.com/chromium/src/+/master/docs/linux/build_instructions.md), skipping the repository fetching, the build tools refused to build, because it is not a git repository directory. I then tried to do this:
cd /tmp/
git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
export PATH="$PATH:/tmp/depot_tools"
mkdir chromium
cd /tmp/chromium/
fetch --nohooks --no-history chromium
git checkout 73.0.3683.75
gclient sync
gclient runhooks
cp /d/ugc-patches/* ./
for PATCH in *.patch; do patch -p1 < $PATCH; done
rm *.patch
gn gen out/Release "--args=is_debug=false"
autoninja -C out/Default chrome
and it died with various Python error messages before even getting to the patching part.
The question is, is it possible to build Chromium from a release package file instead of a git repo?
The python scripts coming with chromium/google needs python2, and the ungoogled-chromium ones need python3.
If your system has python3 as default, then you need a virtual env or conda environment to run those python2 ones.
Python2 was the default. It seems i've ran out of free space on my RAM disk...
I've put the build on my SSD. Now i have this script.
#!/bin/sh
cd /root
mkdir kocsog_gugli
cd kocsog_gugli
git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
export PATH=$PATH:/root/kocsog_gugli/depot_tools
mkdir chromium
cd chromium/
fetch --nohooks chromium
git checkout 73.0.3683.75
gclient sync
gclient runhooks
gn gen out/Release "--args=is_debug=false"
autoninja -C out/Default chrome
I've tried to run this subscript
cd src
cp /d/ugc-patches/* ./
for PATCH in *.patch; do; patch -p1 -f < $PATCH; done
rm *.patch
cd ..
after the command
gclient runhooks
and the patches which were worked before, failed. Tons of conflicts, failed patches and etc. After which command i should do the patching?
Not sure. Can you poast the complete log?
Never mind that, i just forgot to cd
into src
.
Now i've made up until the building itself, altough i had to tweak a thing or two. The build itself fails with this error message:
[5/39239] CXX obj/base/base/message_pump_libevent.o
FAILED: obj/base/base/message_pump_libevent.o
../../third_party/llvm-build/Release+Asserts/bin/clang++ -MMD -MF obj/base/base/message_pump_libevent.o.d -DUSE_SYMBOLIZE -DUSE_UDEV -DUSE_AURA=1 -DUSE_GLIB=1 -DUSE_NSS_CERTS=1 -DUSE_X11=1 -DFULL_SAFE_BROWSING -DSAFE_BROWSING_CSD -DSAFE_BROWSING_DB_LOCAL -DCHROMIUM_BUILD -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_GNU_SOURCE -DCR_CLANG_REVISION=\"351477-1\" -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS -D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS -DCR_LIBCXX_REVISION=349080 -DCR_LIBCXXABI_REVISION=347903 -D_LIBCPP_ENABLE_NODISCARD -D_LIBCPP_ABI_UNSTABLE -DCR_SYSROOT_HASH=e7c53f04bd88d29d075bfd1f62b073aeb69cbe09 -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -DBASE_IMPLEMENTATION -DGLIB_VERSION_MAX_ALLOWED=GLIB_VERSION_2_32 -DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_26 -I../.. -Igen -fno-strict-aliasing --param=ssp-buffer-size=4 -fstack-protector -Wno-builtin-macro-redefined -D__DATE__= -D__TIME__= -D__TIMESTAMP__= -funwind-tables -fPIC -B../../third_party/binutils/Linux_x64/Release/bin -pthread -fcolor-diagnostics -fmerge-all-constants -Xclang -mllvm -Xclang -instcombine-lower-dbg-declare=0 -no-canonical-prefixes -fcomplete-member-pointers -m64 -march=x86-64 -Wall -Werror -Wextra -Wimplicit-fallthrough -Wthread-safety -Wno-missing-field-initializers -Wno-unused-parameter -Wno-c++11-narrowing -Wno-unneeded-internal-declaration -Wno-undefined-var-template -Wno-ignored-pragma-optimize -fno-omit-frame-pointer -g0 -fvisibility=hidden -Xclang -add-plugin -Xclang find-bad-constructs -Xclang -plugin-arg-find-bad-constructs -Xclang check-ipc -Wheader-hygiene -Wstring-conversion -Wtautological-overlap-compare -Wno-char-subscripts -Wglobal-constructors -Wexit-time-destructors -Wshadow -isystem../../build/linux/debian_sid_amd64-sysroot/usr/include/glib-2.0 -isystem../../build/linux/debian_sid_amd64-sysroot/usr/lib/x86_64-linux-gnu/glib-2.0/include -Wexit-time-destructors -O2 -fno-ident -fdata-sections -ffunction-sections -std=c++14 -fno-exceptions -fno-rtti -nostdinc++ -isystem../../buildtools/third_party/libc++/trunk/include -isystem../../buildtools/third_party/libc++abi/trunk/include --sysroot=../../build/linux/debian_sid_amd64-sysroot -fvisibility-inlines-hidden -c ../../base/message_loop/message_pump_libevent.cc -o obj/base/base/message_pump_libevent.o
../../base/message_loop/message_pump_libevent.cc:17:10: fatal error: 'event.h' file not found
#include <event.h>
^~~~~~~~~
1 error generated.
The problem is, that event.h
is actually inside of /usr/include
and the pkg-config package is also in it's place, yet clang
fails to find it. I've tried to modify CFLAGS
and CPPFLAGS
to no avail.
My script is here:
#!/bin/sh
cd /root
mkdir kocsog_gugli 2>/dev/null
cd kocsog_gugli
echo "Getting depot tools..."
git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
export PATH=$PATH:/root/kocsog_gugli/depot_tools
echo "Getting Chromium source..."
mkdir chromium 2>/dev/null
cd chromium/
fetch --nohooks chromium
echo "Checkout and sync..."
cd src
git checkout 73.0.3683.75
gclient sync -D
# USE FONTCONFIG PATCH FROM UGC AND NOT FROM DEBIAN! The rest of the two patchset can be merged.
echo "Patching..."
cp /d/ugc-patches/* ./
for PATCH in *.patch
do
echo "****************"
echo "* ""$PATCH"
echo "****************"
patch -p1 -f < $PATCH
echo "****************"
echo
done
rm *.patch
sed -i.bak 's/ gtk_version = 3/ gtk_version = 2/g' build/config/linux/gtk/gtk.gni
# Safe browsing patch is erroneous with chrome 73.0.
sed -i.bak '/^static_library("safe_browsing") {/i sources = []' chrome/browser/safe_browsing/BUILD.gn
sed -i.bak '/^static_library("safe_browsing") {/i deps = []' chrome/browser/safe_browsing/BUILD.gn
echo "Generating..."
export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/lib/x86_64-linux-gnu/pkgconfig/
gn gen out/Release "--args=is_debug=false"
echo "Build..."
autoninja -C out/Release chrome
#TODO: package
I think ninja
doesn't use pkg_config
. I faced similar problems before but they are hard to solve. Everytime it requires a different solution. In this case the quickiest way is probably just copy the file into src folder and modify the .cc
and .gn
files accordingly.
I think ninja
does use pkg_config
, that is why i had to modify $PKG_CONFIG_PATH
before generating, because it did not find libopenjp2.pc
.
I tried your suggestion to change #include <event.h>
to `#include "event.h" and copy it into the dir. The result is this:
[2/39203] CXX obj/base/base/message_pump_libevent.o
FAILED: obj/base/base/message_pump_libevent.o
../../third_party/llvm-build/Release+Asserts/bin/clang++ -MMD -MF obj/base/base/message_pump_libevent.o.d -DUSE_SYMBOLIZE -DUSE_UDEV -DUSE_AURA=1 -DUSE_GLIB=1 -DUSE_NSS_CERTS=1 -DUSE_X11=1 -DFULL_SAFE_BROWSING -DSAFE_BROWSING_CSD -DSAFE_BROWSING_DB_LOCAL -DCHROMIUM_BUILD -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_GNU_SOURCE -DCR_CLANG_REVISION=\"351477-1\" -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS -D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS -DCR_LIBCXX_REVISION=349080 -DCR_LIBCXXABI_REVISION=347903 -D_LIBCPP_ENABLE_NODISCARD -D_LIBCPP_ABI_UNSTABLE -DCR_SYSROOT_HASH=e7c53f04bd88d29d075bfd1f62b073aeb69cbe09 -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -DBASE_IMPLEMENTATION -DGLIB_VERSION_MAX_ALLOWED=GLIB_VERSION_2_32 -DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_26 -I../.. -Igen -fno-strict-aliasing --param=ssp-buffer-size=4 -fstack-protector -Wno-builtin-macro-redefined -D__DATE__= -D__TIME__= -D__TIMESTAMP__= -funwind-tables -fPIC -B../../third_party/binutils/Linux_x64/Release/bin -pthread -fcolor-diagnostics -fmerge-all-constants -Xclang -mllvm -Xclang -instcombine-lower-dbg-declare=0 -no-canonical-prefixes -fcomplete-member-pointers -m64 -march=x86-64 -Wall -Werror -Wextra -Wimplicit-fallthrough -Wthread-safety -Wno-missing-field-initializers -Wno-unused-parameter -Wno-c++11-narrowing -Wno-unneeded-internal-declaration -Wno-undefined-var-template -Wno-ignored-pragma-optimize -fno-omit-frame-pointer -g0 -fvisibility=hidden -Xclang -add-plugin -Xclang find-bad-constructs -Xclang -plugin-arg-find-bad-constructs -Xclang check-ipc -Wheader-hygiene -Wstring-conversion -Wtautological-overlap-compare -Wno-char-subscripts -Wglobal-constructors -Wexit-time-destructors -Wshadow -isystem../../build/linux/debian_sid_amd64-sysroot/usr/include/glib-2.0 -isystem../../build/linux/debian_sid_amd64-sysroot/usr/lib/x86_64-linux-gnu/glib-2.0/include -Wexit-time-destructors -O2 -fno-ident -fdata-sections -ffunction-sections -std=c++14 -fno-exceptions -fno-rtti -nostdinc++ -isystem../../buildtools/third_party/libc++/trunk/include -isystem../../buildtools/third_party/libc++abi/trunk/include --sysroot=../../build/linux/debian_sid_amd64-sysroot -fvisibility-inlines-hidden -c ../../base/message_loop/message_pump_libevent.cc -o obj/base/base/message_pump_libevent.o
In file included from ../../base/message_loop/message_pump_libevent.cc:17:
../../base/message_loop/event.h:44:10: fatal error: 'event2/event-config.h' file not found
#include <event2/event-config.h>
^~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
It seems, ninja
simply does not see /usr/include
at all.
That's strange. What if you try to run the clang command separately in the terminal? And also run it with environment variables?
Okay, i tried. First it gave me an error:
error: unable to open output file 'obj/base/base/message_pump_libevent.o': 'No
such file or directory'
1 error generated.
Then i've ran ln -s ../../out/Release/obj obj
and tried it again, with the following result:
In file included from ../../base/message_loop/message_pump_libevent.cc:5:
In file included from ../../base/message_loop/message_pump_libevent.h:13:
In file included from ../../base/message_loop/watchable_io_message_pump_posix.h:8:
../../base/location.h:14:10: fatal error: 'base/debug/debugging_buildflags.h'
file not found
#include "base/debug/debugging_buildflags.h"
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
Then i've ran ln -s ../../out/Release/gen/base/debug/debugging_buildflags.h ../debug/debugging_buildflags.h
and tried it yet again, only to get the first message again:
../../base/message_loop/message_pump_libevent.cc:17:10: fatal error: 'event.h'
file not found
#include <event.h>
^~~~~~~~~
1 error generated.
This custom clang
what the builder had downloaded is simply do not see /usr/include
at all. If i added -I/usr/include
to the command by hand, then it has finally found event.h
, but yielded a lot of other errors about missing macros (probably because this should be ran from the building environment and not by hand). However, i have no idea how can i force this build environment to add -I/usr/include
to all clang
calls...
What do you mean by /"run it with environment variables"/? CPPFLAGS
and CFLAGS
? I've already tried that. Or something else?
From your description it seems ninja
is not passing whatever you set on command line to clang++
. You can try this:
Open src/build/config/compiler/BUILD.gn
, find around line 200+ there are a set of variables. They are named cflags
, cflags_cc
, ldflags
and so on. Parameters set here are passed to the corresponding compiler/linkers when ninja
calls them, so try adding whatever worked for you (-I/usr/include
?) to the corresponding list.
Okay, i tried that. I've changed line #207 from cflags = []
to cflags = [ "-I/usr/include" ]
which got me a ton of errors, starting with this:
In file included from ../../third_party/tcmalloc/gperftools-2.0/chromium/src/thread_cache.cc:34:
In file included from ../../third_party/tcmalloc/gperftools-2.0/chromium/src/thread_cache.h:51:
In file included from ../../third_party/tcmalloc/gperftools-2.0/chromium/src/static_vars.h:42:
In file included from ../../third_party/tcmalloc/gperftools-2.0/chromium/src/page_heap.h:41:
In file included from ../../third_party/tcmalloc/gperftools-2.0/chromium/src/gperftools/malloc_extension.h:53:
In file included from ../../buildtools/third_party/libc++/trunk/include/vector:272:
In file included from ../../buildtools/third_party/libc++/trunk/include/climits:42:
In file included from /usr/include/limits.h:123:
In file included from ../../buildtools/third_party/libc++/trunk/include/limits.h:58:
In file included from ../../third_party/llvm-build/Release+Asserts/lib/clang/9.0.0/include/limits.h:37:
../../build/linux/debian_sid_amd64-sysroot/usr/include/limits.h:145:5: error: function-like macro '__GLIBC_USE' is not defined
#if __GLIBC_USE (IEC_60559_BFP_EXT)
^
1 error generated.
And i have no idea what is that macro and why is it not set. I've found it here (https://chromium.googlesource.com/native_client/nacl-glibc/+/ng/master/include/features.h), but when i tried to declare it from command line as the way it was declared in the header, it did not worked out, it just got me more errors.
Something does not seem right. It seems gn
has been configured to use sysroot
. Can you check the GN flags using gn args --list {output_folder_path}
?
Also that cannot come from nacl
. It should be disabled in UC.
I've ran gn args --list out/Release/ > ninja.settings
and here is the file: http://oscomp.hu/depot/ninja.settings
Yeah you have use_sysroot=true
. I am not exactly sure whether Debian needs sysroot
but on other linux I used (Andoird, Arch, Fedora) ususally this is turned off. Maybe try adding use_sysroot=false
and see whether things change.
I've changed it to false
. Removed the -I/usr/include
from build/config/compiler/BUILD.gn
and restarted the build. It turned out that i need gnome-keyring. I've disabled that too and restarted the build again. Now it seems to be finally building. However after roughly 200 built objects:
[208/39481] CXX obj/base/base/message_loop.o
FAILED: obj/base/base/message_loop.o
../../third_party/llvm-build/Release+Asserts/bin/clang++ -MMD -MF obj/base/base/message_loop.o.d -DUSE_SYMBOLIZE -DUSE_UDEV -DUSE_AURA=1 -DUSE_GLIB=1 -DUSE_NSS_CERTS=1 -DUSE_X11=1 -DFULL_SAFE_BROWSING -DSAFE_BROWSING_CSD -DSAFE_BROWSING_DB_LOCAL -DCHROMIUM_BUILD -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_GNU_SOURCE -DCR_CLANG_REVISION=\"351477-1\" -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS -D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS -DCR_LIBCXX_REVISION=349080 -DCR_LIBCXXABI_REVISION=347903 -D_LIBCPP_ENABLE_NODISCARD -D_LIBCPP_ABI_UNSTABLE -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -DBASE_IMPLEMENTATION -DGLIB_VERSION_MAX_ALLOWED=GLIB_VERSION_2_32 -DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_26 -I../.. -Igen -fno-strict-aliasing --param=ssp-buffer-size=4 -fstack-protector -Wno-builtin-macro-redefined -D__DATE__= -D__TIME__= -D__TIMESTAMP__= -funwind-tables -fPIC -B../../third_party/binutils/Linux_x64/Release/bin -pthread -fcolor-diagnostics -fmerge-all-constants -Xclang -mllvm -Xclang -instcombine-lower-dbg-declare=0 -no-canonical-prefixes -fcomplete-member-pointers -m64 -march=x86-64 -Wall -Werror -Wextra -Wimplicit-fallthrough -Wthread-safety -Wno-missing-field-initializers -Wno-unused-parameter -Wno-c++11-narrowing -Wno-unneeded-internal-declaration -Wno-undefined-var-template -Wno-ignored-pragma-optimize -fno-omit-frame-pointer -g0 -fvisibility=hidden -Xclang -add-plugin -Xclang find-bad-constructs -Xclang -plugin-arg-find-bad-constructs -Xclang check-ipc -Wheader-hygiene -Wstring-conversion -Wtautological-overlap-compare -Wno-char-subscripts -Wglobal-constructors -Wexit-time-destructors -Wshadow -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -Wexit-time-destructors -O2 -fno-ident -fdata-sections -ffunction-sections -std=c++14 -fno-exceptions -fno-rtti -nostdinc++ -isystem../../buildtools/third_party/libc++/trunk/include -isystem../../buildtools/third_party/libc++abi/trunk/include -fvisibility-inlines-hidden -c ../../base/message_loop/message_loop.cc -o obj/base/base/message_loop.o
../../base/message_loop/message_loop.cc:223:11: error: no matching constructor for initialization of 'sequence_manager::SequenceManager::Settings'
sequence_manager::SequenceManager::Settings{.message_loop_type =
^ ~~~~~~~~~~~~~~~~~~~~~
../../base/task/sequence_manager/sequence_manager.h:64:5: note: candidate constructor not viable: cannot convert argument of incomplete type 'void' to 'bool' for 1st argument
Settings(bool randomise):randomised_sampling_enabled(randomise) {}
^
../../base/task/sequence_manager/sequence_manager.h:67:5: note: candidate constructor not viable: cannot convert argument of incomplete type 'void' to 'base::sequence_manager::SequenceManager::Settings' for 1st argument
Settings(Settings&& move_from) noexcept = default;
^
../../base/task/sequence_manager/sequence_manager.h:73:30: note: candidate constructor not viable: cannot convert argument of incomplete type 'void' to 'const base::sequence_manager::SequenceManager::Settings' for 1st argument
DISALLOW_COPY_AND_ASSIGN(Settings);
^
../../base/macros.h:22:17: note: expanded from macro 'DISALLOW_COPY_AND_ASSIGN'
DISALLOW_COPY(TypeName); \
^
../../base/macros.h:15:3: note: expanded from macro 'DISALLOW_COPY'
TypeName(const TypeName&) = delete
^
../../base/task/sequence_manager/sequence_manager.h:63:5: note: candidate constructor not viable: requires 0 arguments, but 1 was provided
Settings() = default;
^
1 error generated.
Something is too old in my system?
There is a problem in the code. Check whether a patch modified those files, if not try manually fix the argument problem. The real problem shall be the first two errors, the others ones are triggered by the previous ones.
Yes, this patch (http://oscomp.hu/depot/designated-initializers.patch) from the Debian patchset modified base/task/sequence_manager/sequence_manager.h
. Shall i revoke the patch, or is it needed?
The patch itself is to fix a compiling problem with GCC6. I think your system shall have something newer than that? It won't affect functionality anyway so just try removing it and see whether that works.
Well, my system has GCC6 as the base compiler, that's why the Debian patch must have contain it. Of course, i have a newer compiler too (7.3.0), but is not Chromium built by the CLang binary it downloaded?
Anyway, i have downloaded this: https://chromium.googlesource.com/chromium/src/+/refs/tags/73.0.3683.75/base/task/sequence_manager/sequence_manager.h And replaced the file with it. (The difference between them is that constructor line, what the patch have been added, so it's matched.) And restarted the build.
Now it had gotten to nearly 3000 files, then crashed again, but this time not by a source or a configuration error:
[2924/39268] ACTION //mojo/public/js:b...ite(//build/toolchain/linux:clang_x64)
FAILED: gen/mojo/public/js/mojo_bindings_lite.js
python ../../third_party/closure_compiler/js_binary.py --compiler ../../third_party/closure_compiler/compiler/compiler.jar --output gen/mojo/public/js/mojo_bindings_lite.js --deps gen/mojo/public/js/bindings_lite_sources.js_library --sources ../../mojo/public/js/bindings_lite.js --flags jscomp_error=accessControls jscomp_error=ambiguousFunctionDecl jscomp_error=checkTypes jscomp_error=checkVars jscomp_error=constantProperty jscomp_error=deprecated jscomp_error=externsValidation jscomp_error=globalThis jscomp_error=invalidCasts jscomp_error=missingProperties jscomp_error=missingReturn jscomp_error=nonStandardJsDocs jscomp_error=suspiciousCode jscomp_error=undefinedNames jscomp_error=undefinedVars jscomp_error=unknownDefines jscomp_error=uselessCode jscomp_error=visibility compilation_level=ADVANCED_OPTIMIZATIONS language_in=ECMASCRIPT_2017 language_out=ECMASCRIPT5_STRICT generate_exports --externs ../../third_party/closure_compiler/externs/chrome.js ../../third_party/closure_compiler/externs/polymer-1.0.js ../../third_party/closure_compiler/externs/mojo_core.js ../../third_party/closure_compiler/externs/pending.js
/bin/sh: 1: java: not found
I have both Oracle's JDK and the OpenJDK installed, but indeed, /bin/java
does not exists. However i do not understand why does it need it all; the ninja settings tells me, that the only part which can need Java is closure_compile
which is disabled by default and i had not enabled it.
Should i make some symlinks for the installed Java runtimes? Or should i set it somewhere? The ninja settings did not tell me about any Java stuff...
Well, my system has GCC6 as the base compiler
Yes but you are compiling with clang
so that doesn't apply.
Linking javaj binary is a quick fix. But the command is from closure compiler so it seems it is not completely disabled. Maybe check your flags?
At ui/webui/webui_features.gni:14
:
closure_compile = is_chromeos || is_linux || is_android
You were right. It is enabled, since it is Linux. But why did it reported as disabled...? Anyway i had it disabled. After restarting, it crashed here first:
[1084/36338] CXX newlib_pnacl_nonsfi/obj/base/base/time.o
FAILED: newlib_pnacl_nonsfi/obj/base/base/time.o
../../native_client/toolchain/linux_x86/pnacl_newlib/bin/pnacl-clang++ -MMD -MF newlib_pnacl_nonsfi/obj/base/base/time.o.d -DNACL_TC_REV=b48266b051f596802addff7c8d1fc6fb9cf6bea7 -DNO_TCMALLOC -DFULL_SAFE_BROWSING -DSAFE_BROWSING_CSD -DSAFE_BROWSING_DB_LOCAL -DCHROMIUM_BUILD -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_GNU_SOURCE -DCR_CLANG_REVISION=\"351477-1\" -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D_FORTIFY_SOURCE=2 -DNDEBUG -DNVALGRIND -DBASE_IMPLEMENTATION -I../../native_client/src/public/linux_syscalls -I../.. -Inewlib_pnacl_nonsfi/gen -fno-strict-aliasing -Wno-builtin-macro-redefined -D__DATE__= -D__TIME__= -D__TIMESTAMP__= -fcolor-diagnostics -fmerge-all-constants -U__STRICT_ANSI__ --pnacl-allow-translate -arch x86-32-nonsfi --pnacl-bias=x86-32-nonsfi --target=i686-unknown-nacl -Wall -Werror -Wextra -Wimplicit-fallthrough -Wthread-safety -Wno-missing-field-initializers -Wno-unused-parameter -Wno-c++11-narrowing -Wno-unneeded-internal-declaration -fomit-frame-pointer -g0 -fvisibility=hidden -Wno-char-subscripts -Wglobal-constructors -Wexit-time-destructors -Wexit-time-destructors -O2 -fno-ident -fdata-sections -ffunction-sections -std=c++14 -fno-exceptions -fno-rtti -fvisibility-inlines-hidden -c ../../base/time/time.cc -o newlib_pnacl_nonsfi/obj/base/base/time.o
../../base/time/time.cc:17:10: fatal error: 'nspr/prtime.h' file not found
#include <nspr/prtime.h>
^
1 error generated.
Again, this file does exist. However, you said nacl should be disabled and it is enabled in the settings. Should i disable it now?
I continued the build, despite the error and it continued. Then it crashed because libpci-dev
was not installed and use_libpci
was true, but that was solved by the install. Then it has shown this error:
[854/33875] ACTION //third_party/angle...per(//build/toolchain/linux:clang_x64)
ninja: build stopped: subcommand failed.
root@Csabi:~/kocsog_gugli/chromium/src# autoninja -C out/Release chrome
ninja: Entering directory `out/Release'
[13/33022] CXX obj/third_party/breakpad/client/string_conversion.o
FAILED: obj/third_party/breakpad/client/string_conversion.o
../../third_party/llvm-build/Release+Asserts/bin/clang++ -MMD -MF obj/third_party/breakpad/client/string_conversion.o.d -DUSE_UDEV -DUSE_AURA=1 -DUSE_GLIB=1 -DUSE_NSS_CERTS=1 -DUSE_X11=1 -DFULL_SAFE_BROWSING -DSAFE_BROWSING_CSD -DSAFE_BROWSING_DB_LOCAL -DCHROMIUM_BUILD -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_GNU_SOURCE -DCR_CLANG_REVISION=\"351477-1\" -D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS -D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS -DCR_LIBCXX_REVISION=349080 -DCR_LIBCXXABI_REVISION=347903 -D_LIBCPP_ENABLE_NODISCARD -D_LIBCPP_ABI_UNSTABLE -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -I../../third_party/breakpad -I../../third_party/breakpad/breakpad/src -I../../third_party/breakpad/breakpad/src/client -I../../third_party/breakpad/breakpad/src/third_party/linux/include -I../.. -Igen -I../../third_party/breakpad/breakpad/src -fno-strict-aliasing --param=ssp-buffer-size=4 -fstack-protector -Wno-builtin-macro-redefined -D__DATE__= -D__TIME__= -D__TIMESTAMP__= -funwind-tables -fPIC -B../../third_party/binutils/Linux_x64/Release/bin -pthread -fcolor-diagnostics -fmerge-all-constants -Xclang -mllvm -Xclang -instcombine-lower-dbg-declare=0 -no-canonical-prefixes -fcomplete-member-pointers -m64 -march=x86-64 -O2 -fno-ident -fdata-sections -ffunction-sections -fno-omit-frame-pointer -g0 -fvisibility=hidden -Xclang -add-plugin -Xclang find-bad-constructs -Xclang -plugin-arg-find-bad-constructs -Xclang check-ipc -Wheader-hygiene -Wstring-conversion -Wtautological-overlap-compare -Werror -Wall -Wno-unused-variable -Wno-missing-field-initializers -Wno-unused-parameter -Wno-c++11-narrowing -Wno-unneeded-internal-declaration -Wno-undefined-var-template -Wno-ignored-pragma-optimize -std=c++14 -fno-exceptions -fno-rtti -nostdinc++ -isystem../../buildtools/third_party/libc++/trunk/include -isystem../../buildtools/third_party/libc++abi/trunk/include -fvisibility-inlines-hidden -c ../../third_party/breakpad/breakpad/src/common/string_conversion.cc -o obj/third_party/breakpad/client/string_conversion.o
../../third_party/breakpad/breakpad/src/common/string_conversion.cc:63:24: error: unused function 'Swap' [-Werror,-Wunused-function]
static inline uint16_t Swap(uint16_t value) {
^
1 error generated.
How can this be bypassed, that it fails on a warning of an unused function? Should i remove the function by hand?
enable_nacl=false
is in the UC flags.gn
, are you using the correct tag of UC?
Also I am not sure why Werror
is enabled there. Try search in the compiler gn file and see whether it is added somewhere.
I am using the old v73 tag, as you suggested above: https://github.com/Eloston/ungoogled-chromium/tree/73.0.3683.103-2/patches
I do not have any flags.gn
. (Actually, i have one, which i have created to put use_gtk3=false
into it, but that was not part of the package...)
I just have downloaded the Chromium v73 sources, applied the patches from both UGC and Debian and now i am trying to build it.
Currently this is my buildscript:
#!/bin/sh
cd $HOME
mkdir kocsog_gugli 2>/dev/null
cd kocsog_gugli
echo "Getting depot tools..."
git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
export PATH=$PATH:"$HOME/kocsog_gugli/depot_tools"
echo "Getting Chromium source..."
mkdir chromium 2>/dev/null
cd chromium/
fetch --nohooks chromium
freemem
echo "Checkout and sync..."
cd src
git checkout 73.0.3683.75
gclient sync -D
freemem
# Use the "fontconfig.patch" from UGC and not from Debian. The rest of the two patchset can be merged.
echo "Patching..."
cp /d/ugc-patches/* ./
for PATCH in *.patch
do
echo "****************"
echo "* ""$PATCH"
echo "****************"
patch -p1 -f < $PATCH
echo "****************"
echo
done
rm *.patch
# Disable gtk3, use gtk2.
sed -i.bak 's/ gtk_version = 3/ gtk_version = 2/g' build/config/linux/gtk/gtk.gni
# Disable pulseaudio, use alsa.
sed -i.bak 's/ use_pulseaudio = true/ use_pulseaudio = false/g' media/media_options.gni
# Disable sysroot.
sed -i.bak 's/ use_sysroot = current_cpu == "x86" || current_cpu == "x64" ||/ use_sysroot = false \&\&/g' build/config/sysroot.gni
# Disable gnome-keyring.
sed -i.bak 's/ use_gnome_keyring = is_desktop_linux && use_glib/ use_gnome_keyring = false/g' components/os_crypt/features.gni
# Safe browsing patch is erroneous with chrome 73.0.
sed -i.bak '/^static_library("safe_browsing") {/i sources = []\n deps = []' chrome/browser/safe_browsing/BUILD.gn
# Designated initializers patch is erroneous with the bundled CLang 9.
sed -i.bak 's/ Settings(bool randomise):randomised_sampling_enabled(randomise) {}//g' base/task/sequence_manager/sequence_manager.h
# Force disabling "closure_compile".
sed -i.bak 's/ closure_compile = is_chromeos || is_linux || is_android/ closure_compile = false/g' ui/webui/webui_features.gni
# Hand-patch string_conversion.cc for unused function.
sed -i.bak 's/static inline uint16_t Swap(uint16_t value) {//g; s/ return (value >> 8) | static_cast<uint16_t>(value << 8);//g; s/} \/\/ namespace google_breakpad//g;' third_party/breakpad/breakpad/src/common/string_conversion.cc
# Disable nacl by hand.
sed -i.bak 's/ enable_nacl =/ enable_nacl = false \&\&/g' components/nacl/features.gni
echo "Generating..."
export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/lib/x86_64-linux-gnu/pkgconfig/
gn gen out/Release "--args=is_debug=false"
echo "Build..."
autoninja -C out/Release chrome
#TODO: package
Of course, now i am only repeating autoninja -C out/Release chrome
.
For now, i have removed that function what caused the warning. If i'll run into similar errors, then i'll go deeper.
I cross my fingers as it seems to be working, at least for now. It's over 4000 built object and it still OK. I'll report back with new errors if i encounter any new, or with the success. Thank you very much for your help, i really appreciate it.
Spoke too soon...
[5303/30379] CXX obj/third_party/webrt...coding/webrtc_vp8/libvpx_vp8_decoder.o
FAILED: obj/third_party/webrtc/modules/video_coding/webrtc_vp8/libvpx_vp8_decoder.o
../../third_party/llvm-build/Release+Asserts/bin/clang++ -MMD -MF obj/third_party/webrtc/modules/video_coding/webrtc_vp8/libvpx_vp8_decoder.o.d -DUSE_UDEV -DUSE_AURA=1 -DUSE_GLIB=1 -DUSE_NSS_CERTS=1 -DUSE_X11=1 -DFULL_SAFE_BROWSING -DSAFE_BROWSING_CSD -DSAFE_BROWSING_DB_LOCAL -DCHROMIUM_BUILD -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_GNU_SOURCE -DCR_CLANG_REVISION=\"351477-1\" -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS -D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS -DCR_LIBCXX_REVISION=349080 -DCR_LIBCXXABI_REVISION=347903 -D_LIBCPP_ENABLE_NODISCARD -D_LIBCPP_ABI_UNSTABLE -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -DWEBRTC_ENABLE_PROTOBUF=1 -DRTC_ENABLE_VP9 -DHAVE_SCTP -DENABLE_EXTERNAL_AUTH -DHAVE_WEBRTC_VIDEO -DHAVE_WEBRTC_VOICE -DLOGGING_INSIDE_WEBRTC -DWEBRTC_LIBRARY_IMPL -DWEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS=0 -DWEBRTC_CHROMIUM_BUILD -DWEBRTC_POSIX -DWEBRTC_LINUX -DABSL_ALLOCATOR_NOTHROW=1 -DGLIB_VERSION_MAX_ALLOWED=GLIB_VERSION_2_32 -DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_26 -I../.. -Igen -I../../third_party/webrtc_overrides -I../../third_party/webrtc -Igen/third_party/webrtc -I../../third_party/abseil-cpp -I../../third_party/libyuv/include -I../../third_party/libvpx/source/libvpx -fno-strict-aliasing --param=ssp-buffer-size=4 -fstack-protector -Wno-builtin-macro-redefined -D__DATE__= -D__TIME__= -D__TIMESTAMP__= -funwind-tables -fPIC -B../../third_party/binutils/Linux_x64/Release/bin -pthread -fcolor-diagnostics -fmerge-all-constants -Xclang -mllvm -Xclang -instcombine-lower-dbg-declare=0 -no-canonical-prefixes -fcomplete-member-pointers -m64 -march=x86-64 -Wall -Werror -Wextra -Wimplicit-fallthrough -Wthread-safety -Wno-missing-field-initializers -Wno-unused-parameter -Wno-c++11-narrowing -Wno-unneeded-internal-declaration -Wno-undefined-var-template -Wno-ignored-pragma-optimize -O2 -fno-ident -fdata-sections -ffunction-sections -fno-omit-frame-pointer -g0 -fvisibility=hidden -Xclang -add-plugin -Xclang find-bad-constructs -Xclang -plugin-arg-find-bad-constructs -Xclang check-ipc -Wheader-hygiene -Wstring-conversion -Wtautological-overlap-compare -Wexit-time-destructors -Wglobal-constructors -Wno-shorten-64-to-32 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -std=c++14 -fno-exceptions -fno-rtti -nostdinc++ -isystem../../buildtools/third_party/libc++/trunk/include -isystem../../buildtools/third_party/libc++abi/trunk/include -fvisibility-inlines-hidden -c ../../third_party/webrtc/modules/video_coding/codecs/vp8/libvpx_vp8_decoder.cc -o obj/third_party/webrtc/modules/video_coding/webrtc_vp8/libvpx_vp8_decoder.o
../../third_party/webrtc/modules/video_coding/codecs/vp8/libvpx_vp8_decoder.cc:266:77: error: variable 'qp' is uninitialized when used here [-Werror,-Wuninitialized]
ret = ReturnFrame(img, input_image.Timestamp(), input_image.ntp_time_ms_, qp,
^~
../../third_party/webrtc/modules/video_coding/codecs/vp8/libvpx_vp8_decoder.cc:265:9: note: initialize the variable 'qp' to silence this warning
int qp;
^
= 0
1 error generated.
For one last time, i've suppressed the warning by initialize the variable by hand. If one more occurs, then i think the -Werror
should be removed, because it's not a good idea to edit all those warning generating snippets by hand.
No such luck...
[63/25068] CXX obj/third_party/webrtc/...les/video_coding/webrtc_vp9/vp9_impl.o
FAILED: obj/third_party/webrtc/modules/video_coding/webrtc_vp9/vp9_impl.o
../../third_party/llvm-build/Release+Asserts/bin/clang++ -MMD -MF obj/third_party/webrtc/modules/video_coding/webrtc_vp9/vp9_impl.o.d -DUSE_UDEV -DUSE_AURA=1 -DUSE_GLIB=1 -DUSE_NSS_CERTS=1 -DUSE_X11=1 -DFULL_SAFE_BROWSING -DSAFE_BROWSING_CSD -DSAFE_BROWSING_DB_LOCAL -DCHROMIUM_BUILD -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_GNU_SOURCE -DCR_CLANG_REVISION=\"351477-1\" -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS -D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS -DCR_LIBCXX_REVISION=349080 -DCR_LIBCXXABI_REVISION=347903 -D_LIBCPP_ENABLE_NODISCARD -D_LIBCPP_ABI_UNSTABLE -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -DWEBRTC_ENABLE_PROTOBUF=1 -DRTC_ENABLE_VP9 -DHAVE_SCTP -DENABLE_EXTERNAL_AUTH -DHAVE_WEBRTC_VIDEO -DHAVE_WEBRTC_VOICE -DLOGGING_INSIDE_WEBRTC -DWEBRTC_LIBRARY_IMPL -DWEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS=0 -DWEBRTC_CHROMIUM_BUILD -DWEBRTC_POSIX -DWEBRTC_LINUX -DABSL_ALLOCATOR_NOTHROW=1 -DGLIB_VERSION_MAX_ALLOWED=GLIB_VERSION_2_32 -DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_26 -DNO_MAIN_THREAD_WRAPPING -I../.. -Igen -I../../third_party/webrtc_overrides -I../../third_party/webrtc -Igen/third_party/webrtc -I../../third_party/abseil-cpp -I../../third_party/libyuv/include -I../../third_party/libvpx/source/libvpx -fno-strict-aliasing --param=ssp-buffer-size=4 -fstack-protector -Wno-builtin-macro-redefined -D__DATE__= -D__TIME__= -D__TIMESTAMP__= -funwind-tables -fPIC -B../../third_party/binutils/Linux_x64/Release/bin -pthread -fcolor-diagnostics -fmerge-all-constants -Xclang -mllvm -Xclang -instcombine-lower-dbg-declare=0 -no-canonical-prefixes -fcomplete-member-pointers -m64 -march=x86-64 -Wall -Werror -Wextra -Wimplicit-fallthrough -Wthread-safety -Wno-missing-field-initializers -Wno-unused-parameter -Wno-c++11-narrowing -Wno-unneeded-internal-declaration -Wno-undefined-var-template -Wno-ignored-pragma-optimize -O2 -fno-ident -fdata-sections -ffunction-sections -fno-omit-frame-pointer -g0 -fvisibility=hidden -Xclang -add-plugin -Xclang find-bad-constructs -Xclang -plugin-arg-find-bad-constructs -Xclang check-ipc -Wheader-hygiene -Wstring-conversion -Wtautological-overlap-compare -Wexit-time-destructors -Wglobal-constructors -Wno-shorten-64-to-32 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -std=c++14 -fno-exceptions -fno-rtti -nostdinc++ -isystem../../buildtools/third_party/libc++/trunk/include -isystem../../buildtools/third_party/libc++abi/trunk/include -fvisibility-inlines-hidden -c ../../third_party/webrtc/modules/video_coding/codecs/vp9/vp9_impl.cc -o obj/third_party/webrtc/modules/video_coding/webrtc_vp9/vp9_impl.o
../../third_party/webrtc/modules/video_coding/codecs/vp9/vp9_impl.cc:45:9: error: unused variable 'kRefBufIdx' [-Werror,-Wunused-variable]
uint8_t kRefBufIdx[4] = {0, 0, 0, 1};
^
../../third_party/webrtc/modules/video_coding/codecs/vp9/vp9_impl.cc:46:9: error: unused variable 'kUpdBufIdx' [-Werror,-Wunused-variable]
uint8_t kUpdBufIdx[4] = {0, 0, 1, 0};
^
../../third_party/webrtc/modules/video_coding/codecs/vp9/vp9_impl.cc:51:11: error: unused variable 'kMaxAllowedPidDIff' [-Werror,-Wunused-const-variable]
const int kMaxAllowedPidDIff = 8;
^
3 errors generated.
build/config/compiler/BUILD.gn
contains several -Werror
which only works because there is a variable treat_warnings_as_errors
which is true. I've disabled it and now continuing the build.
A typecast error:
[10987/32508] CXX obj/components/url_f...tter/url_formatter/idn_spoof_checker.o
FAILED: obj/components/url_formatter/url_formatter/idn_spoof_checker.o
../../third_party/llvm-build/Release+Asserts/bin/clang++ -MMD -MF obj/components/url_formatter/url_formatter/idn_spoof_checker.o.d -DUSE_UDEV -DUSE_AURA=1 -DUSE_GLIB=1 -DUSE_NSS_CERTS=1 -DUSE_X11=1 -DFULL_SAFE_BROWSING -DSAFE_BROWSING_CSD -DSAFE_BROWSING_DB_LOCAL -DCHROMIUM_BUILD -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_GNU_SOURCE -DCR_CLANG_REVISION=\"351477-1\" -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS -D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS -DCR_LIBCXX_REVISION=349080 -DCR_LIBCXXABI_REVISION=347903 -D_LIBCPP_ENABLE_NODISCARD -D_LIBCPP_ABI_UNSTABLE -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -DGLIB_VERSION_MAX_ALLOWED=GLIB_VERSION_2_32 -DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_26 -DWEBP_EXTERN=extern -DENABLE_IPC_FUZZER -DU_USING_ICU_NAMESPACE=0 -DU_ENABLE_DYLOAD=0 -DUSE_CHROMIUM_ICU=1 -DU_STATIC_IMPLEMENTATION -DICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_FILE -DUCHAR_TYPE=uint16_t -DGOOGLE_PROTOBUF_NO_RTTI -DGOOGLE_PROTOBUF_NO_STATIC_INITIALIZER -DHAVE_PTHREAD -DSK_HAS_PNG_LIBRARY -DSK_HAS_WEBP_LIBRARY -DSK_HAS_JPEG_LIBRARY -DSK_VULKAN_HEADER=\"../../skia/config/SkVulkanConfig.h\" -DSK_VULKAN=1 -DSK_SUPPORT_GPU=1 -DSK_GPU_WORKAROUNDS_HEADER=\"gpu/config/gpu_driver_bug_workaround_autogen.h\" -DVK_NO_PROTOTYPES -I../.. -Igen -I../../third_party/libwebp/src -I../../third_party/ced/src -I../../third_party/icu/source/common -I../../third_party/icu/source/i18n -I../../third_party/protobuf/src -Igen/protoc_out -I../../third_party/protobuf/src -I../../third_party/boringssl/src/include -I../../skia/config -I../../skia/ext -I../../third_party/skia/include/c -I../../third_party/skia/include/config -I../../third_party/skia/include/core -I../../third_party/skia/include/docs -I../../third_party/skia/include/effects -I../../third_party/skia/include/encode -I../../third_party/skia/include/gpu -I../../third_party/skia/include/pathops -I../../third_party/skia/include/ports -I../../third_party/skia/include/utils -I../../third_party/vulkan/include -I../../third_party/skia/third_party/vulkanmemoryallocator -I../../third_party/skia/include/codec -I../../third_party/skia/src/gpu -I../../third_party/skia/src/sksl -I../../third_party/skia/modules/skottie/include -I../../third_party/vulkan/include -fno-strict-aliasing --param=ssp-buffer-size=4 -fstack-protector -Wno-builtin-macro-redefined -D__DATE__= -D__TIME__= -D__TIMESTAMP__= -funwind-tables -fPIC -B../../third_party/binutils/Linux_x64/Release/bin -pthread -fcolor-diagnostics -fmerge-all-constants -Xclang -mllvm -Xclang -instcombine-lower-dbg-declare=0 -no-canonical-prefixes -fcomplete-member-pointers -m64 -march=x86-64 -Wall -Wextra -Wimplicit-fallthrough -Wthread-safety -Wno-missing-field-initializers -Wno-unused-parameter -Wno-c++11-narrowing -Wno-unneeded-internal-declaration -Wno-undefined-var-template -Wno-ignored-pragma-optimize -O2 -fno-ident -fdata-sections -ffunction-sections -fno-omit-frame-pointer -g0 -fvisibility=hidden -Xclang -add-plugin -Xclang find-bad-constructs -Xclang -plugin-arg-find-bad-constructs -Xclang check-ipc -Wheader-hygiene -Wstring-conversion -Wtautological-overlap-compare -Wno-shorten-64-to-32 -Wshadow -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -Wno-header-guard -I/usr/include/nss -I/usr/include/nspr -std=c++14 -fno-exceptions -fno-rtti -nostdinc++ -isystem../../buildtools/third_party/libc++/trunk/include -isystem../../buildtools/third_party/libc++abi/trunk/include -fvisibility-inlines-hidden -c ../../components/url_formatter/idn_spoof_checker.cc -o obj/components/url_formatter/url_formatter/idn_spoof_checker.o
../../components/url_formatter/idn_spoof_checker.cc:384:12: error: cannot initialize a variable of type 'UChar *' (aka 'unsigned short *') with an rvalue of type 'char16_t *'
UChar* buffer = host_alt.getBuffer(-1);
^ ~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
Forced a typecast by hand: UChar* buffer = host_alt.getBuffer(-1);
-> UChar* buffer = (UChar *)host_alt.getBuffer(-1);
[6606/21513] CXX obj/chrome/browser/br...ser/chrome_download_manager_delegate.o
FAILED: obj/chrome/browser/browser/chrome_download_manager_delegate.o
../../third_party/llvm-build/Release+Asserts/bin/clang++ -MMD -MF obj/chrome/browser/browser/chrome_download_manager_delegate.o.d -DZLIB_CONST -DUSE_LIBSECRET -DUSE_UDEV -DUSE_AURA=1 -DUSE_GLIB=1 -DUSE_NSS_CERTS=1 -DUSE_X11=1 -DFULL_SAFE_BROWSING -DSAFE_BROWSING_CSD -DSAFE_BROWSING_DB_LOCAL -DCHROMIUM_BUILD -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_GNU_SOURCE -DCR_CLANG_REVISION=\"351477-1\" -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS -D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS -DCR_LIBCXX_REVISION=349080 -DCR_LIBCXXABI_REVISION=347903 -D_LIBCPP_ENABLE_NODISCARD -D_LIBCPP_ABI_UNSTABLE -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -DUSE_CUPS -DGLIB_VERSION_MAX_ALLOWED=GLIB_VERSION_2_32 -DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_26 -DENABLE_IPC_FUZZER -DWEBP_EXTERN=extern -DGL_GLEXT_PROTOTYPES -DUSE_GLX -DUSE_EGL -DVK_NO_PROTOTYPES -DTOOLKIT_VIEWS=1 -DSYNC_PASSWORD_REUSE_DETECTION_ENABLED -DEXPAT_RELATIVE_PATH -DU_USING_ICU_NAMESPACE=0 -DU_ENABLE_DYLOAD=0 -DUSE_CHROMIUM_ICU=1 -DU_STATIC_IMPLEMENTATION -DICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_FILE -DUCHAR_TYPE=uint16_t -DGOOGLE_PROTOBUF_NO_RTTI -DGOOGLE_PROTOBUF_NO_STATIC_INITIALIZER -DHAVE_PTHREAD -DV8_USE_EXTERNAL_STARTUP_DATA -DWEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS=0 -DWEBRTC_CHROMIUM_BUILD -DWEBRTC_POSIX -DWEBRTC_LINUX -DABSL_ALLOCATOR_NOTHROW=1 -DNO_MAIN_THREAD_WRAPPING -DSK_HAS_PNG_LIBRARY -DSK_HAS_WEBP_LIBRARY -DSK_HAS_JPEG_LIBRARY -DSK_VULKAN_HEADER=\"../../skia/config/SkVulkanConfig.h\" -DSK_VULKAN=1 -DSK_SUPPORT_GPU=1 -DSK_GPU_WORKAROUNDS_HEADER=\"gpu/config/gpu_driver_bug_workaround_autogen.h\" -DVK_NO_PROTOTYPES -DLEVELDB_PLATFORM_CHROMIUM=1 -DLEVELDB_PLATFORM_CHROMIUM=1 -DV8_DEPRECATION_WARNINGS -DI18N_ADDRESS_VALIDATION_DATA_URL=\"https://chromium-i18n.appspot.com/ssl-aggregate-address/\" -DAUDIO_PROCESSING_IN_AUDIO_SERVICE -DHUNSPELL_STATIC -DHUNSPELL_CHROME_CLIENT -DUSE_HUNSPELL -DVR_USE_NATIVE_GL -I../.. -Igen -I../../third_party/libwebp/src -I../../third_party/libyuv/include -I../../third_party/khronos -I../../gpu -I../../third_party/vulkan/include -I../../third_party/ced/src -I../../third_party/icu/source/common -I../../third_party/icu/source/i18n -I../../third_party/protobuf/src -Igen/protoc_out -I../../third_party/protobuf/src -I../../third_party/boringssl/src/include -I../../third_party/webrtc_overrides -I../../third_party/webrtc -Igen/third_party/webrtc -I../../third_party/abseil-cpp -I../../skia/config -I../../skia/ext -I../../third_party/skia/include/c -I../../third_party/skia/include/config -I../../third_party/skia/include/core -I../../third_party/skia/include/docs -I../../third_party/skia/include/effects -I../../third_party/skia/include/encode -I../../third_party/skia/include/gpu -I../../third_party/skia/include/pathops -I../../third_party/skia/include/ports -I../../third_party/skia/include/utils -I../../third_party/vulkan/include -I../../third_party/skia/third_party/vulkanmemoryallocator -I../../third_party/skia/include/codec -I../../third_party/skia/src/gpu -I../../third_party/skia/src/sksl -I../../third_party/skia/modules/skottie/include -I../../third_party/vulkan/include -I../../third_party/libwebm/source -I../../third_party/leveldatabase -I../../third_party/leveldatabase/src -I../../third_party/leveldatabase/src/include -I../../v8/include -Igen/v8/include -Igen/third_party/metrics_proto -I../../third_party/re2/src -I../../third_party/mesa_headers -Igen -Igen -Igen -Igen -I../../third_party/libaddressinput/src/cpp/include -Igen -Igen -Igen -Igen -I../../third_party/cacheinvalidation/overrides -I../../third_party/cacheinvalidation/src -I../../third_party/flatbuffers/src/include -I../../third_party/libxml/src/include -I../../third_party/libxml/linux/include -I../../third_party/zlib -I../../third_party/fontconfig/src -I../../third_party/libsecret -I../../third_party/breakpad/breakpad/src -fno-strict-aliasing --param=ssp-buffer-size=4 -fstack-protector -Wno-builtin-macro-redefined -D__DATE__= -D__TIME__= -D__TIMESTAMP__= -funwind-tables -fPIC -B../../third_party/binutils/Linux_x64/Release/bin -pthread -fcolor-diagnostics -fmerge-all-constants -Xclang -mllvm -Xclang -instcombine-lower-dbg-declare=0 -no-canonical-prefixes -fcomplete-member-pointers -m64 -march=x86-64 -Wall -Wextra -Wimplicit-fallthrough -Wthread-safety -Wno-missing-field-initializers -Wno-unused-parameter -Wno-c++11-narrowing -Wno-unneeded-internal-declaration -Wno-undefined-var-template -Wno-ignored-pragma-optimize -O2 -fno-ident -fdata-sections -ffunction-sections -fno-omit-frame-pointer -g0 -fvisibility=hidden -Xclang -add-plugin -Xclang find-bad-constructs -Xclang -plugin-arg-find-bad-constructs -Xclang check-ipc -Wheader-hygiene -Wstring-conversion -Wtautological-overlap-compare -Wexit-time-destructors -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -Wno-shorten-64-to-32 -Wno-header-guard -I/usr/include/nss -I/usr/include/nspr -Wno-exit-time-destructors -DLIBXML_STATIC= -I/usr/include/dbus-1.0 -I/usr/lib/x86_64-linux-gnu/dbus-1.0/include -std=c++14 -fno-exceptions -fno-rtti -nostdinc++ -isystem../../buildtools/third_party/libc++/trunk/include -isystem../../buildtools/third_party/libc++abi/trunk/include -fvisibility-inlines-hidden -c ../../chrome/browser/download/chrome_download_manager_delegate.cc -o obj/chrome/browser/browser/chrome_download_manager_delegate.o
../../chrome/browser/download/chrome_download_manager_delegate.cc:594:26: error: no member named 'safe_browsing_service' in 'BrowserProcess'
g_browser_process->safe_browsing_service()->DownloadBinHashNeeded();
~~~~~~~~~~~~~~~~~ ^
../../chrome/browser/download/chrome_download_manager_delegate.cc:772:26: error: no member named 'safe_browsing_service' in 'BrowserProcess'
g_browser_process->safe_browsing_service();
~~~~~~~~~~~~~~~~~ ^
2 errors generated.
[6612/21513] CXX obj/chrome/browser/browser/download_item_model.o
FAILED: obj/chrome/browser/browser/download_item_model.o
../../third_party/llvm-build/Release+Asserts/bin/clang++ -MMD -MF obj/chrome/browser/browser/download_item_model.o.d -DZLIB_CONST -DUSE_LIBSECRET -DUSE_UDEV -DUSE_AURA=1 -DUSE_GLIB=1 -DUSE_NSS_CERTS=1 -DUSE_X11=1 -DFULL_SAFE_BROWSING -DSAFE_BROWSING_CSD -DSAFE_BROWSING_DB_LOCAL -DCHROMIUM_BUILD -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_GNU_SOURCE -DCR_CLANG_REVISION=\"351477-1\" -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS -D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS -DCR_LIBCXX_REVISION=349080 -DCR_LIBCXXABI_REVISION=347903 -D_LIBCPP_ENABLE_NODISCARD -D_LIBCPP_ABI_UNSTABLE -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -DUSE_CUPS -DGLIB_VERSION_MAX_ALLOWED=GLIB_VERSION_2_32 -DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_26 -DENABLE_IPC_FUZZER -DWEBP_EXTERN=extern -DGL_GLEXT_PROTOTYPES -DUSE_GLX -DUSE_EGL -DVK_NO_PROTOTYPES -DTOOLKIT_VIEWS=1 -DSYNC_PASSWORD_REUSE_DETECTION_ENABLED -DEXPAT_RELATIVE_PATH -DU_USING_ICU_NAMESPACE=0 -DU_ENABLE_DYLOAD=0 -DUSE_CHROMIUM_ICU=1 -DU_STATIC_IMPLEMENTATION -DICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_FILE -DUCHAR_TYPE=uint16_t -DGOOGLE_PROTOBUF_NO_RTTI -DGOOGLE_PROTOBUF_NO_STATIC_INITIALIZER -DHAVE_PTHREAD -DV8_USE_EXTERNAL_STARTUP_DATA -DWEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS=0 -DWEBRTC_CHROMIUM_BUILD -DWEBRTC_POSIX -DWEBRTC_LINUX -DABSL_ALLOCATOR_NOTHROW=1 -DNO_MAIN_THREAD_WRAPPING -DSK_HAS_PNG_LIBRARY -DSK_HAS_WEBP_LIBRARY -DSK_HAS_JPEG_LIBRARY -DSK_VULKAN_HEADER=\"../../skia/config/SkVulkanConfig.h\" -DSK_VULKAN=1 -DSK_SUPPORT_GPU=1 -DSK_GPU_WORKAROUNDS_HEADER=\"gpu/config/gpu_driver_bug_workaround_autogen.h\" -DVK_NO_PROTOTYPES -DLEVELDB_PLATFORM_CHROMIUM=1 -DLEVELDB_PLATFORM_CHROMIUM=1 -DV8_DEPRECATION_WARNINGS -DI18N_ADDRESS_VALIDATION_DATA_URL=\"https://chromium-i18n.appspot.com/ssl-aggregate-address/\" -DAUDIO_PROCESSING_IN_AUDIO_SERVICE -DHUNSPELL_STATIC -DHUNSPELL_CHROME_CLIENT -DUSE_HUNSPELL -DVR_USE_NATIVE_GL -I../.. -Igen -I../../third_party/libwebp/src -I../../third_party/libyuv/include -I../../third_party/khronos -I../../gpu -I../../third_party/vulkan/include -I../../third_party/ced/src -I../../third_party/icu/source/common -I../../third_party/icu/source/i18n -I../../third_party/protobuf/src -Igen/protoc_out -I../../third_party/protobuf/src -I../../third_party/boringssl/src/include -I../../third_party/webrtc_overrides -I../../third_party/webrtc -Igen/third_party/webrtc -I../../third_party/abseil-cpp -I../../skia/config -I../../skia/ext -I../../third_party/skia/include/c -I../../third_party/skia/include/config -I../../third_party/skia/include/core -I../../third_party/skia/include/docs -I../../third_party/skia/include/effects -I../../third_party/skia/include/encode -I../../third_party/skia/include/gpu -I../../third_party/skia/include/pathops -I../../third_party/skia/include/ports -I../../third_party/skia/include/utils -I../../third_party/vulkan/include -I../../third_party/skia/third_party/vulkanmemoryallocator -I../../third_party/skia/include/codec -I../../third_party/skia/src/gpu -I../../third_party/skia/src/sksl -I../../third_party/skia/modules/skottie/include -I../../third_party/vulkan/include -I../../third_party/libwebm/source -I../../third_party/leveldatabase -I../../third_party/leveldatabase/src -I../../third_party/leveldatabase/src/include -I../../v8/include -Igen/v8/include -Igen/third_party/metrics_proto -I../../third_party/re2/src -I../../third_party/mesa_headers -Igen -Igen -Igen -Igen -I../../third_party/libaddressinput/src/cpp/include -Igen -Igen -Igen -Igen -I../../third_party/cacheinvalidation/overrides -I../../third_party/cacheinvalidation/src -I../../third_party/flatbuffers/src/include -I../../third_party/libxml/src/include -I../../third_party/libxml/linux/include -I../../third_party/zlib -I../../third_party/fontconfig/src -I../../third_party/libsecret -I../../third_party/breakpad/breakpad/src -fno-strict-aliasing --param=ssp-buffer-size=4 -fstack-protector -Wno-builtin-macro-redefined -D__DATE__= -D__TIME__= -D__TIMESTAMP__= -funwind-tables -fPIC -B../../third_party/binutils/Linux_x64/Release/bin -pthread -fcolor-diagnostics -fmerge-all-constants -Xclang -mllvm -Xclang -instcombine-lower-dbg-declare=0 -no-canonical-prefixes -fcomplete-member-pointers -m64 -march=x86-64 -Wall -Wextra -Wimplicit-fallthrough -Wthread-safety -Wno-missing-field-initializers -Wno-unused-parameter -Wno-c++11-narrowing -Wno-unneeded-internal-declaration -Wno-undefined-var-template -Wno-ignored-pragma-optimize -O2 -fno-ident -fdata-sections -ffunction-sections -fno-omit-frame-pointer -g0 -fvisibility=hidden -Xclang -add-plugin -Xclang find-bad-constructs -Xclang -plugin-arg-find-bad-constructs -Xclang check-ipc -Wheader-hygiene -Wstring-conversion -Wtautological-overlap-compare -Wexit-time-destructors -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -Wno-shorten-64-to-32 -Wno-header-guard -I/usr/include/nss -I/usr/include/nspr -Wno-exit-time-destructors -DLIBXML_STATIC= -I/usr/include/dbus-1.0 -I/usr/lib/x86_64-linux-gnu/dbus-1.0/include -std=c++14 -fno-exceptions -fno-rtti -nostdinc++ -isystem../../buildtools/third_party/libc++/trunk/include -isystem../../buildtools/third_party/libc++abi/trunk/include -fvisibility-inlines-hidden -c ../../chrome/browser/download/download_item_model.cc -o obj/chrome/browser/browser/download_item_model.o
../../chrome/browser/download/download_item_model.cc:605:32: error: no member named 'safe_browsing_service' in 'BrowserProcess'
g_browser_process->safe_browsing_service();
~~~~~~~~~~~~~~~~~ ^
../../chrome/browser/download/download_item_model.cc:635:30: error: no member named 'safe_browsing_service' in 'BrowserProcess'
g_browser_process->safe_browsing_service();
~~~~~~~~~~~~~~~~~ ^
2 errors generated.
I've checked ninja settings and safe browsing is turned on. Whatever it is... Since there were a patch which was to disable this (it did not remove every instance of this safe browsing) i had it disabled by config. The build continues but around 10000 objects already built has been discarded...
You need to use the flags.gn
as in my previous link to set your GN flags (e.g. add your own flags to the end of those in that file). It includes certain modifications UC does to turn of unnecessary functionalities like safe browsing and other stuffs, which, if you do not use the provided flags, will cause build errors because the patches are paired to those flags.
Oh, i see... So, instead of editing the .gni
and BUILD.gn
files, i should rather do this?
wget https://raw.githubusercontent.com/Eloston/ungoogled-chromium/73.0.3683.103-2/flags.gn
echo 'gtk_version=2' >> flags.gn
echo 'use_gnome_keyring=false' >> flags.gn
echo 'use_pulseaudio=false' >> flags.gn
echo 'use_sysroot=false' >> flags.gn
The build is still running, no errors since my last post. It's now 19000/30722. I'll leave the machine on for the night.
Naturally, shortly after i left the machine, the building has stopped, because of a mispatched file:
[21431/30722] CXX obj/chrome/browser/ui/ui/chrome_pages.o
FAILED: obj/chrome/browser/ui/ui/chrome_pages.o
../../third_party/llvm-build/Release+Asserts/bin/clang++ -MMD -MF obj/chrome/browser/ui/ui/chrome_pages.o.d -DUSE_UDEV -DUSE_AURA=1 -DUSE_GLIB=1 -DUSE_NSS_CERTS=1 -DUSE_X11=1 -DCHROMIUM_BUILD -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_GNU_SOURCE -DCR_CLANG_REVISION=\"351477-1\" -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS -D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS -DCR_LIBCXX_REVISION=349080 -DCR_LIBCXXABI_REVISION=347903 -D_LIBCPP_ENABLE_NODISCARD -D_LIBCPP_ABI_UNSTABLE -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -DUSE_CUPS -DUSE_GIO -DGLIB_VERSION_MAX_ALLOWED=GLIB_VERSION_2_32 -DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_26 -DENABLE_IPC_FUZZER -DWEBP_EXTERN=extern -DTOOLKIT_VIEWS=1 -DVK_NO_PROTOTYPES -DGL_GLEXT_PROTOTYPES -DUSE_GLX -DUSE_EGL -DEXPAT_RELATIVE_PATH -DSYNC_PASSWORD_REUSE_DETECTION_ENABLED -DGOOGLE_PROTOBUF_NO_RTTI -DGOOGLE_PROTOBUF_NO_STATIC_INITIALIZER -DHAVE_PTHREAD -DLEVELDB_PLATFORM_CHROMIUM=1 -DLEVELDB_PLATFORM_CHROMIUM=1 -DU_USING_ICU_NAMESPACE=0 -DU_ENABLE_DYLOAD=0 -DUSE_CHROMIUM_ICU=1 -DU_STATIC_IMPLEMENTATION -DICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_FILE -DUCHAR_TYPE=uint16_t -DWEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS=0 -DWEBRTC_CHROMIUM_BUILD -DWEBRTC_POSIX -DWEBRTC_LINUX -DABSL_ALLOCATOR_NOTHROW=1 -DNO_MAIN_THREAD_WRAPPING -DV8_USE_EXTERNAL_STARTUP_DATA -DSK_HAS_PNG_LIBRARY -DSK_HAS_WEBP_LIBRARY -DSK_HAS_JPEG_LIBRARY -DSK_VULKAN_HEADER=\"../../skia/config/SkVulkanConfig.h\" -DSK_VULKAN=1 -DSK_SUPPORT_GPU=1 -DSK_GPU_WORKAROUNDS_HEADER=\"gpu/config/gpu_driver_bug_workaround_autogen.h\" -DVK_NO_PROTOTYPES -DV8_DEPRECATION_WARNINGS -DI18N_ADDRESS_VALIDATION_DATA_URL=\"https://chromium-i18n.appspot.com/ssl-aggregate-address/\" -I../.. -Igen -I../../third_party/libyuv/include -I../../third_party/libwebp/src -I../../third_party/khronos -I../../gpu -I../../third_party/vulkan/include -I../../third_party/protobuf/src -Igen/protoc_out -I../../third_party/protobuf/src -I../../third_party/boringssl/src/include -I../../third_party/leveldatabase -I../../third_party/leveldatabase/src -I../../third_party/leveldatabase/src/include -I../../third_party/ced/src -I../../third_party/icu/source/common -I../../third_party/icu/source/i18n -I../../third_party/webrtc_overrides -I../../third_party/webrtc -Igen/third_party/webrtc -I../../third_party/abseil-cpp -I../../skia/config -I../../skia/ext -I../../third_party/skia/include/c -I../../third_party/skia/include/config -I../../third_party/skia/include/core -I../../third_party/skia/include/docs -I../../third_party/skia/include/effects -I../../third_party/skia/include/encode -I../../third_party/skia/include/gpu -I../../third_party/skia/include/pathops -I../../third_party/skia/include/ports -I../../third_party/skia/include/utils -I../../third_party/vulkan/include -I../../third_party/skia/third_party/vulkanmemoryallocator -I../../third_party/skia/include/codec -I../../third_party/skia/src/gpu -I../../third_party/skia/src/sksl -I../../third_party/skia/modules/skottie/include -I../../third_party/vulkan/include -I../../third_party/libwebm/source -I../../v8/include -Igen/v8/include -Igen/third_party/metrics_proto -I../../third_party/re2/src -I../../third_party/mesa_headers -Igen -Igen -Igen -Igen -I../../third_party/libaddressinput/src/cpp/include -I../../third_party/cacheinvalidation/overrides -I../../third_party/cacheinvalidation/src -I../../third_party/flatbuffers/src/include -I../../third_party/brotli/include -I../../third_party/zlib -I../../third_party/fontconfig/src -Igen -Igen -Igen -Igen -Igen -fno-strict-aliasing --param=ssp-buffer-size=4 -fstack-protector -Wno-builtin-macro-redefined -D__DATE__= -D__TIME__= -D__TIMESTAMP__= -funwind-tables -fPIC -B../../third_party/binutils/Linux_x64/Release/bin -pthread -fcolor-diagnostics -fmerge-all-constants -Xclang -mllvm -Xclang -instcombine-lower-dbg-declare=0 -no-canonical-prefixes -fcomplete-member-pointers -m64 -march=x86-64 -Wall -Wextra -Wimplicit-fallthrough -Wthread-safety -Wno-missing-field-initializers -Wno-unused-parameter -Wno-c++11-narrowing -Wno-unneeded-internal-declaration -Wno-undefined-var-template -Wno-ignored-pragma-optimize -O2 -fno-ident -fdata-sections -ffunction-sections -fno-omit-frame-pointer -g0 -fvisibility=hidden -Xclang -add-plugin -Xclang find-bad-constructs -Xclang -plugin-arg-find-bad-constructs -Xclang check-ipc -Wheader-hygiene -Wstring-conversion -Wtautological-overlap-compare -Wexit-time-destructors -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -Wno-shorten-64-to-32 -Wno-header-guard -I/usr/include/nss -I/usr/include/nspr -Wno-exit-time-destructors -I/usr/include/dbus-1.0 -I/usr/lib/x86_64-linux-gnu/dbus-1.0/include -std=c++14 -fno-exceptions -fno-rtti -nostdinc++ -isystem../../buildtools/third_party/libc++/trunk/include -isystem../../buildtools/third_party/libc++abi/trunk/include -fvisibility-inlines-hidden -c ../../chrome/browser/ui/chrome_pages.cc -o obj/chrome/browser/ui/ui/chrome_pages.o
../../chrome/browser/ui/chrome_pages.cc:372:2: error: #endif without #if
#endif
^
1 error generated.
It seems, the signin.patch from the Debian patchset was partly rejected and the patching yielded a double #endif
in the code. Removed by hand, continuing build. Only 9000 files are remaining. After the build was successful, i will restart it with the flags.gn
you've suggested, but now i would like to get to the end of this.
Hello,
I would like to build Ungoogled-Chromium, but i stucked, because there is no description how i connect the sources here to the official Chromium sources.
I've read the building.md here: https://github.com/Eloston/ungoogled-chromium/blob/master/docs/building.md It says it will assume that i can build Chromium on my own. I can, but what after? Or before? I do not understand, i should put Chromium sources into a directory inside Ungoogled-Chromium or copy the files of Ungoogled-Chromium into the directory of Chromium? The description does not cover this part...