Compiling LLDB

David Chisnall theraven at FreeBSD.org
Tue Mar 31 09:01:31 UTC 2015


On 31 Mar 2015, at 02:53, Ed Maste <emaste at freebsd.org> wrote:
> 
> I'd suggest checking /var/log/messages for further information. Is
> this i386 or amd64, how much memory does your build host have, and are
> you compiling with debug information or no? If had to guess, you're
> running out of memory (or running into ulimit) during linking, and the
> process is being killed as a result.

Ninja defaults to using a large number of concurrent processes, which can exacerbate this.  If you are on a 32-bit system, or only have 4GB or so of RAM (or have <2GB per core), you may want to explicitly do ninja -j1 to get a serial build.  Your best bet is probably something like:

$ ninja -k100
$ ninja -j1

The first will do a parallel build of everything that doesn't crash.  The second will do a serial build of whatever's left.  It's also possible to configure different pools for Ninja, though I'm not sure that this is exposed via the CMake interface yet.  This mechanism exists to allow you to say things like 'only run one link job at a time', which can improve matters.  You may also find that using gold from ports (or possibly lld, which I believe can now link lldb) will improve matters.

David



More information about the freebsd-toolchain mailing list