<div dir="ltr">I have run into this problem before. Instead of adding more RAM to my machine, I found that doing a "sudo make" will often succeed.<div><br></div><div>Robert</div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Dec 24, 2021 at 8:09 AM via cfe-users <<a href="mailto:cfe-users@lists.llvm.org">cfe-users@lists.llvm.org</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">Send cfe-users mailing list submissions to<br>
        <a href="mailto:cfe-users@lists.llvm.org" target="_blank">cfe-users@lists.llvm.org</a><br>
<br>
To subscribe or unsubscribe via the World Wide Web, visit<br>
        <a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-users" rel="noreferrer" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-users</a><br>
or, via email, send a message with subject or body 'help' to<br>
        <a href="mailto:cfe-users-request@lists.llvm.org" target="_blank">cfe-users-request@lists.llvm.org</a><br>
<br>
You can reach the person managing the list at<br>
        <a href="mailto:cfe-users-owner@lists.llvm.org" target="_blank">cfe-users-owner@lists.llvm.org</a><br>
<br>
When replying, please edit your Subject line so it is more specific<br>
than "Re: Contents of cfe-users digest..."<br>
<br>
<br>
Today's Topics:<br>
<br>
   1. Issue with clang-13 (Sunil Kumar via cfe-users)<br>
   2. Re: Issue with clang-13 (Csaba Raduly via cfe-users)<br>
   3. Re: Issue with clang-13 (Matthew Fernandez via cfe-users)<br>
<br>
<br>
----------------------------------------------------------------------<br>
<br>
Message: 1<br>
Date: Fri, 24 Dec 2021 19:20:58 +0530<br>
From: Sunil Kumar via cfe-users <<a href="mailto:cfe-users@lists.llvm.org" target="_blank">cfe-users@lists.llvm.org</a>><br>
To: <a href="mailto:cfe-users@lists.llvm.org" target="_blank">cfe-users@lists.llvm.org</a><br>
Subject: [cfe-users] Issue with clang-13<br>
Message-ID:<br>
        <<a href="mailto:CADMBXb6DUfxcyC3egX8AE3aToDR-6m0W6weNp%2BguzwV6d5R3NQ@mail.gmail.com" target="_blank">CADMBXb6DUfxcyC3egX8AE3aToDR-6m0W6weNp+guzwV6d5R3NQ@mail.gmail.com</a>><br>
Content-Type: text/plain; charset="utf-8"<br>
<br>
Hi,<br>
I tried many times to install clang-13 in ubuntu-16.04. I followed the<br>
steps mentioned below.<br>
<br>
   - git clone <a href="https://github.com/llvm/llvm-project.git" rel="noreferrer" target="_blank">https://github.com/llvm/llvm-project.git</a><br>
   - git checkout llvmorg-13.0.0<br>
   - cd llvm-project<br>
   - mkdir build<br>
   - cd build<br>
   - cmake -DLLVM_ENABLE_PROJECTS=clang -G "Unix Makefiles" ../llvm<br>
   - make<br>
<br>
After running make command, it failed to install clang eventually and<br>
showed some error mentioned below<br>
----------------------------------------------------------------<br>
make:342: recipe for target 'bin/clang-13' failed<br>
make[2]: *** [bin/clang-13] Error 1<br>
make[2]: *** Deleting file 'bin/clang-13' CMakeFiles/Makefile2:38992:<br>
recipe for target 'tools/clang/tools/driver/CMakeFiles/clang.dir/all'<br>
failed<br>
make[1]: *** [tools/clang/tools/driver/CMakeFiles/clang.dir/all] Error 2<br>
collect2: fatal error: ld terminated with signal 9 [Killed] compilation<br>
terminated.<br>
-----------------------------------------------------------------<br>
Please help to resolve this bug.<br>
-- <br>
Sunil Kumar<br>
PhD21001<br>
Ph.D. Scholar<br>
HiPeC Lab <<a href="http://hipec.iiitd.edu.in/" rel="noreferrer" target="_blank">http://hipec.iiitd.edu.in/</a>> @IIIT-Delhi<br>
Homepage: <a href="https://justasunil.github.io/" rel="noreferrer" target="_blank">https://justasunil.github.io/</a><br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <<a href="http://lists.llvm.org/pipermail/cfe-users/attachments/20211224/be232374/attachment-0001.html" rel="noreferrer" target="_blank">http://lists.llvm.org/pipermail/cfe-users/attachments/20211224/be232374/attachment-0001.html</a>><br>
<br>
------------------------------<br>
<br>
Message: 2<br>
Date: Fri, 24 Dec 2021 15:45:33 +0100<br>
From: Csaba Raduly via cfe-users <<a href="mailto:cfe-users@lists.llvm.org" target="_blank">cfe-users@lists.llvm.org</a>><br>
To: Sunil Kumar <<a href="mailto:sunilk@iiitd.ac.in" target="_blank">sunilk@iiitd.ac.in</a>><br>
Cc: "CFE-Users \(Clang\)" <<a href="mailto:cfe-users@lists.llvm.org" target="_blank">cfe-users@lists.llvm.org</a>><br>
Subject: Re: [cfe-users] Issue with clang-13<br>
Message-ID:<br>
        <<a href="mailto:CAEhDDbCtgFetzdS55s2fdWowXy2GTnrpvyeEP-j1e_DS383s0A@mail.gmail.com" target="_blank">CAEhDDbCtgFetzdS55s2fdWowXy2GTnrpvyeEP-j1e_DS383s0A@mail.gmail.com</a>><br>
