<div dir="ltr">Thankyou,<div><br></div><div>I changed my linker to lld and it worked.</div><div><br></div><div>I have written the steps here if anyone wants</div><div><a href="https://github.com/suyashsingh234/rtems-notes/blob/master/README.md">https://github.com/suyashsingh234/rtems-notes/blob/master/README.md</a> </div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Mar 26, 2020 at 1:05 AM Robinson, Paul <<a href="mailto:paul.robinson@sony.com">paul.robinson@sony.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div lang="EN-US">
<div class="gmail-m_863567307009469804WordSection1">
<p class="MsoNormal">The error message is typical of the ran-out-of-memory condition.<u></u><u></u></p>
<p class="MsoNormal">It appears you are using ld as your linker? (it is the default on Ubuntu) Our usual next suggestion is to use gold or lld instead, as they consume less memory. There are instructions on the web for making gold your default linker.<u></u><u></u></p>
<p class="MsoNormal">If that is not practical, the other suggestion is to reduce the number of threads (the -j option to make or ninja). If you are doing a Debug build, likely you would need to use -j1.<u></u><u></u></p>
<p class="MsoNormal">Best regards,<u></u><u></u></p>
<p class="MsoNormal">--paulr<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<div style="border-top:none;border-right:none;border-bottom:none;border-left:1.5pt solid blue;padding:0in 0in 0in 4pt">
<div>
<div style="border-right:none;border-bottom:none;border-left:none;border-top:1pt solid rgb(225,225,225);padding:3pt 0in 0in">
<p class="MsoNormal"><b>From:</b> cfe-dev <<a href="mailto:cfe-dev-bounces@lists.llvm.org" target="_blank">cfe-dev-bounces@lists.llvm.org</a>> <b>On Behalf Of
</b>suyash singh via cfe-dev<br>
<b>Sent:</b> Wednesday, March 25, 2020 2:07 PM<br>
<b>To:</b> <a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a><br>
<b>Subject:</b> [cfe-dev] collect2: fatal error: ld terminated with signal 9 [Killed] clang<u></u><u></u></p>
</div>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<p class="MsoNormal">I was building clang on Ubuntu 18.04<u></u><u></u></p>
<div>
<p class="MsoNormal"><a href="https://clang.llvm.org/get_started.html#build" target="_blank">https://clang.llvm.org/get_started.html#build</a><u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">and got the error message<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><i>collect2: fatal error: ld terminated with signal 9 [Killed] clang</i><u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">I have 8 GB ram<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">and increased the Linux swap to 40 GB but still same problem.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">Full error message<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><i>collect2: fatal error: ld terminated with signal 9 [Killed]<br>
compilation terminated.<br>
tools/lto/CMakeFiles/LTO.dir/build.make:270: recipe for target 'lib/libLTO.so.11git' failed<br>
make[2]: *** [lib/libLTO.so.11git] Error 1<br>
make[2]: *** Deleting file 'lib/libLTO.so.11git'<br>
CMakeFiles/Makefile2:23538: recipe for target 'tools/lto/CMakeFiles/LTO.dir/all' failed<br>
make[1]: *** [tools/lto/CMakeFiles/LTO.dir/all] Error 2<br>
Makefile:151: recipe for target 'all' failed<br>
make: *** [all] Error 2</i><u></u><u></u></p>
</div>
</div>
</div>
</div>
</div>
</blockquote></div>