Try_build_chromium

0 Comments

ref:https://chromium.googlesource.com/chromium/src.git/+/65.0.3283.0/docs/linux_build_instructions.md?pli=1#

1.1 Install depot_tools

cd ~/oh/gitdir
git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
export PATH="$PATH:$HOME/oh/gitdir/depot_tools"
echo 'export PATH="$PATH:$HOME/oh/gitdir/depot_tools"' >> ~/.bashrc

1.2 Get the code

mkdir ~/chromium && cd ~/chromium
fetch --nohooks --nohistory chromium
cd src
./build/install-build-deps.sh

1.2.1 fix deps

fix some deps by adding “=” to force deps version.

example:

sudo apt install libgtk-3-dev
    sudo apt install gir1.2-gtk-3.0=3.24.18-1ubuntu1
    sudo apt install libgtk-3-0=3.24.18-1ubuntu1
    sudo apt install libatk-bridge2.0-0=2.34.1-3
    sudo apt install libatk-bridge2.0-dev

1.3 Run the hooks

cd  ~/chromium/src
gclient runhooks

1.4 Setting up the build

cd  ~/chromium/src
gn gen out/Default
alias cd="cd -P"
echo 'alias cd="cd -P"' >> ~/.bashrc

1.5 Build Chromium

ninja -C out/Default chrome

1.5.1 build error

[enway@ubuntu20 ((04df7298c9...)):src]$ninja -C out/Default chrome
ninja: Entering directory `out/Default'
[19781/57225] CXX obj/components/gwp_asan/client/client/malloc_shims.o
FAILED: obj/components/gwp_asan/client/client/malloc_shims.o

components/gwp_asan/client/lightweight_detector/malloc_shims.cc:138:5: error: cannot initialize a member subobject of type 'GoodSizeFn *const' (aka 'unsigned long (*const)(const allocator_shim::AllocatorDispatch *, unsigned long, void *)') with an rvalue of type 'bool (*)(const AllocatorDispatch *, void *, void *)': type mismatch at 2nd parameter ('size_t' (aka 'unsigned long') vs 'void *')
  138 |     &ClaimedAddressFn,
      |     ^~~~~~~~~~~~~~~~~

components/gwp_asan/client/lightweight_detector/malloc_shims.cc:145:5: error: cannot initialize a member subobject of type 'AlignedReallocFn *const' (aka 'void *(*const)(const allocator_shim::AllocatorDispatch *, void *, unsigned long, unsigned long, void *)') with an rvalue of type 'void (*)(const AllocatorDispatch *, void *, void *)': different number of parameters (5 vs 3)
  145 |     &AlignedFreeFn,

1.6 confirm git log

git log --date=short --pretty='format:%C(yellow)%h %C(green)%cd %C(blue)%an %C(reset)%s'
04df7298c9 2023-11-23 Jan Keitel Mark raw pointers to child elements inside MenuItemView as not dangling.

1.6.1 confirm clang version.

third_party/llvm-build/Release+Asserts/bin/clang++ -v

clang version 18.0.0 (https://chromium.googlesource.com/a/external/github.com/llvm/llvm-project 73e963379e4d06ca75625f63a5604c286fe37040)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /home/enway/chromium/src/third_party/llvm-build/Release+Asserts/bin
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/8
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/9
Selected GCC installation: /usr/lib/gcc/x86_64-linux-gnu/9
Candidate multilib: .;@m64
Candidate multilib: 32;@m32
Candidate multilib: x32;@mx32
Selected multilib: .;@m64

1.7 rm chromium and try again after diff commit.

rm -rf ~/chromium
mkdir ~/chromium && cd ~/chromium
fetch --nohooks --nohistory chromium
git log --date=short --pretty='format:%C(yellow)%h %C(green)%cd %C(blue)%an %C(reset)%s'

git log history

3706357cf6 2023-11-29 Hiroshige Hayashizaki Unify blink::mojom::ControllerServiceWorkerInfo creation

build again

./build/install-build-deps.sh
gclient runhooks
gn gen out/Default

build succeed.

[enway@ubuntu20 ((3706357cf6...)):src]$ninja -C out/Default chrome
ninja: Entering directory `out/Default'
[57296/57296] LINK ./chrome

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Posts

QR code with image

PythonのQRコード画像生成ライブラリ「qrcode」 pip install qrcode QRコードの中に画像を埋め込む download lena.png create QR code with string: "I am Lena" add mini image overlay of…

GPTとは

OpenAI GPTとは2018年に下記論文で提案された自然言語処理モデルです。 基本的にはTransformerと呼ばれる自然言語処理の仕組みをベースにし、事前学習やファインチューニングをすることで非常に高い精度で文章を生成してくれます。現時点ではすでにOpenAI GPT-3が発表されていますが、GPT-2でも高い精度がありフェイクニュースの生成など悪用の危険性が極めて高く、当初はリリースされないという話になるぐらいだったそうです。

ARM_optee_kinibi基礎_

1.0 MMU关联常用简称 ref1: 【转】深入理解 TLB 原理 ref2: [mmu/cache]-ARM MMU的学习笔记-一篇就够了【转】 MMU: Memory Management Unit TLB: Translation lookaside buffer PGD: Page Global…