Content-Type: text/plain; charset="UTF-8"<br>
<br>
Hi Sunil,<br>
<br>
On Fri, 24 Dec 2021 at 14:51, Sunil Kumar via cfe-users<br>
<<a href="mailto:cfe-users@lists.llvm.org" target="_blank">cfe-users@lists.llvm.org</a>> wrote:<br>
><br>
> Hi,<br>
> I tried many times to install clang-13 in ubuntu-16.04. I followed the steps mentioned below.<br>
><br>
> git clone <a href="https://github.com/llvm/llvm-project.git" rel="noreferrer" target="_blank">https://github.com/llvm/llvm-project.git</a><br>
> git checkout llvmorg-13.0.0<br>
> cd llvm-project<br>
> mkdir build<br>
> cd build<br>
> cmake -DLLVM_ENABLE_PROJECTS=clang -G "Unix Makefiles" ../llvm<br>
> make<br>
><br>
> After running make command, it failed to install clang eventually and showed some error mentioned below<br>
> ----------------------------------------------------------------<br>
> make:342: recipe for target 'bin/clang-13' failed<br>
> make[2]: *** [bin/clang-13] Error 1<br>
> make[2]: *** Deleting file 'bin/clang-13' CMakeFiles/Makefile2:38992: recipe for target 'tools/clang/tools/driver/CMakeFiles/clang.dir/all' failed<br>
> make[1]: *** [tools/clang/tools/driver/CMakeFiles/clang.dir/all] Error 2<br>
> collect2: fatal error: ld terminated with signal 9 [Killed] compilation terminated.<br>
> -----------------------------------------------------------------<br>
> Please help to resolve this bug.<br>
<br>
It's not a bug in clang if you kill the linker program.<br>
<br>
If it wasn't you who killed the linker program, perhaps it was the<br>
out-of-memory killer. You can try to solve the out-of-memory issue:<br>
<br>
1. Buy more memory for your computer, or<br>
2. Delete the build directory, create it again, then add<br>
-DCMAKE_BUILD_TYPE=Release to the cmake command line, and build again.<br>
Debug builds require more memory, because of the large amount of debug<br>
info. Hopefully the release build will not run into out-of-memory.<br>
<br>
Are you using a 32-bit system by any chance?<br>
<br>
Csaba<br>
-- <br>
You can get very substantial performance improvements<br>
by not doing the right thing. - Scott Meyers, An Effective C++11/14 Sampler<br>
So if you're looking for a completely portable, 100% standards-conformant way<br>
to get the wrong information: this is what you want. - Scott Meyers (C++TDaWYK)<br>
<br>
<br>
------------------------------<br>
<br>
Message: 3<br>
Date: Fri, 24 Dec 2021 08:09:49 -0800<br>
From: Matthew Fernandez via cfe-users <<a href="mailto:cfe-users@lists.llvm.org" target="_blank">cfe-users@lists.llvm.org</a>><br>
To: Csaba Raduly <<a href="mailto:rcsaba@gmail.com" target="_blank">rcsaba@gmail.com</a>><br>
Cc: "CFE-Users \(Clang\)" <<a href="mailto:cfe-users@lists.llvm.org" target="_blank">cfe-users@lists.llvm.org</a>><br>
Subject: Re: [cfe-users] Issue with clang-13<br>
Message-ID: <<a href="mailto:D72D5A30-2286-491E-B4AA-C12ED77A1F0C@gmail.com" target="_blank">D72D5A30-2286-491E-B4AA-C12ED77A1F0C@gmail.com</a>><br>
Content-Type: text/plain; charset="utf-8"<br>
<br>
<br>
> On Dec 24, 2021, at 06:45, Csaba Raduly via cfe-users <<a href="mailto:cfe-users@lists.llvm.org" target="_blank">cfe-users@lists.llvm.org</a>> wrote:<br>
> <br>
> Hi Sunil,<br>
> <br>
> On Fri, 24 Dec 2021 at 14:51, Sunil Kumar via cfe-users<br>
> <<a href="mailto:cfe-users@lists.llvm.org" target="_blank">cfe-users@lists.llvm.org</a> <mailto:<a href="mailto:cfe-users@lists.llvm.org" target="_blank">cfe-users@lists.llvm.org</a>>> wrote:<br>
>> <br>
>> Hi,<br>
>> I tried many times to install clang-13 in ubuntu-16.04. I followed the steps mentioned below.<br>
>> <br>
>> git clone <a href="https://github.com/llvm/llvm-project.git" rel="noreferrer" target="_blank">https://github.com/llvm/llvm-project.git</a><br>
>> git checkout llvmorg-13.0.0<br>
>> cd llvm-project<br>
>> mkdir build<br>
>> cd build<br>
>> cmake -DLLVM_ENABLE_PROJECTS=clang -G "Unix Makefiles" ../llvm<br>
>> make<br>
>> <br>
>> After running make command, it failed to install clang eventually and showed some error mentioned below<br>
>> ----------------------------------------------------------------<br>
>> make:342: recipe for target 'bin/clang-13' failed<br>
>> make[2]: *** [bin/clang-13] Error 1<br>
>> make[2]: *** Deleting file 'bin/clang-13' CMakeFiles/Makefile2:38992: recipe for target 'tools/clang/tools/driver/CMakeFiles/clang.dir/all' failed<br>
>> make[1]: *** [tools/clang/tools/driver/CMakeFiles/clang.dir/all] Error 2<br>
>> collect2: fatal error: ld terminated with signal 9 [Killed] compilation terminated.<br>
>> -----------------------------------------------------------------<br>
>> Please help to resolve this bug.<br>
> <br>
> It's not a bug in clang if you kill the linker program.<br>
> <br>
> If it wasn't you who killed the linker program, perhaps it was the<br>
> out-of-memory killer. You can try to solve the out-of-memory issue:<br>
> <br>
> 1. Buy more memory for your computer, or<br>
> 2. Delete the build directory, create it again, then add<br>
> -DCMAKE_BUILD_TYPE=Release to the cmake command line, and build again.<br>
> Debug builds require more memory, because of the large amount of debug<br>
> info. Hopefully the release build will not run into out-of-memory.<br>
> <br>
> Are you using a 32-bit system by any chance?<br>
<br>
You could also try -DLLVM_USE_SPLIT_DWARF=ON to cmake. This and some other options to explore at <a href="https://www.llvm.org/docs/CMake.html" rel="noreferrer" target="_blank">https://www.llvm.org/docs/CMake.html</a> <<a href="https://www.llvm.org/docs/CMake.html" rel="noreferrer" target="_blank">https://www.llvm.org/docs/CMake.html</a>>.<br>
<br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <<a href="http://lists.llvm.org/pipermail/cfe-users/attachments/20211224/40c10462/attachment.html" rel="noreferrer" target="_blank">http://lists.llvm.org/pipermail/cfe-users/attachments/20211224/40c10462/attachment.html</a>><br>
<br>
------------------------------<br>
<br>
Subject: Digest Footer<br>
<br>
_______________________________________________<br>
cfe-users mailing list<br>
<a href="mailto:cfe-users@lists.llvm.org" target="_blank">cfe-users@lists.llvm.org</a><br>
<a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-users" rel="noreferrer" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-users</a><br>
<br>
<br>
------------------------------<br>
<br>
End of cfe-users Digest, Vol 105, Issue 6<br>
*****************************************<br>
</blockquote></div>