[webkit-gtk] Compiling the lib w/ 4GB RAM

Adrian Perez de Castro aperez at igalia.com
Mon Nov 15 04:40:18 PST 2021

On Mon, 15 Nov 2021 09:40:00 +0100 René <gadefoxren at gmail.com> wrote:

> I spent this weekend trying to build the lib from the source code.
> Unfortunately I can't compile the file Unifiedxxx_767013ce-4.cpp,
> because the HDD is swappin like crazy. It seems 4 GB is not enough for
> the process although I'm running on console only so I can free some
> memory.. Is there any possibility to split these huge source files so
> gcc can handle the process w/ "only" ,) 4 GB RAM. Thanks..

With 4 GiB you will be tight to be able to build and link WebKit, but
it _might_ be possible with some tweaking:

- You can pass “-DENABLE_UNIFIED_BUILDS=OFF” to disable unified builds.
  This will save you some memory (as you guessed, building huge combined
  sources takes more RAM).

- Then the challenge is linking, this is slightly more likely to succeed
  using the GNU binutils linker instead of Gold. You can tell CMake to
  no try using Gold passing “-DUSE_LD_GOLD=OFF” to it.

- You may still run into low memory, setting “LDFLAGS='-Wl,--no-keep-memory'”
  in the environment before running CMake will definitely help.

- Last but not least, try to not run a desktop environment (like GNOME)
  at the same time, to leave more memory for the build process.

- If you still run low on memory, you may need to have some swap, or increase
  the amount of swap space.

I hope these tips help. Cheers,
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <http://lists.webkit.org/pipermail/webkit-gtk/attachments/20211115/f7eace48/attachment.bin>

More information about the webkit-gtk mailing list