Quuxplusone / LLVMBugzillaTest

0 stars 0 forks source link

14 GB of storage and memory is not enough to build Clang 10 #46019

Open Quuxplusone opened 4 years ago

Quuxplusone commented 4 years ago
Bugzilla Link PR47050
Status NEW
Importance P enhancement
Reported by Jeffrey Walton (noloader@gmail.com)
Reported on 2020-08-08 03:44:37 -0700
Last modified on 2020-08-08 20:38:53 -0700
Version 10.0
Hardware PC Linux
CC dblaikie@gmail.com, htmldeveloper@gmail.com, llvm-bugs@lists.llvm.org, neeilans@live.com, richard-llvm@metafoo.co.uk
Fixed by commit(s)
Attachments
Blocks
Blocked by
See also
I'm working on Gentoo26 in a VM with 2 cores. The machine has 7.5 GB of free
disk space, 2 GB of RAM and 4 GB of swap.

The combined memory and storage is approximately 14 GB, but it is not enough to
build Clang. 'emerge llvm clang' consistently fails even after 'rm -rf
/var/tmp/*'.

The tail of the build is:

/usr/bin/x86_64-pc-linux-gnu-ar: lib64/libLLVMX86CodeGen.a: No space left on
device
ninja: build stopped: subcommand failed.
 * ERROR: sys-devel/llvm-10.0.0::gentoo failed (compile phase):
 *   ninja -v -j3 -l0 failed
 ...

I think something is really sideways here. There is an abundance of free space;
but the build seems to be incredibly wasteful.
Quuxplusone commented 4 years ago

If there's any particular inefficiency you can find - we're all ears.

But beyond that, building the entire LLVM project from source in its default configuration (I've no idea what "emerge" does - whether it customizes the configuration in some way) - which is an unoptimized build (larger object and executables) with debug info (much larger object an executables) does take quite a lot of storage space (& quite a bit of RAM during linking all those binaries in parallel).

Quuxplusone commented 4 years ago

Your 2GB of physical RAM is quite small, as generally any linux will be recommended to have a minimal 4GB of physical RAM.

Part of physical RAM is given to linux kernel - and this part of memory is NOT swappable, so all your physical storage setup for SWAP space are totally useless.