<div dir="ltr"><div>Hello,</div><div><br></div><div>I tried to build the llvm with debug (default) type with many cmake options, such as</div><div><br></div><div>1. -DLLVM_ENABLE_LLD=True</div><div><br></div><div>2. BUILD_SHARED_LIBS</div><div><br></div><div>3. -DLLVM_PARALLEL_LINK_JOBS=1</div><div><br></div><div>and many more but no luck.<br></div><div><br></div><div>Finally, I am able to successfully build the llvm with default cmake options in a system with 64GB RAM and 32 core processor.<br></div><div><br></div><div>But, these default options should change such that one will be able to build at least in a system with 8/16GB RAM. Otherwise, it is very difficult to build the debug type.<br></div><div><br></div><div>Thank you all for your help.</div><div><br></div><div>Priyanka<br></div><div><br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Jan 6, 2020 at 7:17 PM Priyanka Panigrahi <<a href="mailto:ppriyankacse@gmail.com">ppriyankacse@gmail.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 dir="ltr"><div>Hi,</div><div>I installed lld 6.0. Then run the cmake. make gives following error.</div><div><br></div><div>[ 18%] Linking CXX executable ../../bin/yaml-bench<br>/usr/bin/ld.lld: error: unknown argument: --push-state<br>/usr/bin/ld.lld: error: unknown argument: --pop-state<br>/usr/bin/ld.lld: error: unknown argument: --push-state<br>/usr/bin/ld.lld: error: unknown argument: --pop-state<br>[ 18%] Built target BugpointPasses_exports<br>[ 18%] Built target gtest<br>[ 18%] Linking CXX executable ../../bin/llvm-config<br>[ 18%] Built target llvm-PerfectShuffle<br>[ 18%] Linking CXX executable ../../bin/llvm-cxxfilt<br>[ 18%] Linking CXX executable ../../bin/llvm-undname<br>[ 18%] Built target Remarks_exports<br>[ 18%] Linking CXX shared library SecondLib.so<br>[ 18%] Built target SecondLib<br>[ 18%] Built target DynamicLibraryLib<br>[ 18%] Linking CXX shared library PipSqueak.so<br>collect2: error: ld returned 1 exit status<br>utils/count/CMakeFiles/count.dir/build.make:94: recipe for target 'bin/count' failed<br>make[2]: *** [bin/count] Error 1<br>CMakeFiles/Makefile2:19680: recipe for target 'utils/count/CMakeFiles/count.dir/all' failed<br>make[1]: *** [utils/count/CMakeFiles/count.dir/all] Error 2<br>make[1]: *** Waiting for unfinished jobs....<br>[ 18%] Built target PipSqueak<br>[ 18%] Built target llvm-undname<br>[ 18%] Built target not<br>[ 18%] Built target llvm-config<br>[ 18%] Built target FileCheck<br>[ 18%] Built target llvm-cxxfilt<br>[ 18%] Built target yaml-bench<br>Makefile:151: recipe for target 'all' failed<br>make: *** [all] Error 2</div><div><br></div><div>Am I missing something?</div><div><br></div><div>Regards,</div><div>Priyanka<br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Jan 3, 2020 at 2:39 AM Luís Marques <<a href="mailto:luismarques@lowrisc.org" target="_blank">luismarques@lowrisc.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">You need to install LLD to use that option (maybe it's part of your<br>
package manager's LLVM package).<br>
<br>
Regards,<br>
Luis<br>
<br>
On Thu, Jan 2, 2020 at 2:17 PM Priyanka Panigrahi<br>
<<a href="mailto:ppriyankacse@gmail.com" target="_blank">ppriyankacse@gmail.com</a>> wrote:<br>
><br>
> Thank you for your response.<br>
><br>
> I am getting the following error after cmake.<br>
><br>
> -- Could NOT find Z3: Found unsuitable version "0.0.0", but required is at least "4.7.1" (found Z3_LIBRARIES-NOTFOUND)<br>
> -- Could NOT find LibXml2 (missing: LIBXML2_LIBRARY LIBXML2_INCLUDE_DIR)<br>
> -- Native target architecture is X86<br>
> -- Threads enabled.<br>
> -- Doxygen disabled.<br>
> -- Go bindings disabled.<br>
> -- Could NOT find OCaml (missing: OCAMLFIND OCAML_VERSION OCAML_STDLIB_PATH)<br>
> -- Could NOT find OCaml (missing: OCAMLFIND OCAML_VERSION OCAML_STDLIB_PATH)<br>
> -- OCaml bindings disabled.<br>
> -- LLVM host triple: x86_64-unknown-linux-gnu<br>
> -- LLVM default target triple: x86_64-unknown-linux-gnu<br>
> /usr/bin/ar: creating t.a<br>
> CMake Error at cmake/modules/HandleLLVMOptions.cmake:256 (message):<br>
>   Host compiler does not support '-fuse-ld=lld'<br>
> Call Stack (most recent call first):<br>
>   CMakeLists.txt:643 (include)<br>
><br>
><br>
> -- Configuring incomplete, errors occurred!<br>
> See also "/home/priyanka/llvm_project/builddebug/CMakeFiles/CMakeOutput.log".<br>
> See also "/home/priyanka/llvm_project/builddebug/CMakeFiles/CMakeError.log".<br>
><br>
> I think I am missing other prerequisites. Can you help me?<br>
><br>
> Priyanka<br>
><br>
> On Thu, Jan 2, 2020 at 6:48 PM Luís Marques <<a href="mailto:luismarques@lowrisc.org" target="_blank">luismarques@lowrisc.org</a>> wrote:<br>
>><br>
>> At first glance it sounds like it. Try passing cmake<br>
>> "-DLLVM_ENABLE_LLD=True" to use LLD instead of the system linker,<br>
>> which will probably be the gnu one.<br>
>><br>
>> On Thu, Jan 2, 2020 at 1:14 PM Priyanka Panigrahi via llvm-dev<br>
>> <<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>> wrote:<br>
>> ><br>
>> > hello,<br>
>> ><br>
>> > I am trying to build LLVM with default options. I am getting the following error message after make.<br>
>> ><br>
>> > [100%] Building C object tools/llvm-c-test/CMakeFiles/llvm-c-test.dir/metadata.c.o<br>
>> > [100%] Building C object tools/llvm-c-test/CMakeFiles/llvm-c-test.dir/module.c.o<br>
>> > [100%] Building C object tools/llvm-c-test/CMakeFiles/llvm-c-test.dir/object.c.o<br>
>> > [100%] Building C object tools/llvm-c-test/CMakeFiles/llvm-c-test.dir/targets.c.o<br>
>> > [100%] Linking CXX executable ../../bin/llvm-c-test<br>
>> > clang: error: unable to execute command: Killed<br>
>> > clang: error: linker command failed due to signal (use -v to see invocation)<br>
>> > tools/llvm-lto/CMakeFiles/llvm-lto.dir/build.make:211: recipe for target 'bin/llvm-lto' failed<br>
>> > make[2]: *** [bin/llvm-lto] Error 254<br>
>> > CMakeFiles/Makefile2:21155: recipe for target 'tools/llvm-lto/CMakeFiles/llvm-lto.dir/all' failed<br>
>> > make[1]: *** [tools/llvm-lto/CMakeFiles/llvm-lto.dir/all] Error 2<br>
>> > [100%] Built target llvm-lipo<br>
>> > clang: error: unable to execute command: Killed<br>
>> > clang: error: linker command failed due to signal (use -v to see invocation)<br>
>> > tools/llc/CMakeFiles/llc.dir/build.make:212: recipe for target 'bin/llc' failed<br>
>> > make[2]: *** [bin/llc] Error 254<br>
>> > CMakeFiles/Makefile2:22024: recipe for target 'tools/llc/CMakeFiles/llc.dir/all' failed<br>
>> > make[1]: *** [tools/llc/CMakeFiles/llc.dir/all] Error 2<br>
>> > clang: error: unable to execute command: Killed<br>
>> > clang: error: linker command failed due to signal (use -v to see invocation)<br>
>> > tools/dsymutil/CMakeFiles/dsymutil.dir/build.make:476: recipe for target 'bin/dsymutil' failed<br>
>> > make[2]: *** [bin/dsymutil] Error 254<br>
>> > CMakeFiles/Makefile2:21803: recipe for target 'tools/dsymutil/CMakeFiles/dsymutil.dir/all' failed<br>
>> > make[1]: *** [tools/dsymutil/CMakeFiles/dsymutil.dir/all] Error 2<br>
>> > clang: error: unable to execute command: Killed<br>
>> > clang: error: linker command failed due to signal (use -v to see invocation)<br>
>> > tools/llvm-dwp/CMakeFiles/llvm-dwp.dir/build.make:230: recipe for target 'bin/llvm-dwp' failed<br>
>> > make[2]: *** [bin/llvm-dwp] Error 254<br>
>> > CMakeFiles/Makefile2:24606: recipe for target 'tools/llvm-dwp/CMakeFiles/llvm-dwp.dir/all' failed<br>
>> > make[1]: *** [tools/llvm-dwp/CMakeFiles/llvm-dwp.dir/all] Error 2<br>
>> > clang: error: unable to execute command: Killed<br>
>> > clang: error: linker command failed due to signal (use -v to see invocation)<br>
>> > tools/llvm-lto2/CMakeFiles/llvm-lto2.dir/build.make:210: recipe for target 'bin/llvm-lto2' failed<br>
>> > make[2]: *** [bin/llvm-lto2] Error 254<br>
>> > CMakeFiles/Makefile2:26436: recipe for target 'tools/llvm-lto2/CMakeFiles/llvm-lto2.dir/all' failed<br>
>> > make[1]: *** [tools/llvm-lto2/CMakeFiles/llvm-lto2.dir/all] Error 2<br>
>> > [100%] Built target lli<br>
>> > clang: error: unable to execute command: Killed<br>
>> > clang: error: linker command failed due to signal (use -v to see invocation)<br>
>> > tools/llvm-isel-fuzzer/CMakeFiles/llvm-isel-fuzzer.dir/build.make:238: recipe for target 'bin/llvm-isel-fuzzer' failed<br>
>> > make[2]: *** [bin/llvm-isel-fuzzer] Error 254<br>
>> > CMakeFiles/Makefile2:25580: recipe for target 'tools/llvm-isel-fuzzer/CMakeFiles/llvm-isel-fuzzer.dir/all' failed<br>
>> > make[1]: *** [tools/llvm-isel-fuzzer/CMakeFiles/llvm-isel-fuzzer.dir/all] Error 2<br>
>> > [100%] Built target llvm-opt-fuzzer<br>
>> > [100%] Built target llvm-c-test<br>
>> > [100%] Built target LTO<br>
>> > Makefile:151: recipe for target 'all' failed<br>
>> > make: *** [all] Error 2<br>
>> ><br>
>> > Is it because of RAM? I am trying to build in a 16GB RAM, 12 core processor.<br>
>> > Can anyone please help what am I missing?<br>
>> ><br>
>> > Thank you for your time.<br>
>> ><br>
>> > Priyanka<br>
>> > _______________________________________________<br>
>> > LLVM Developers mailing list<br>
>> > <a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a><br>
>> > <a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br>
</blockquote></div>
</blockquote></div>