source: xsoft/graphweb/chromium.xml@ 46b0d7c

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 12.2 8.1 8.2 8.3 8.4 9.0 9.1 basic bdubbs/svn elogind gimp3 kea ken/TL2024 ken/inkscape-core-mods ken/tuningfonts lazarus lxqt perl-modules plabs/newcss plabs/python-mods python3.11 qt5new rahul/power-profiles-daemon renodr/vulkan-addition trunk upgradedb xry111/for-12.3 xry111/intltool xry111/llvm18 xry111/soup3 xry111/spidermonkey128 xry111/test-20220226 xry111/xf86-video-removal
Last change on this file since 46b0d7c was 46b0d7c, checked in by DJ Lucas <dj@…>, 7 years ago

update build size

git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@18891 af4574ff-66df-0310-9fd7-8a98e5e911e0

  • Property mode set to 100644
File size: 19.8 KB
Line 
1<?xml version="1.0" encoding="ISO-8859-1"?>
2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
3 "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
4 <!ENTITY % general-entities SYSTEM "../../general.ent">
5 %general-entities;
6
7 <!ENTITY chromium-download-http "https://commondatastorage.googleapis.com/chromium-browser-official/chromium-&chromium-version;.tar.xz">
8 <!ENTITY chromium-download-ftp " ">
9 <!ENTITY chromium-md5sum "249b4ce6844d5e2424967287c638c55c">
10 <!ENTITY chromium-size "507 MB">
11 <!ENTITY chromium-buildsize "5.8 GB">
12 <!ENTITY chromium-time "94 SBU (with 4 threads)">
13 <!-- Ninja defaults to parallel build unless supplying -j1, SBU measured on
14 dual core, hyperthreaded CPU (4 threads). -->
15]>
16
17<sect1 id="chromium" xreflabel="Chromium-&chromium-version;">
18 <?dbhtml filename="chromium.html"?>
19
20 <sect1info>
21 <othername>$LastChangedBy$</othername>
22 <date>$Date$</date>
23 </sect1info>
24
25 <title>Chromium-&chromium-version;</title>
26
27 <indexterm zone="chromium">
28 <primary sortas="a-Chromium">Chromium</primary>
29 </indexterm>
30
31 <sect2 role="package">
32 <title>Introduction to Chromium</title>
33
34 <para><application>Chromium</application> is an open-source browser project
35 that aims to build a safer, faster, and more stable way for all users to
36 experience the web.</para>
37
38 &lfs80_checked;
39
40 <bridgehead renderas="sect3">Package Information</bridgehead>
41 <itemizedlist spacing="compact">
42 <listitem>
43 <para>Download (HTTP): <ulink url="&chromium-download-http;"/></para>
44 </listitem>
45 <listitem>
46 <para>Download (FTP): <ulink url="&chromium-download-ftp;"/></para>
47 </listitem>
48 <listitem>
49 <para>Download MD5 sum: &chromium-md5sum;</para>
50 </listitem>
51 <listitem>
52 <para>Download size: &chromium-size;</para>
53 </listitem>
54 <listitem>
55 <para>Estimated disk space required: &chromium-buildsize;</para>
56 </listitem>
57 <listitem>
58 <para>Estimated build time: &chromium-time;</para>
59 </listitem>
60 </itemizedlist>
61
62 <bridgehead renderas="sect3">Additional Downloads</bridgehead>
63 <bridgehead renderas="sect4">Required missing freetype2 source:</bridgehead>
64 <itemizedlist spacing="compact">
65 <listitem>
66 <para>Download (HTTP):</para>
67 <para>
68 <ulink url="&sources-anduin-http;/other/chromium-freetype.tar.xz"/>
69 </para>
70 </listitem>
71 <listitem>
72 <para>Download MD5 sum: a3edf5b35664b9882ec1575dfa33ee55</para>
73 </listitem>
74 <listitem>
75 <para>Download size: 1.1 MB</para>
76 </listitem>
77 </itemizedlist>
78
79 <bridgehead renderas="sect4">Required patch to fix build issues with
80 <application>gcc-7.1.0</application>:</bridgehead>
81 <itemizedlist spacing="compact">
82 <listitem>
83 <para>
84 <ulink url="&patch-root;/chromium-&chromium-version;-gcc7-1.patch"/>
85 </para>
86 </listitem>
87 </itemizedlist>
88
89 <bridgehead renderas="sect4">Required patch to fix build issues with
90 <application>linux-4.6.x</application>:</bridgehead>
91 <itemizedlist spacing="compact">
92 <listitem>
93 <para>
94 <ulink url="&patch-root;/chromium-&chromium-version;-kernel_dmabuf-1.patch"/>
95 </para>
96 </listitem>
97 </itemizedlist>
98
99 <bridgehead renderas="sect4">Required patch to fix build issues with
100 <application>freetype-2.8</application>:</bridgehead>
101 <itemizedlist spacing="compact">
102 <listitem>
103 <para>
104 <ulink url="&patch-root;/chromium-&chromium-version;-skia_clip-1.patch"/>
105 </para>
106 </listitem>
107 </itemizedlist>
108
109 <bridgehead renderas="sect4">Recommended patch to use the system
110 <application>FFmpeg</application>:</bridgehead>
111 <itemizedlist spacing="compact">
112 <listitem>
113 <para>
114 <ulink url="&patch-root;/chromium-&chromium-version;-system_ffmpeg-1.patch"/>
115 </para>
116 </listitem>
117 </itemizedlist>
118
119 <bridgehead renderas="sect4">Optional Chrome binaries to extract the
120 <application>WideVine</application> plug-in (Netflix) support:</bridgehead>
121 <itemizedlist spacing="compact">
122 <listitem>
123 <para>Download (HTTP):</para>
124 <para>
125 <ulink url="http://dl.google.com/linux/chrome/deb/pool/main/g/google-chrome-stable/google-chrome-stable_&chromium-version;-1_amd64.deb"/>
126 </para>
127 </listitem>
128 <listitem>
129 <para>Download MD5 sum: a32680dc081331e722fd17d2bd68fb00</para>
130 </listitem>
131 <listitem>
132 <para>Download size: 59 MB</para>
133 </listitem>
134 </itemizedlist>
135 <itemizedlist spacing="compact">
136 <listitem>
137 <para>Download (HTTP):</para>
138 <para>
139 <ulink url="http://mirror.retrosnub.co.uk/apt/google/pool/main/g/google-chrome-stable/google-chrome-stable_48.0.2564.116-1_i386.deb"/>
140 </para>
141 </listitem>
142 <listitem>
143 <para>Download MD5 sum: 895e877b9bfe5da05a061369c2078626</para>
144 </listitem>
145 <listitem>
146 <para>Download size: 45 MB</para>
147 </listitem>
148 </itemizedlist>
149
150 <bridgehead renderas="sect3">Chromium Dependencies</bridgehead>
151
152 <bridgehead renderas="sect4">Required</bridgehead>
153 <para role="required">
154 <xref linkend="alsa-lib"/>,
155 <xref linkend="cups"/>,
156 <xref linkend="desktop-file-utils"/>,
157 <xref linkend="dbus"/>,
158 <xref linkend="perl-file-basedir"/>,
159 <xref linkend="gtk3"/>,
160 <xref linkend="hicolor-icon-theme"/>,
161 <xref linkend="mitkrb"/>,
162 <xref linkend="mesa"/>,
163 <xref linkend="ninja"/>,
164 <xref linkend="nodejs"/>,
165 <xref linkend="nss"/>,
166 <xref linkend="python2"/>,
167 <xref linkend="usbutils"/>, and
168 <xref linkend="x-window-system"/>
169 </para>
170
171 <bridgehead renderas="sect4">Recommended</bridgehead>
172 <para role="recommended">
173 <xref linkend="ffmpeg"/>,
174 <xref linkend="flac"/>,
175 <xref linkend="git"/>,
176<!-- <xref linkend="icu"/>, -->
177<!-- <xref linkend="libevent"/>, -->
178 <xref linkend="libexif"/>,
179 <xref linkend="libjpeg"/>,
180 <xref linkend="libpng"/>,
181 <xref linkend="libsecret"/>,
182<!-- <xref linkend="libvpx"/>, -->
183 <xref linkend="libwebp"/>,
184 <xref linkend="pciutils"/>,
185 <xref linkend="pulseaudio"/>,
186 <xref linkend="xdg-utils"/>, and
187 <xref linkend="yasm"/>
188 </para>
189
190 <bridgehead renderas="sect4">Optional</bridgehead>
191 <para role="optional">
192 <xref linkend="GConf"/>,
193 <xref linkend="icu"/> (currently broken),
194 <xref linkend="gnome-keyring"/>,
195 <xref linkend="libevent"/> (currently broken),
196 <xref linkend="libvpx"/> (currently broken),
197 <xref linkend="libxml2"/> (currently broken),
198 <ulink url="https://devel.freebsoft.org/speechd">speech-dispatcher</ulink>
199 (for the screen reader), and
200 <ulink url="https://google.github.io/snappy">snappy</ulink>
201 </para>
202
203 <para condition="html" role="usernotes">User Notes:
204 <ulink url="&blfs-wiki;/chromium"/></para>
205
206 </sect2>
207
208 <sect2 role="installation">
209 <title>Installation of Chromium</title>
210
211 <para>Apply a patch to fix errors with building with
212 <application>GCC-7.1.0</application>:</para>
213
214<screen><userinput>patch -Np1 -i ../chromium-&chromium-version;-gcc7-1.patch</userinput></screen>
215
216 <para>Apply a patch to fix an issue when building against Linux-4.6:</para>
217
218<screen><userinput>patch -Np1 -i ../chromium-&chromium-version;-kernel_dmabuf-1.patch</userinput></screen>
219
220 <para>Apply a patch to fix an issue when building against Linux-4.6:</para>
221
222<screen><userinput>patch -Np1 -i ../chromium-&chromium-version;-skia_clip-1.patch</userinput></screen>
223
224 <para>Apply a patch to allow use of the system
225 <application>FFmpeg</application>:</para>
226
227<screen><userinput>patch -Np1 -i ../chromium-&chromium-version;-system_ffmpeg-1.patch</userinput></screen>
228
229 <para>Extract the missing freetype soruce:</para>
230
231<screen><userinput>tar -xf ../chromium-freetype.tar.xz</userinput></screen>
232
233<!-- <para>Fix a build issue with GCC-7:</para>
234
235<screen><userinput>sed 's/^config("compiler") {/&amp;\ncflags_cc = [ "-fno-delete-null-pointer-checks" ]/' \
236 -i build/config/linux/BUILD.gn</userinput></screen> -->
237
238 <para>Enable the use of the
239 <ulink url="http://www.widevine.com/">WideVine</ulink> plugin, needed for
240 Netflix support (see the WideVine section below). Define an
241 available product name ("Pinkie Pie" in this case) with the following
242 command:</para>
243
244<screen><userinput>sed 's/WIDEVINE_CDM_AVAILABLE/&amp;\n\n#define WIDEVINE_CDM_VERSION_STRING "Pinkie Pie"/' \
245 -i third_party/widevine/cdm/stub/widevine_cdm_version.h</userinput></screen>
246
247 <para>Remove third-party build files that interfere with system versions:</para>
248
249 <note>
250 <para>
251 Chromium uses many external projects, the selections below are not set
252 in stone, however they have been tested thoroughly. With Chromium
253 &chromium-version;, system versions of icu, libevent, libvpx, libxml2,
254 and zlib are known to break the build at this time.
255 <!-- icu: Not at 59 internally -->
256 <!-- libevent: needs internal headers -->
257 <!-- libvpx: breaks build in gfx -->
258 <!-- libxml2: breaks build with ui -->
259 <!-- zlib requires libminizip -->
260 </para>
261 </note>
262
263<!-- Again, thanks to Arch, this is much better than listing all the needed
264shipped libs required to use the remove_bundled_files.py script -->
265<screen><userinput>for LIB in ffmpeg flac harfbuzz-ng<!-- icu libevent--> libjpeg \
266 libjpeg_turbo libpng libwebp<!-- libxml libvpx--> libxslt yasm; do
267 find -type f -path "*third_party/$LIB/*" \
268 \! -path "*third_party/$LIB/chromium/*" \
269 \! -path "*third_party/$LIB/google/*" \
270 \! -path "*base/third_party/icu/*" \
271 \! -path "*base/third_party/libevent/*" \
272 \! -regex '.*\.\(gn\|gni\|isolate\|py\)' \
273 -delete
274done &amp;&amp;
275
276python build/linux/unbundle/replace_gn_files.py \
277 --system-libraries ffmpeg flac harfbuzz-ng<!-- icu libevent--> libjpeg \
278 libpng libwebp<!-- libxml libvpx--> libxslt yasm &amp;&amp;
279python third_party/libaddressinput/chromium/tools/update-strings.py</userinput></screen>
280
281 <para><application>Chromium</application> uses an internal tool, <ulink
282 url="https://chromium.googlesource.com/chromium/src/tools/gn">gn</ulink>,
283 to generate the <application>Ninja</application> build files. Complete
284 configuration of the build using the following commands:</para>
285
286 <note>
287 <para>
288 <!-- Taken from Arch Linux - an immensely helpful link - Thanks -->
289 The Google API Key and OAuth tokens below are specific to LFS. If using
290 these instructions for another distro, or if you intend to distribute
291 binary copies of the software using these instructions, please obtain
292 your own keys following the instructions located at
293 <ulink url="http://www.chromium.org/developers/how-tos/api-keys"/>.
294 <!-- BLFS Devs, register an account at Google with your
295 @linuxfromscratch.org email address, and I'll make you an administrator
296 for the 'Chromium for LFS' project (where the API and OAuth keys were
297 created for use in the book).-->
298 </para>
299 </note>
300
301<screen><userinput>GN_CONFIG=('google_api_key="AIzaSyDxKL42zsPjbke5O8_rPVpVrLrJ8aeE9rQ"'
302'google_default_client_id="595013732528-llk8trb03f0ldpqq6nprjp1s79596646.apps.googleusercontent.com"'
303'google_default_client_secret="5ntt6GbbkjnTVXx-MSxbmx5e"'
304'clang_use_chrome_plugins=false'
305'enable_hangout_services_extension=true'
306'enable_nacl=false'
307'enable_nacl_nonsfi=false'
308'enable_swiftshader=false'
309'enable_widevine=true'
310'fatal_linker_warnings=false'
311'ffmpeg_branding="Chrome"'
312'fieldtrial_testing_like_official_build=true'
313'is_debug=false'
314'is_clang=false'
315'link_pulseaudio=true'
316'linux_use_bundled_binutils=false'
317'proprietary_codecs=true'
318'remove_webcore_debug_symbols=true'
319'symbol_level=0'
320'treat_warnings_as_errors=false'
321'use_allocator="none"'
322'use_cups=true'
323'use_gconf=false'
324'use_gnome_keyring=false'
325'use_gold=false'
326'use_gtk3=true'
327'use_kerberos=true'
328'use_pulseaudio=true'
329'use_sysroot=false')</userinput></screen>
330
331 <para>Build <application>gn</application> and use it to prepare the
332 <application>Ninja</application> build files:</para>
333
334<screen><userinput>python tools/gn/bootstrap/bootstrap.py --gn-gen-args "${GN_CONFIG[*]}" &amp;&amp;
335out/Release/gn gen out/Release --args="${GN_CONFIG[*]}"</userinput></screen>
336
337 <warning>
338 <para>Ninja, by default, sets the number of jobs to the number of
339 availalble threads. If your machine is memory constrained, with regard to
340 number of threads, you should reduce the number of jobs by passing the
341 <parameter>-j#</parameter> switch to the <command>ninja</command> command
342 below. Plan for roughly 1.25GB per thread while linking
343 <application>WebKit</application> to avoid out of memery errors.</para>
344 </warning>
345
346 <para>Build <application>Chromium</application> using the following
347 commands:</para>
348
349<screen><userinput>mkdir -p third_party/node/linux/node-linux-x64/bin &amp;&amp;
350ln -s /usr/bin/node third_party/node/linux/node-linux-x64/bin/ &amp;&amp;
351ninja -C out/Release chrome chrome_sandbox chromedriver widevinecdmadapter</userinput></screen>
352
353 <para>This package was already tested as part of the build.</para>
354
355 <para>Now, as the <systemitem class="username">root</systemitem> user,
356 install the pacakage:</para>
357
358<screen role="root"><userinput>install -vDm755 out/Release/chrome \
359 /usr/lib/chromium/chromium &amp;&amp;
360install -vDm4755 out/Release/chrome_sandbox \
361 /usr/lib/chromium/chrome-sandbox &amp;&amp;
362install -vDm755 out/Release/chromedriver \
363 /usr/lib/chromium/chromedriver &amp;&amp;
364ln -svf /usr/lib/chromium/chromium /usr/bin &amp;&amp;
365ln -svf /usr/lib/chromium/chromedriver /usr/bin/ &amp;&amp;
366
367install -vm644 out/Release/icudtl.dat /usr/lib/chromium/ &amp;&amp;
368install -vDm644 out/Release/gen/content/content_resources.pak \
369 /usr/lib/chromium/ &amp;&amp;
370install -vm644 out/Release/{*.pak,*.bin} \
371 /usr/lib/chromium/ &amp;&amp;
372
373cp -av out/Release/locales /usr/lib/chromium/ &amp;&amp;
374chown -Rv root:root /usr/lib/chromium/locales &amp;&amp;
375
376install -vDm644 out/Release/chrome.1 \
377 /usr/share/man/man1/chromium.1</userinput></screen>
378
379 <para>While still the <systemitem class="username">root</systemitem> user,
380 install icons and the .desktop file:</para>
381
382<screen role="root"><userinput>for size in 16 32; do
383 install -vDm644 \
384 "chrome/app/theme/default_100_percent/chromium/product_logo_$size.png" \
385 "/usr/share/icons/hicolor/${size}x${size}/apps/chromium.png"
386done &amp;&amp;
387
388for size in 22 24 48 64 128 256; do
389 install -vDm644 "chrome/app/theme/chromium/product_logo_$size.png" \
390 "/usr/share/icons/hicolor/${size}x${size}/apps/chromium.png"
391done &amp;&amp;
392
393cat &gt; /usr/share/applications/chromium.desktop &lt;&lt; "EOF"
394[Desktop Entry]
395Encoding=UTF-8
396Name=Chromium Web Browser
397Comment=Access the Internet
398GenericName=Web Browser
399Exec=chromium %u
400Terminal=false
401Type=Application
402Icon=chromium
403Categories=GTK;Network;WebBrowser;
404MimeType=application/xhtml+xml;text/xml;application/xhtml+xml;text/mml;x-scheme-handler/http;x-scheme-handler/https;
405EOF</userinput></screen>
406
407 <note>
408 <para>If upgrading from a previous build of chromium using gtk+-2.x, you
409 may need to remove the <filename
410 class="directory">~/.config/chromium</filename> directory.</para>
411 </note>
412
413 <bridgehead renderas="sect3">Extracting the WideVine plugin from Chrome</bridgehead>
414
415 <para>Extract the downloaded deb file with the following commands:</para>
416
417<screen><userinput>mkdir temp &amp;&amp;
418cd temp &amp;&amp;
419case $(uname -m) in
420 x86_64) ar -x ../../google-chrome-stable_&chromium-version;-1_amd64.deb
421 ;;
422 i?86) ar -x ../../google-chrome-stable_48.0.2564.116-1_i386.deb
423 ;;
424esac</userinput></screen>
425
426 <para>As the <systemitem class="username">root</systemitem> user, enable
427 the WideVine plugin with the following commands:</para>
428
429<!-- Note that libwidevinecdmadapter.so is not in the tarball. It is
430created only if enable_widevine=true i sset in GN_CONFIG -->
431
432<screen role="root"><userinput>tar -xf data.tar.xz &amp;&amp;
433install -vm755 ../out/Release/libwidevinecdmadapter.so /usr/lib/chromium/ &amp;&amp;
434install -vm755 opt/google/chrome/libwidevinecdm.so /usr/lib/chromium/</userinput></screen>
435
436 </sect2>
437
438 <sect2 role="commands">
439 <title>Command Explanations</title>
440
441 <para><command>GN_CONFIG=(...)</command>: this array contains
442 all of the defines used in the build.</para>
443
444 <para><command>python tools/gn/bootstrap/bootstrap.py --gn-gen-args "${GN_CONFIG[*]}"</command>:
445 this command replaces defines in the gn files with the values contained in
446 <envar>${GN_CONFIG[@]}</envar>.</para>
447
448 <para><command>out/Release/gn gen out/Release --args="${GN_CONFIG[*]}"</command>:
449 this command runs a Google provided configuration script
450 <application>gn</application> on the source tree to produce
451 a <application>Ninja</application> configuration suitable for the build
452 machine.</para>
453
454 <para><command>mkdir...ln -s /usr/bin/node
455 third_party/node/linux/node-linux-x64/bin/</command>: these commands
456 replaced the local <application>Node.js</application> (no longer available)
457 with the system installed <application>Node.js</application>.</para>
458
459 <para><command>ar -x ../../google-chrome-stable*.deb</command>:
460 the <command>ar</command> utility is used to extract Debian archives.</para>
461
462 </sect2>
463
464 <sect2 role="content">
465 <title>Contents</title>
466
467 <segmentedlist>
468 <segtitle>Installed Programs</segtitle>
469 <segtitle>Installed Libraries</segtitle>
470 <segtitle>Installed Directories</segtitle>
471
472 <seglistitem>
473 <seg>/usr/lib/chromium/chromium,
474 /usr/lib/chromium/chromedriver, and
475 /usr/lib/chromium/chrome-sandbox</seg>
476 <seg>none</seg>
477 <seg>/usr/lib/chromium</seg>
478 </seglistitem>
479 </segmentedlist>
480
481 <variablelist>
482 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
483 <?dbfo list-presentation="list"?>
484 <?dbhtml list-presentation="table"?>
485
486 <varlistentry id="chromium-lib">
487 <term><command>/usr/lib/chromium/chromium</command></term>
488 <listitem>
489 <para> is the main chromium executable.</para>
490 <indexterm zone="chromium chromium-lib">
491 <primary sortas="b-chromiumlib">chromium</primary>
492 </indexterm>
493 </listitem>
494 </varlistentry>
495
496 <varlistentry id="chromedriver">
497 <term><command>/usr/lib/chromium/chromedriver</command></term>
498 <listitem>
499 <para> is a
500 <ulink url="http://www.seleniumhq.org/projects/webdriver/">
501 WebDriver</ulink> for Chromium.</para>
502 <indexterm zone="chromium chromedriver">
503 <primary sortas="b-chromedriver">chromedriver</primary>
504 </indexterm>
505 </listitem>
506 </varlistentry>
507
508 <varlistentry id="chrome-sandbox">
509 <term><command>/usr/lib/chromium/chrome-sandbox</command></term>
510 <listitem>
511 <para> creates a sandboxed environment for running untrusted
512 code (plugins).</para>
513 <indexterm zone="chromium chrome-sandbox">
514 <primary sortas="b-chrome-sandbox">chrome-sandbox</primary>
515 </indexterm>
516 </listitem>
517 </varlistentry>
518
519 </variablelist>
520
521 </sect2>
522
523</sect1>
Note: See TracBrowser for help on using the repository browser.