[llvm-dev] error in building llvm with default options

Dimitry Andric via llvm-dev llvm-dev at lists.llvm.org
Sat Jan 4 00:44:18 PST 2020


This question comes up more often, it should really be in some FAQ. :)  These OOM errors are normally caused by link jobs eating all of the available memory.

Try re-running your CMake command with the following option added: -D LLVM_PARALLEL_LINK_JOBS=1 (or 2 if you have lots of RAM).  Then re-run your build.

-Dimitry

> On 2 Jan 2020, at 14:14, Priyanka Panigrahi via llvm-dev <llvm-dev at lists.llvm.org> wrote:
> 
> hello,
> 
> I am trying to build LLVM with default options. I am getting the following error message after make.
> 
> [100%] Building C object tools/llvm-c-test/CMakeFiles/llvm-c-test.dir/metadata.c.o
> [100%] Building C object tools/llvm-c-test/CMakeFiles/llvm-c-test.dir/module.c.o
> [100%] Building C object tools/llvm-c-test/CMakeFiles/llvm-c-test.dir/object.c.o
> [100%] Building C object tools/llvm-c-test/CMakeFiles/llvm-c-test.dir/targets.c.o
> [100%] Linking CXX executable ../../bin/llvm-c-test
> clang: error: unable to execute command: Killed
> clang: error: linker command failed due to signal (use -v to see invocation)
> tools/llvm-lto/CMakeFiles/llvm-lto.dir/build.make:211: recipe for target 'bin/llvm-lto' failed
> make[2]: *** [bin/llvm-lto] Error 254
> CMakeFiles/Makefile2:21155: recipe for target 'tools/llvm-lto/CMakeFiles/llvm-lto.dir/all' failed
> make[1]: *** [tools/llvm-lto/CMakeFiles/llvm-lto.dir/all] Error 2
> [100%] Built target llvm-lipo
> clang: error: unable to execute command: Killed
> clang: error: linker command failed due to signal (use -v to see invocation)
> tools/llc/CMakeFiles/llc.dir/build.make:212: recipe for target 'bin/llc' failed
> make[2]: *** [bin/llc] Error 254
> CMakeFiles/Makefile2:22024: recipe for target 'tools/llc/CMakeFiles/llc.dir/all' failed
> make[1]: *** [tools/llc/CMakeFiles/llc.dir/all] Error 2
> clang: error: unable to execute command: Killed
> clang: error: linker command failed due to signal (use -v to see invocation)
> tools/dsymutil/CMakeFiles/dsymutil.dir/build.make:476: recipe for target 'bin/dsymutil' failed
> make[2]: *** [bin/dsymutil] Error 254
> CMakeFiles/Makefile2:21803: recipe for target 'tools/dsymutil/CMakeFiles/dsymutil.dir/all' failed
> make[1]: *** [tools/dsymutil/CMakeFiles/dsymutil.dir/all] Error 2
> clang: error: unable to execute command: Killed
> clang: error: linker command failed due to signal (use -v to see invocation)
> tools/llvm-dwp/CMakeFiles/llvm-dwp.dir/build.make:230: recipe for target 'bin/llvm-dwp' failed
> make[2]: *** [bin/llvm-dwp] Error 254
> CMakeFiles/Makefile2:24606: recipe for target 'tools/llvm-dwp/CMakeFiles/llvm-dwp.dir/all' failed
> make[1]: *** [tools/llvm-dwp/CMakeFiles/llvm-dwp.dir/all] Error 2
> clang: error: unable to execute command: Killed
> clang: error: linker command failed due to signal (use -v to see invocation)
> tools/llvm-lto2/CMakeFiles/llvm-lto2.dir/build.make:210: recipe for target 'bin/llvm-lto2' failed
> make[2]: *** [bin/llvm-lto2] Error 254
> CMakeFiles/Makefile2:26436: recipe for target 'tools/llvm-lto2/CMakeFiles/llvm-lto2.dir/all' failed
> make[1]: *** [tools/llvm-lto2/CMakeFiles/llvm-lto2.dir/all] Error 2
> [100%] Built target lli
> clang: error: unable to execute command: Killed
> clang: error: linker command failed due to signal (use -v to see invocation)
> tools/llvm-isel-fuzzer/CMakeFiles/llvm-isel-fuzzer.dir/build.make:238: recipe for target 'bin/llvm-isel-fuzzer' failed
> make[2]: *** [bin/llvm-isel-fuzzer] Error 254
> CMakeFiles/Makefile2:25580: recipe for target 'tools/llvm-isel-fuzzer/CMakeFiles/llvm-isel-fuzzer.dir/all' failed
> make[1]: *** [tools/llvm-isel-fuzzer/CMakeFiles/llvm-isel-fuzzer.dir/all] Error 2
> [100%] Built target llvm-opt-fuzzer
> [100%] Built target llvm-c-test
> [100%] Built target LTO
> Makefile:151: recipe for target 'all' failed
> make: *** [all] Error 2
> 
> Is it because of RAM? I am trying to build in a 16GB RAM, 12 core processor.
> Can anyone please help what am I missing?
> 
> Thank you for your time.
> 
> Priyanka
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 223 bytes
Desc: Message signed with OpenPGP
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20200104/46979b28/attachment.sig>


More information about the llvm-dev mailing list