Reid Kleckner via llvm-dev
2020-Jan-02 21:12 UTC
[llvm-dev] error in building llvm with default options
The last time this came up, we agreed something should be done to fix the defaults, but nobody picked it up and ran with it. I think there was consensus, it just needs legwork now. On Thu, Jan 2, 2020 at 11:58 AM Aaron Smith via llvm-dev < llvm-dev at lists.llvm.org> wrote:> There was a recent thread on reducing memory: > http://lists.llvm.org/pipermail/llvm-dev/2019-June/thread.html#133215 > > On Thu, Jan 2, 2020 at 11:24 AM David Blaikie via llvm-dev > <llvm-dev at lists.llvm.org> wrote: > > > > Various options for reducing memory usage when building LLVM: > > * Don't use bfd-ld, at least use gold, probably use lld if you have it > available > > * With Ninja and/or CMake there's some way to specify the maximum number > of concurrent linkactions - lower this to fit in your available memory > > * If you're building with debug info: Use Split DWARF > > > > > > On Thu, Jan 2, 2020 at 5:21 AM Kókai Péter via llvm-dev < > llvm-dev at lists.llvm.org> wrote: > >> > >> Hello, > >> > >> I cannot tell you if this is due to ram, but I had ram issue with 32 > >> GB + 16 core when build with default options (clang was around 1 GB > >> binary), you could try to enable shared libraries(BUILD_SHARED_LIBS). > >> In that case I did not run into out of memory kind of issues. > >> > >> -- > >> Kokan > >> > >> On Thu, 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 > >> _______________________________________________ > >> LLVM Developers mailing list > >> llvm-dev at lists.llvm.org > >> https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev > > > > _______________________________________________ > > LLVM Developers mailing list > > llvm-dev at lists.llvm.org > > https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20200102/dd1de22e/attachment.html>
Kókai Péter via llvm-dev
2020-Jan-03 07:21 UTC
[llvm-dev] error in building llvm with default options
Hello, I am willing to work on changing the defaults reducing memory for build. Do you have a link for discussion about the agreement? I am just looking for pointers - as I am pretty much inexperienced with llvm compilation - that could be checked out for finding better defaults. Regardless I am going to check out things mentioned in this thread. -- Kokan On Thu, 2 Jan 2020, 10:12 pm Reid Kleckner via llvm-dev, < llvm-dev at lists.llvm.org> wrote:> The last time this came up, we agreed something should be done to fix the > defaults, but nobody picked it up and ran with it. I think there was > consensus, it just needs legwork now. > > On Thu, Jan 2, 2020 at 11:58 AM Aaron Smith via llvm-dev < > llvm-dev at lists.llvm.org> wrote: > >> There was a recent thread on reducing memory: >> http://lists.llvm.org/pipermail/llvm-dev/2019-June/thread.html#133215 >> >> On Thu, Jan 2, 2020 at 11:24 AM David Blaikie via llvm-dev >> <llvm-dev at lists.llvm.org> wrote: >> > >> > Various options for reducing memory usage when building LLVM: >> > * Don't use bfd-ld, at least use gold, probably use lld if you have it >> available >> > * With Ninja and/or CMake there's some way to specify the maximum >> number of concurrent linkactions - lower this to fit in your available >> memory >> > * If you're building with debug info: Use Split DWARF >> > >> > >> > On Thu, Jan 2, 2020 at 5:21 AM Kókai Péter via llvm-dev < >> llvm-dev at lists.llvm.org> wrote: >> >> >> >> Hello, >> >> >> >> I cannot tell you if this is due to ram, but I had ram issue with 32 >> >> GB + 16 core when build with default options (clang was around 1 GB >> >> binary), you could try to enable shared libraries(BUILD_SHARED_LIBS). >> >> In that case I did not run into out of memory kind of issues. >> >> >> >> -- >> >> Kokan >> >> >> >> On Thu, 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 >> >> _______________________________________________ >> >> LLVM Developers mailing list >> >> llvm-dev at lists.llvm.org >> >> https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev >> > >> > _______________________________________________ >> > LLVM Developers mailing list >> > llvm-dev at lists.llvm.org >> > https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev >> _______________________________________________ >> LLVM Developers mailing list >> llvm-dev at lists.llvm.org >> https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev >> > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20200103/ea8852a6/attachment-0001.html>
David Tellenbach via llvm-dev
2020-Jan-03 10:13 UTC
[llvm-dev] error in building llvm with default options
Hi all, the following could also be of interest: http://lists.llvm.org/pipermail/llvm-dev/2019-November/thread.html#137226 <http://lists.llvm.org/pipermail/llvm-dev/2019-November/thread.html#137226> David> On 3. Jan 2020, at 08:21, Kókai Péter via llvm-dev <llvm-dev at lists.llvm.org> wrote: > > Hello, > > I am willing to work on changing the defaults reducing memory for build. Do you have a link for discussion about the agreement? > I am just looking for pointers - as I am pretty much inexperienced with llvm compilation - that could be checked out for finding better defaults. Regardless I am going to check out things mentioned in this thread. > > -- > Kokan > > > On Thu, 2 Jan 2020, 10:12 pm Reid Kleckner via llvm-dev, <llvm-dev at lists.llvm.org <mailto:llvm-dev at lists.llvm.org>> wrote: > The last time this came up, we agreed something should be done to fix the defaults, but nobody picked it up and ran with it. I think there was consensus, it just needs legwork now. > > On Thu, Jan 2, 2020 at 11:58 AM Aaron Smith via llvm-dev <llvm-dev at lists.llvm.org <mailto:llvm-dev at lists.llvm.org>> wrote: > There was a recent thread on reducing memory: > http://lists.llvm.org/pipermail/llvm-dev/2019-June/thread.html#133215 <http://lists.llvm.org/pipermail/llvm-dev/2019-June/thread.html#133215> > > On Thu, Jan 2, 2020 at 11:24 AM David Blaikie via llvm-dev > <llvm-dev at lists.llvm.org <mailto:llvm-dev at lists.llvm.org>> wrote: > > > > Various options for reducing memory usage when building LLVM: > > * Don't use bfd-ld, at least use gold, probably use lld if you have it available > > * With Ninja and/or CMake there's some way to specify the maximum number of concurrent linkactions - lower this to fit in your available memory > > * If you're building with debug info: Use Split DWARF > > > > > > On Thu, Jan 2, 2020 at 5:21 AM Kókai Péter via llvm-dev <llvm-dev at lists.llvm.org <mailto:llvm-dev at lists.llvm.org>> wrote: > >> > >> Hello, > >> > >> I cannot tell you if this is due to ram, but I had ram issue with 32 > >> GB + 16 core when build with default options (clang was around 1 GB > >> binary), you could try to enable shared libraries(BUILD_SHARED_LIBS). > >> In that case I did not run into out of memory kind of issues. > >> > >> -- > >> Kokan > >> > >> On Thu, 2 Jan 2020 at 14:14, Priyanka Panigrahi via llvm-dev > >> <llvm-dev at lists.llvm.org <mailto: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 <mailto:llvm-dev at lists.llvm.org> > >> > https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev <https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev> > >> _______________________________________________ > >> LLVM Developers mailing list > >> llvm-dev at lists.llvm.org <mailto:llvm-dev at lists.llvm.org> > >> https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev <https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev> > > > > _______________________________________________ > > LLVM Developers mailing list > > llvm-dev at lists.llvm.org <mailto:llvm-dev at lists.llvm.org> > > https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev <https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev> > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org <mailto:llvm-dev at lists.llvm.org> > https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev <https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev> > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org <mailto:llvm-dev at lists.llvm.org> > https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev <https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev> > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20200103/c8b9f811/attachment.html>
Reid Kleckner via llvm-dev
2020-Jan-03 23:50 UTC
[llvm-dev] error in building llvm with default options
I looked back at the linked thread from November, and the two things that jump out are: - Come up with some conditions under which LLVM_USE_SPLIT_DWARF can be ON by default without user intervention. Could be a compiler version check or an autoconf style feature test. - Try to add -fuse-ld=lld and -fuse-ld=gold to linker flags, if either works, do that. There was a discussion about LLVM_OPTIMIZED_TABLEGEN defaulting to on. You could probably get consensus for that change, but I don't like it. :) On Thu, Jan 2, 2020 at 11:22 PM Kókai Péter <kokaipeter at gmail.com> wrote:> Hello, > > I am willing to work on changing the defaults reducing memory for build. > Do you have a link for discussion about the agreement? > I am just looking for pointers - as I am pretty much inexperienced with > llvm compilation - that could be checked out for finding better defaults. > Regardless I am going to check out things mentioned in this thread. > > -- > Kokan > > > On Thu, 2 Jan 2020, 10:12 pm Reid Kleckner via llvm-dev, < > llvm-dev at lists.llvm.org> wrote: > >> The last time this came up, we agreed something should be done to fix the >> defaults, but nobody picked it up and ran with it. I think there was >> consensus, it just needs legwork now. >> >> On Thu, Jan 2, 2020 at 11:58 AM Aaron Smith via llvm-dev < >> llvm-dev at lists.llvm.org> wrote: >> >>> There was a recent thread on reducing memory: >>> http://lists.llvm.org/pipermail/llvm-dev/2019-June/thread.html#133215 >>> >>> On Thu, Jan 2, 2020 at 11:24 AM David Blaikie via llvm-dev >>> <llvm-dev at lists.llvm.org> wrote: >>> > >>> > Various options for reducing memory usage when building LLVM: >>> > * Don't use bfd-ld, at least use gold, probably use lld if you have it >>> available >>> > * With Ninja and/or CMake there's some way to specify the maximum >>> number of concurrent linkactions - lower this to fit in your available >>> memory >>> > * If you're building with debug info: Use Split DWARF >>> > >>> > >>> > On Thu, Jan 2, 2020 at 5:21 AM Kókai Péter via llvm-dev < >>> llvm-dev at lists.llvm.org> wrote: >>> >> >>> >> Hello, >>> >> >>> >> I cannot tell you if this is due to ram, but I had ram issue with 32 >>> >> GB + 16 core when build with default options (clang was around 1 GB >>> >> binary), you could try to enable shared libraries(BUILD_SHARED_LIBS). >>> >> In that case I did not run into out of memory kind of issues. >>> >> >>> >> -- >>> >> Kokan >>> >> >>> >> On Thu, 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 >>> >> _______________________________________________ >>> >> LLVM Developers mailing list >>> >> llvm-dev at lists.llvm.org >>> >> https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev >>> > >>> > _______________________________________________ >>> > LLVM Developers mailing list >>> > llvm-dev at lists.llvm.org >>> > https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev >>> _______________________________________________ >>> LLVM Developers mailing list >>> llvm-dev at lists.llvm.org >>> https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev >>> >> _______________________________________________ >> LLVM Developers mailing list >> llvm-dev at lists.llvm.org >> https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev >> >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20200103/6ce17e38/attachment-0001.html>