blob: 3b3469df531c2b848bdcdddfdec72cd740f83659 [file] [log] [blame] [view]
dpranke0ae7cad2016-11-30 07:47:581# Checking out and building Chromium on Linux
andybons3322f762015-08-24 21:37:092
Victor Costan44af72b2017-11-13 20:01:303There are instructions for other platforms linked from the
Nicolas Norvezba040062020-01-15 01:17:264[get the code](../get_the_code.md) page.
dpranke1a70d0c2016-12-01 02:42:295
dpranke1a70d0c2016-12-01 02:42:296## Instructions for Google Employees
7
8Are you a Google employee? See
9[go/building-chrome](https://goto.google.com/building-chrome) instead.
andybons8c02a1f2015-09-04 17:02:3210
dpranke0ae7cad2016-11-30 07:47:5811[TOC]
andybonsad92aa32015-08-31 02:27:4412
dpranke0ae7cad2016-11-30 07:47:5813## System requirements
andybonsad92aa32015-08-31 02:27:4414
dpranke0ae7cad2016-11-30 07:47:5815* A 64-bit Intel machine with at least 8GB of RAM. More than 16GB is highly
16 recommended.
17* At least 100GB of free disk space.
Mike Taylorfe7d72e2021-10-11 15:03:1118* You must have Git and Python v3.6+ installed already (and `python3` must point
19 to a Python v3.6+ binary).
andybons3322f762015-08-24 21:37:0920
Johann112b198b2021-07-01 00:25:3321Most development is done on Ubuntu (currently 18.04, Bionic Beaver). There are
dpranke0ae7cad2016-11-30 07:47:5822some instructions for other distros below, but they are mostly unsupported.
andybons3322f762015-08-24 21:37:0923
dpranke0ae7cad2016-11-30 07:47:5824## Install `depot_tools`
andybonsad92aa32015-08-31 02:27:4425
sdy93387fa2016-12-01 01:03:4426Clone the `depot_tools` repository:
andybons3322f762015-08-24 21:37:0927
sdy93387fa2016-12-01 01:03:4428```shell
29$ git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
30```
andybonsad92aa32015-08-31 02:27:4431
sdy93387fa2016-12-01 01:03:4432Add `depot_tools` to the end of your PATH (you will probably want to put this
33in your `~/.bashrc` or `~/.zshrc`). Assuming you cloned `depot_tools` to
34`/path/to/depot_tools`:
andybonsad92aa32015-08-31 02:27:4435
sdy93387fa2016-12-01 01:03:4436```shell
37$ export PATH="$PATH:/path/to/depot_tools"
38```
andybons3322f762015-08-24 21:37:0939
Claudio DeSouzaae44ac12018-02-13 16:11:4540When cloning `depot_tools` to your home directory **do not** use `~` on PATH,
41otherwise `gclient runhooks` will fail to run. Rather, you should use either
42`$HOME` or the absolute path:
43
44```shell
45$ export PATH="$PATH:${HOME}/depot_tools"
46```
47
dpranke0ae7cad2016-11-30 07:47:5848## Get the code
andybonsad92aa32015-08-31 02:27:4449
sdy93387fa2016-12-01 01:03:4450Create a `chromium` directory for the checkout and change to it (you can call
51this whatever you like and put it wherever you like, as long as the full path
52has no spaces):
53
54```shell
55$ mkdir ~/chromium && cd ~/chromium
56```
andybons3322f762015-08-24 21:37:0957
dpranke0ae7cad2016-11-30 07:47:5858Run the `fetch` tool from depot_tools to check out the code and its
59dependencies.
andybonsad92aa32015-08-31 02:27:4460
sdy93387fa2016-12-01 01:03:4461```shell
62$ fetch --nohooks chromium
63```
andybonsad92aa32015-08-31 02:27:4464
dpranke0ae7cad2016-11-30 07:47:5865If you don't want the full repo history, you can save a lot of time by
sdy93387fa2016-12-01 01:03:4466adding the `--no-history` flag to `fetch`.
andybons3322f762015-08-24 21:37:0967
dpranke0ae7cad2016-11-30 07:47:5868Expect the command to take 30 minutes on even a fast connection, and many
69hours on slower ones.
andybonsad92aa32015-08-31 02:27:4470
dpranke0ae7cad2016-11-30 07:47:5871If you've already installed the build dependencies on the machine (from another
sdy93387fa2016-12-01 01:03:4472checkout, for example), you can omit the `--nohooks` flag and `fetch`
dpranke0ae7cad2016-11-30 07:47:5873will automatically execute `gclient runhooks` at the end.
andybons3322f762015-08-24 21:37:0974
sdy93387fa2016-12-01 01:03:4475When `fetch` completes, it will have created a hidden `.gclient` file and a
76directory called `src` in the working directory. The remaining instructions
77assume you have switched to the `src` directory:
andybons3322f762015-08-24 21:37:0978
sdy93387fa2016-12-01 01:03:4479```shell
80$ cd src
81```
andybons3322f762015-08-24 21:37:0982
dpranke0ae7cad2016-11-30 07:47:5883### Install additional build dependencies
andybons3322f762015-08-24 21:37:0984
dpranke0ae7cad2016-11-30 07:47:5885Once you have checked out the code, and assuming you're using Ubuntu, run
86[build/install-build-deps.sh](/build/install-build-deps.sh)
andybons3322f762015-08-24 21:37:0987
Aaron Gable3bc93682019-01-11 02:16:0788```shell
89$ ./build/install-build-deps.sh
90```
91
dpranke2989a782016-12-02 02:57:1292You may need to adjust the build dependencies for other distros. There are
93some [notes](#notes) at the end of this document, but we make no guarantees
94for their accuracy.
andybonsad92aa32015-08-31 02:27:4495
dpranke0ae7cad2016-11-30 07:47:5896### Run the hooks
andybons3322f762015-08-24 21:37:0997
dpranke0ae7cad2016-11-30 07:47:5898Once you've run `install-build-deps` at least once, you can now run the
sdy93387fa2016-12-01 01:03:4499Chromium-specific hooks, which will download additional binaries and other
dpranke0ae7cad2016-11-30 07:47:58100things you might need:
andybonsad92aa32015-08-31 02:27:44101
sdy93387fa2016-12-01 01:03:44102```shell
103$ gclient runhooks
104```
andybonsad92aa32015-08-31 02:27:44105
sdy93387fa2016-12-01 01:03:44106*Optional*: You can also [install API
107keys](https://www.chromium.org/developers/how-tos/api-keys) if you want your
108build to talk to some Google services, but this is not necessary for most
109development and testing purposes.
andybons3322f762015-08-24 21:37:09110
dpranke1a70d0c2016-12-01 02:42:29111## Setting up the build
andybonsad92aa32015-08-31 02:27:44112
Tom Bridgwatereef401542018-08-17 00:54:43113Chromium uses [Ninja](https://ninja-build.org) as its main build tool along with
Andrew Williamsbbc1a1e2021-07-21 01:51:22114a tool called [GN](https://gn.googlesource.com/gn/+/main/docs/quick_start.md)
Tom Bridgwatereef401542018-08-17 00:54:43115to generate `.ninja` files. You can create any number of *build directories*
116with different configurations. To create a build directory, run:
andybons8c02a1f2015-09-04 17:02:32117
sdy93387fa2016-12-01 01:03:44118```shell
119$ gn gen out/Default
120```
dpranke0ae7cad2016-11-30 07:47:58121
sdy93387fa2016-12-01 01:03:44122* You only have to run this once for each new build directory, Ninja will
123 update the build files as needed.
124* You can replace `Default` with another name, but
125 it should be a subdirectory of `out`.
126* For other build arguments, including release settings, see [GN build
127 configuration](https://www.chromium.org/developers/gn-build-configuration).
dpranke0ae7cad2016-11-30 07:47:58128 The default will be a debug component build matching the current host
129 operating system and CPU.
130* For more info on GN, run `gn help` on the command line or read the
Andrew Williamsbbc1a1e2021-07-21 01:51:22131 [quick start guide](https://gn.googlesource.com/gn/+/main/docs/quick_start.md).
dpranke0ae7cad2016-11-30 07:47:58132
amoylana960fa52016-12-09 22:47:28133### <a name="faster-builds"></a>Faster builds
dpranke0ae7cad2016-11-30 07:47:58134
dpranke2989a782016-12-02 02:57:12135This section contains some things you can change to speed up your builds,
136sorted so that the things that make the biggest difference are first.
137
Fumitoshi Ukaie15fd782019-10-15 05:52:48138#### Use Goma
139
140Google developed the distributed compiler called
141[Goma](https://chromium.googlesource.com/infra/goma/client).
Fumitoshi Ukaie15fd782019-10-15 05:52:48142
Yoshisato Yanagisawab66864e2021-03-11 21:22:48143If you would like to use `Goma` provisioned by Google,
144please follow [Goma for Chromium contributors](https://chromium.googlesource.com/infra/goma/client/+/HEAD/doc/early-access-guide.md).
Fumitoshi Ukaie15fd782019-10-15 05:52:48145
Yoshisato Yanagisawab66864e2021-03-11 21:22:48146If you are a Google employee, see
147[go/building-chrome](https://goto.google.com/building-chrome) instead.
Fumitoshi Ukaie15fd782019-10-15 05:52:48148
dpranke2989a782016-12-02 02:57:12149#### Disable NaCl
150
151By default, the build includes support for
152[Native Client (NaCl)](https://developer.chrome.com/native-client), but
Victor Costan44af72b2017-11-13 20:01:30153most of the time you won't need it. You can set the GN argument
dpranke2989a782016-12-02 02:57:12154`enable_nacl=false` and it won't be built.
155
156#### Include fewer debug symbols
157
158By default GN produces a build with all of the debug assertions enabled
159(`is_debug=true`) and including full debug info (`symbol_level=2`). Setting
160`symbol_level=1` will produce enough information for stack traces, but not
161line-by-line debugging. Setting `symbol_level=0` will include no debug
162symbols at all. Either will speed up the build compared to full symbols.
163
Bruce Dawson63e0be72021-11-29 20:34:41164#### Disable debug symbols for Blink and v8
dpranke2989a782016-12-02 02:57:12165
166Due to its extensive use of templates, the Blink code produces about half
167of our debug symbols. If you don't ever need to debug Blink, you can set
Bruce Dawson63e0be72021-11-29 20:34:41168the GN arg `blink_symbol_level=0`. Similarly, if you don't need to debug v8 you
169can improve build speeds by setting the GN arg `v8_symbol_level=0`.
dpranke2989a782016-12-02 02:57:12170
171#### Use Icecc
172
173[Icecc](https://github.com/icecc/icecream) is the distributed compiler with a
174central scheduler to share build load. Currently, many external contributors use
Fumitoshi Ukaie15fd782019-10-15 05:52:48175it. e.g. Intel, Opera, Samsung (this is not useful if you're using Goma).
dpranke2989a782016-12-02 02:57:12176
177In order to use `icecc`, set the following GN args:
178
179```
dpranke2989a782016-12-02 02:57:12180use_debug_fission=false
181is_clang=false
dpranke2989a782016-12-02 02:57:12182```
183
Victor Costan44af72b2017-11-13 20:01:30184See these links for more on the
dpranke2989a782016-12-02 02:57:12185[bundled_binutils limitation](https://github.com/icecc/icecream/commit/b2ce5b9cc4bd1900f55c3684214e409fa81e7a92),
186the [debug fission limitation](http://gcc.gnu.org/wiki/DebugFission).
187
188Using the system linker may also be necessary when using glibc 2.21 or newer.
189See [related bug](https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=808181).
190
191#### ccache
192
David Sandersddc9a7f2022-01-28 03:19:19193You can use [ccache](https://ccache.dev) to speed up local builds (again,
Fumitoshi Ukaie15fd782019-10-15 05:52:48194this is not useful if you're using Goma).
dpranke2989a782016-12-02 02:57:12195
196Increase your ccache hit rate by setting `CCACHE_BASEDIR` to a parent directory
197that the working directories all have in common (e.g.,
198`/home/yourusername/development`). Consider using
199`CCACHE_SLOPPINESS=include_file_mtime` (since if you are using multiple working
200directories, header times in svn sync'ed portions of your trees will be
201different - see
David Sandersddc9a7f2022-01-28 03:19:19202[the ccache troubleshooting section](https://ccache.dev/manual/latest.html#_troubleshooting)
dpranke2989a782016-12-02 02:57:12203for additional information). If you use symbolic links from your home directory
204to get to the local physical disk directory where you keep those working
205development directories, consider putting
206
207 alias cd="cd -P"
208
209in your `.bashrc` so that `$PWD` or `cwd` always refers to a physical, not
210logical directory (and make sure `CCACHE_BASEDIR` also refers to a physical
211parent).
212
213If you tune ccache correctly, a second working directory that uses a branch
214tracking trunk and is up to date with trunk and was gclient sync'ed at about the
215same time should build chrome in about 1/3 the time, and the cache misses as
216reported by `ccache -s` should barely increase.
217
Song Fangzhen4b68a6e32021-07-14 05:53:40218This is especially useful if you use
219[git-worktree](http://git-scm.com/docs/git-worktree) and keep multiple local
dpranke2989a782016-12-02 02:57:12220working directories going at once.
221
222#### Using tmpfs
223
224You can use tmpfs for the build output to reduce the amount of disk writes
225required. I.e. mount tmpfs to the output directory where the build output goes:
226
227As root:
228
229 mount -t tmpfs -o size=20G,nr_inodes=40k,mode=1777 tmpfs /path/to/out
230
231*** note
232**Caveat:** You need to have enough RAM + swap to back the tmpfs. For a full
233debug build, you will need about 20 GB. Less for just building the chrome target
234or for a release build.
235***
236
237Quick and dirty benchmark numbers on a HP Z600 (Intel core i7, 16 cores
238hyperthreaded, 12 GB RAM)
239
240* With tmpfs:
241 * 12m:20s
242* Without tmpfs
243 * 15m:40s
244
Bruce Dawsonbe823202022-03-10 23:40:50245### Smaller builds
246
247The Chrome binary contains embedded symbols by default. You can reduce its size
248by using the Linux `strip` command to remove this debug information. You can
249also reduce binary size by disabling debug mode, disabling dchecks, and turning
250on all optimizations by enabling official build mode, with these GN args:
251
252```
253is_debug = false
254dcheck_always_on = false
255is_official_build = true
256```
257
dpranke0ae7cad2016-11-30 07:47:58258## Build Chromium
259
260Build Chromium (the "chrome" target) with Ninja using the command:
261
sdy93387fa2016-12-01 01:03:44262```shell
Max Morozf5b31fcd2018-08-10 21:55:48263$ autoninja -C out/Default chrome
sdy93387fa2016-12-01 01:03:44264```
dpranke0ae7cad2016-11-30 07:47:58265
Dirk Pranke8bd55f22018-10-24 21:22:10266(`autoninja` is a wrapper that automatically provides optimal values for the
267arguments passed to `ninja`.)
Max Morozf5b31fcd2018-08-10 21:55:48268
sdy93387fa2016-12-01 01:03:44269You can get a list of all of the other build targets from GN by running `gn ls
270out/Default` from the command line. To compile one, pass the GN label to Ninja
Max Morozf5b31fcd2018-08-10 21:55:48271with no preceding "//" (so, for `//chrome/test:unit_tests` use `autoninja -C
sdy93387fa2016-12-01 01:03:44272out/Default chrome/test:unit_tests`).
dpranke0ae7cad2016-11-30 07:47:58273
274## Run Chromium
275
276Once it is built, you can simply run the browser:
277
sdy93387fa2016-12-01 01:03:44278```shell
279$ out/Default/chrome
280```
dpranke0ae7cad2016-11-30 07:47:58281
282## Running test targets
283
Fred Shih865fb8f2022-02-03 03:54:19284First build the unit_tests binary by running the command:
285
286```shell
287$ autoninja -C out/Default unit_tests
288```
289
290You can run the tests by running the unit_tests binary. You can also limit which
291tests are run using the `--gtest_filter` arg, e.g.:
dpranke0ae7cad2016-11-30 07:47:58292
sdy93387fa2016-12-01 01:03:44293```shell
dpranke1a70d0c2016-12-01 02:42:29294$ out/Default/unit_tests --gtest_filter="PushClientTest.*"
sdy93387fa2016-12-01 01:03:44295```
dpranke0ae7cad2016-11-30 07:47:58296
297You can find out more about GoogleTest at its
298[GitHub page](https://github.com/google/googletest).
299
300## Update your checkout
301
302To update an existing checkout, you can run
303
sdy93387fa2016-12-01 01:03:44304```shell
305$ git rebase-update
306$ gclient sync
307```
dpranke0ae7cad2016-11-30 07:47:58308
309The first command updates the primary Chromium source repository and rebases
sdy93387fa2016-12-01 01:03:44310any of your local branches on top of tip-of-tree (aka the Git branch
Andrew Williamsbbc1a1e2021-07-21 01:51:22311`origin/main`). If you don't want to use this script, you can also just use
sdy93387fa2016-12-01 01:03:44312`git pull` or other common Git commands to update the repo.
dpranke0ae7cad2016-11-30 07:47:58313
sdy93387fa2016-12-01 01:03:44314The second command syncs dependencies to the appropriate versions and re-runs
315hooks as needed.
dpranke0ae7cad2016-11-30 07:47:58316
317## Tips, tricks, and troubleshooting
andybons3322f762015-08-24 21:37:09318
319### Linker Crashes
andybonsad92aa32015-08-31 02:27:44320
andybons3322f762015-08-24 21:37:09321If, during the final link stage:
andybonsad92aa32015-08-31 02:27:44322
sdy93387fa2016-12-01 01:03:44323```
324LINK out/Debug/chrome
325```
andybonsad92aa32015-08-31 02:27:44326
andybons3322f762015-08-24 21:37:09327You get an error like:
andybons3322f762015-08-24 21:37:09328
sdy93387fa2016-12-01 01:03:44329```
330collect2: ld terminated with signal 6 Aborted terminate called after throwing an instance of 'std::bad_alloc'
331collect2: ld terminated with signal 11 [Segmentation fault], core dumped
332```
andybonsad92aa32015-08-31 02:27:44333
brettwc25693b32016-05-26 01:11:52334you are probably running out of memory when linking. You *must* use a 64-bit
335system to build. Try the following build settings (see [GN build
336configuration](https://www.chromium.org/developers/gn-build-configuration) for
sdy93387fa2016-12-01 01:03:44337other settings):
andybonsad92aa32015-08-31 02:27:44338
sdy93387fa2016-12-01 01:03:44339* Build in release mode (debugging symbols require more memory):
brettwc25693b32016-05-26 01:11:52340 `is_debug = false`
sdy93387fa2016-12-01 01:03:44341* Turn off symbols: `symbol_level = 0`
342* Build in component mode (this is for development only, it will be slower and
343 may have broken functionality): `is_component_build = true`
andybons3322f762015-08-24 21:37:09344
dpranke0ae7cad2016-11-30 07:47:58345### More links
andybons3322f762015-08-24 21:37:09346
Nicolas Norvezba040062020-01-15 01:17:26347* Information about [building with Clang](../clang.md).
Tom Andersonabdbd6a2020-01-09 16:59:27348* You may want to [use a chroot](using_a_chroot.md) to
dpranke0ae7cad2016-11-30 07:47:58349 isolate yourself from versioning or packaging conflicts.
Tom Anderson93e49e492019-12-23 19:55:37350* Cross-compiling for ARM? See [LinuxChromiumArm](chromium_arm.md).
andybonsad92aa32015-08-31 02:27:44351* Want to use Eclipse as your IDE? See
Tom Anderson93e49e492019-12-23 19:55:37352 [LinuxEclipseDev](eclipse_dev.md).
dpranke0ae7cad2016-11-30 07:47:58353* Want to use your built version as your default browser? See
Tom Anderson93e49e492019-12-23 19:55:37354 [LinuxDevBuildAsDefaultBrowser](dev_build_as_default_browser.md).
andybons3322f762015-08-24 21:37:09355
dpranke2989a782016-12-02 02:57:12356## Next Steps
andybonsad92aa32015-08-31 02:27:44357
358If you want to contribute to the effort toward a Chromium-based browser for
Tom Anderson93e49e492019-12-23 19:55:37359Linux, please check out the [Linux Development page](development.md) for
andybonsad92aa32015-08-31 02:27:44360more information.
dpranke2989a782016-12-02 02:57:12361
362## Notes for other distros <a name="notes"></a>
363
364### Arch Linux
365
366Instead of running `install-build-deps.sh` to install build dependencies, run:
367
368```shell
369$ sudo pacman -S --needed python perl gcc gcc-libs bison flex gperf pkgconfig \
Timothy Gufe67f0b2021-05-20 22:07:04370nss alsa-lib glib2 gtk3 nspr freetype2 cairo dbus libgnome-keyring \
371xorg-server-xvfb xorg-xdpyinfo
dpranke2989a782016-12-02 02:57:12372```
373
374For the optional packages on Arch Linux:
375
376* `php-cgi` is provided with `pacman`
377* `wdiff` is not in the main repository but `dwdiff` is. You can get `wdiff`
378 in AUR/`yaourt`
dpranke2989a782016-12-02 02:57:12379
Kenneth Russell56293772018-09-21 01:46:15380### Crostini (Debian based)
381
David Munro9b5f4c4f2019-07-24 08:23:27382First install the `file` and `lsb-release` commands for the script to run properly:
Kenneth Russell56293772018-09-21 01:46:15383
384```shell
David Munro9b5f4c4f2019-07-24 08:23:27385$ sudo apt-get install file lsb-release
Kenneth Russell56293772018-09-21 01:46:15386```
387
388Then invoke install-build-deps.sh with the `--no-arm` argument,
389because the ARM toolchain doesn't exist for this configuration:
390
391```shell
392$ sudo install-build-deps.sh --no-arm
393```
394
dpranke2989a782016-12-02 02:57:12395### Fedora
396
397Instead of running `build/install-build-deps.sh`, run:
398
399```shell
400su -c 'yum install git python bzip2 tar pkgconfig atk-devel alsa-lib-devel \
401bison binutils brlapi-devel bluez-libs-devel bzip2-devel cairo-devel \
402cups-devel dbus-devel dbus-glib-devel expat-devel fontconfig-devel \
Tom Anderson287339e2018-08-22 21:52:02403freetype-devel gcc-c++ glib2-devel glibc.i686 gperf glib2-devel \
Tim Brown36312fc2017-12-15 22:56:20404gtk3-devel java-1.*.0-openjdk-devel libatomic libcap-devel libffi-devel \
405libgcc.i686 libgnome-keyring-devel libjpeg-devel libstdc++.i686 libX11-devel \
406libXScrnSaver-devel libXtst-devel libxkbcommon-x11-devel ncurses-compat-libs \
407nspr-devel nss-devel pam-devel pango-devel pciutils-devel \
408pulseaudio-libs-devel zlib.i686 httpd mod_ssl php php-cli python-psutil wdiff \
409xorg-x11-server-Xvfb'
dpranke2989a782016-12-02 02:57:12410```
411
Kent Tamura59ffb022018-11-27 05:30:56412The fonts needed by Blink's web tests can be obtained by following [these
Victor Costan44af72b2017-11-13 20:01:30413instructions](https://gist.github.com/pwnall/32a3b11c2b10f6ae5c6a6de66c1e12ae).
414For the optional packages:
dpranke2989a782016-12-02 02:57:12415
416* `php-cgi` is provided by the `php-cli` package.
Victor Costan44af72b2017-11-13 20:01:30417* `sun-java6-fonts` is covered by the instructions linked above.
dpranke2989a782016-12-02 02:57:12418
419### Gentoo
420
421You can just run `emerge www-client/chromium`.
422
dpranke2989a782016-12-02 02:57:12423### OpenSUSE
424
425Use `zypper` command to install dependencies:
426
427(openSUSE 11.1 and higher)
428
429```shell
Tim Brown36312fc2017-12-15 22:56:20430sudo zypper in subversion pkg-config python perl bison flex gperf \
431 mozilla-nss-devel glib2-devel gtk-devel wdiff lighttpd gcc gcc-c++ \
432 mozilla-nspr mozilla-nspr-devel php5-fastcgi alsa-devel libexpat-devel \
dpranke2989a782016-12-02 02:57:12433 libjpeg-devel libbz2-devel
434```
435
436For 11.0, use `libnspr4-0d` and `libnspr4-dev` instead of `mozilla-nspr` and
Tom Anderson287339e2018-08-22 21:52:02437`mozilla-nspr-devel`, and use `php5-cgi` instead of `php5-fastcgi`.
dpranke2989a782016-12-02 02:57:12438
439(openSUSE 11.0)
440
441```shell
442sudo zypper in subversion pkg-config python perl \
443 bison flex gperf mozilla-nss-devel glib2-devel gtk-devel \
444 libnspr4-0d libnspr4-dev wdiff lighttpd gcc gcc-c++ libexpat-devel \
Tom Anderson287339e2018-08-22 21:52:02445 php5-cgi alsa-devel gtk3-devel jpeg-devel
dpranke2989a782016-12-02 02:57:12446```
447
448The Ubuntu package `sun-java6-fonts` contains a subset of Java of the fonts used.
449Since this package requires Java as a prerequisite anyway, we can do the same
450thing by just installing the equivalent openSUSE Sun Java package:
451
452```shell
453sudo zypper in java-1_6_0-sun
454```
455
456WebKit is currently hard-linked to the Microsoft fonts. To install these using `zypper`
457
458```shell
459sudo zypper in fetchmsttfonts pullin-msttf-fonts
460```
461
462To make the fonts installed above work, as the paths are hardcoded for Ubuntu,
463create symlinks to the appropriate locations:
464
465```shell
466sudo mkdir -p /usr/share/fonts/truetype/msttcorefonts
467sudo ln -s /usr/share/fonts/truetype/arial.ttf /usr/share/fonts/truetype/msttcorefonts/Arial.ttf
468sudo ln -s /usr/share/fonts/truetype/arialbd.ttf /usr/share/fonts/truetype/msttcorefonts/Arial_Bold.ttf
469sudo ln -s /usr/share/fonts/truetype/arialbi.ttf /usr/share/fonts/truetype/msttcorefonts/Arial_Bold_Italic.ttf
470sudo ln -s /usr/share/fonts/truetype/ariali.ttf /usr/share/fonts/truetype/msttcorefonts/Arial_Italic.ttf
471sudo ln -s /usr/share/fonts/truetype/comic.ttf /usr/share/fonts/truetype/msttcorefonts/Comic_Sans_MS.ttf
472sudo ln -s /usr/share/fonts/truetype/comicbd.ttf /usr/share/fonts/truetype/msttcorefonts/Comic_Sans_MS_Bold.ttf
473sudo ln -s /usr/share/fonts/truetype/cour.ttf /usr/share/fonts/truetype/msttcorefonts/Courier_New.ttf
474sudo ln -s /usr/share/fonts/truetype/courbd.ttf /usr/share/fonts/truetype/msttcorefonts/Courier_New_Bold.ttf
475sudo ln -s /usr/share/fonts/truetype/courbi.ttf /usr/share/fonts/truetype/msttcorefonts/Courier_New_Bold_Italic.ttf
476sudo ln -s /usr/share/fonts/truetype/couri.ttf /usr/share/fonts/truetype/msttcorefonts/Courier_New_Italic.ttf
477sudo ln -s /usr/share/fonts/truetype/impact.ttf /usr/share/fonts/truetype/msttcorefonts/Impact.ttf
478sudo ln -s /usr/share/fonts/truetype/times.ttf /usr/share/fonts/truetype/msttcorefonts/Times_New_Roman.ttf
479sudo ln -s /usr/share/fonts/truetype/timesbd.ttf /usr/share/fonts/truetype/msttcorefonts/Times_New_Roman_Bold.ttf
480sudo ln -s /usr/share/fonts/truetype/timesbi.ttf /usr/share/fonts/truetype/msttcorefonts/Times_New_Roman_Bold_Italic.ttf
481sudo ln -s /usr/share/fonts/truetype/timesi.ttf /usr/share/fonts/truetype/msttcorefonts/Times_New_Roman_Italic.ttf
482sudo ln -s /usr/share/fonts/truetype/verdana.ttf /usr/share/fonts/truetype/msttcorefonts/Verdana.ttf
483sudo ln -s /usr/share/fonts/truetype/verdanab.ttf /usr/share/fonts/truetype/msttcorefonts/Verdana_Bold.ttf
484sudo ln -s /usr/share/fonts/truetype/verdanai.ttf /usr/share/fonts/truetype/msttcorefonts/Verdana_Italic.ttf
485sudo ln -s /usr/share/fonts/truetype/verdanaz.ttf /usr/share/fonts/truetype/msttcorefonts/Verdana_Bold_Italic.ttf
486```
487
488The Ubuntu package `sun-java6-fonts` contains a subset of Java of the fonts used.
489Since this package requires Java as a prerequisite anyway, we can do the same
490thing by just installing the equivalent openSUSE Sun Java package:
491
492```shell
493sudo zypper in java-1_6_0-sun
494```
495
496WebKit is currently hard-linked to the Microsoft fonts. To install these using `zypper`
497
498```shell
499sudo zypper in fetchmsttfonts pullin-msttf-fonts
500```
501
502To make the fonts installed above work, as the paths are hardcoded for Ubuntu,
503create symlinks to the appropriate locations:
504
505```shell
506sudo mkdir -p /usr/share/fonts/truetype/msttcorefonts
507sudo ln -s /usr/share/fonts/truetype/arial.ttf /usr/share/fonts/truetype/msttcorefonts/Arial.ttf
508sudo ln -s /usr/share/fonts/truetype/arialbd.ttf /usr/share/fonts/truetype/msttcorefonts/Arial_Bold.ttf
509sudo ln -s /usr/share/fonts/truetype/arialbi.ttf /usr/share/fonts/truetype/msttcorefonts/Arial_Bold_Italic.ttf
510sudo ln -s /usr/share/fonts/truetype/ariali.ttf /usr/share/fonts/truetype/msttcorefonts/Arial_Italic.ttf
511sudo ln -s /usr/share/fonts/truetype/comic.ttf /usr/share/fonts/truetype/msttcorefonts/Comic_Sans_MS.ttf
512sudo ln -s /usr/share/fonts/truetype/comicbd.ttf /usr/share/fonts/truetype/msttcorefonts/Comic_Sans_MS_Bold.ttf
513sudo ln -s /usr/share/fonts/truetype/cour.ttf /usr/share/fonts/truetype/msttcorefonts/Courier_New.ttf
514sudo ln -s /usr/share/fonts/truetype/courbd.ttf /usr/share/fonts/truetype/msttcorefonts/Courier_New_Bold.ttf
515sudo ln -s /usr/share/fonts/truetype/courbi.ttf /usr/share/fonts/truetype/msttcorefonts/Courier_New_Bold_Italic.ttf
516sudo ln -s /usr/share/fonts/truetype/couri.ttf /usr/share/fonts/truetype/msttcorefonts/Courier_New_Italic.ttf
517sudo ln -s /usr/share/fonts/truetype/impact.ttf /usr/share/fonts/truetype/msttcorefonts/Impact.ttf
518sudo ln -s /usr/share/fonts/truetype/times.ttf /usr/share/fonts/truetype/msttcorefonts/Times_New_Roman.ttf
519sudo ln -s /usr/share/fonts/truetype/timesbd.ttf /usr/share/fonts/truetype/msttcorefonts/Times_New_Roman_Bold.ttf
520sudo ln -s /usr/share/fonts/truetype/timesbi.ttf /usr/share/fonts/truetype/msttcorefonts/Times_New_Roman_Bold_Italic.ttf
521sudo ln -s /usr/share/fonts/truetype/timesi.ttf /usr/share/fonts/truetype/msttcorefonts/Times_New_Roman_Italic.ttf
522sudo ln -s /usr/share/fonts/truetype/verdana.ttf /usr/share/fonts/truetype/msttcorefonts/Verdana.ttf
523sudo ln -s /usr/share/fonts/truetype/verdanab.ttf /usr/share/fonts/truetype/msttcorefonts/Verdana_Bold.ttf
524sudo ln -s /usr/share/fonts/truetype/verdanai.ttf /usr/share/fonts/truetype/msttcorefonts/Verdana_Italic.ttf
525sudo ln -s /usr/share/fonts/truetype/verdanaz.ttf /usr/share/fonts/truetype/msttcorefonts/Verdana_Bold_Italic.ttf
526```
527
528And then for the Java fonts:
529
530```shell
531sudo mkdir -p /usr/share/fonts/truetype/ttf-lucida
532sudo find /usr/lib*/jvm/java-1.6.*-sun-*/jre/lib -iname '*.ttf' -print \
533 -exec ln -s {} /usr/share/fonts/truetype/ttf-lucida \;
534```