Nancy
2014-Jun-02 13:37 UTC
[LLVMdev] How much memory clang llvm needs for debug compiling?
Hi, -- Best Regards, Yu Rong Tan
Nancy
2014-Jun-02 13:46 UTC
[LLVMdev] How much memory clang llvm needs for debug compiling?
$cd llvm-build $../llvm/configure --enable-targets=x86 make[4]:正在离开目录 `/home/nancy/work/build-llvm/tools/clang/tools/libclang' make[4]: 正在进入目录 `/home/nancy/work/build-llvm/tools/clang/tools/c-index-test' llvm[4]: Linking Debug+Asserts executable c-index-test llvm[4]: ======= Finished Linking Debug+Asserts Executable c-index-test make[4]:正在离开目录 `/home/nancy/work/build-llvm/tools/clang/tools/c-index-test' make[4]: 正在进入目录 `/home/nancy/work/build-llvm/tools/clang/tools/c-arcmt-test' llvm[4]: Linking Debug+Asserts executable c-arcmt-test llvm[4]: ======= Finished Linking Debug+Asserts Executable c-arcmt-test make[4]:正在离开目录 `/home/nancy/work/build-llvm/tools/clang/tools/c-arcmt-test' make[4]: 正在进入目录 `/home/nancy/work/build-llvm/tools/clang/tools/driver' llvm[4]: Linking Debug+Asserts executable clang /usr/bin/ld: 最终连接失败: 内存耗尽 ( in english : Memory exhausted) collect2: error: ld returned 1 exit status make[4]: *** [/home/nancy/work/build-llvm/Debug+Asserts/bin/clang] 错误 1 make[4]:正在离开目录 `/home/nancy/work/build-llvm/tools/clang/tools/driver' make[3]: *** [driver/.makeall] 错误 2 make[3]:正在离开目录 `/home/nancy/work/build-llvm/tools/clang/tools' make[2]: *** [all] 错误 1 make[2]:正在离开目录 `/home/nancy/work/build-llvm/tools/clang' make[1]: *** [clang/.makeall] 错误 2 make[1]:正在离开目录 `/home/nancy/work/build-llvm/tools' make: *** [all] 错误 1 What should I do to make debug enabled compiling successful? Anyone can tell me a tiny configuration which can save memory? I only have 3G RAM, Ubuntu kylin. -- Best Regards, Yu Rong Tan
Ronaldo Ferreira
2014-Jun-02 14:10 UTC
[LLVMdev] How much memory clang llvm needs for debug compiling?
I have a 7 years old computer with 1 GB RAM and I was able to build clang in debug mode. I created a swap file of 4 GB I think, and I've stopped using the computer at all, just grab some tea and wait. This link shows you how you can create a swap file: http://askubuntu.com/questions/178712/how-to-increase-swap-space At least for me it worked well. 2014-06-02 15:46 GMT+02:00 Nancy <nancydreaming at gmail.com>:> $cd llvm-build > $../llvm/configure --enable-targets=x86 > > > make[4]:正在离开目录 `/home/nancy/work/build-llvm/tools/clang/tools/libclang' > make[4]: 正在进入目录 > `/home/nancy/work/build-llvm/tools/clang/tools/c-index-test' > llvm[4]: Linking Debug+Asserts executable c-index-test > llvm[4]: ======= Finished Linking Debug+Asserts Executable c-index-test > make[4]:正在离开目录 `/home/nancy/work/build-llvm/tools/clang/tools/c-index-test' > make[4]: 正在进入目录 > `/home/nancy/work/build-llvm/tools/clang/tools/c-arcmt-test' > llvm[4]: Linking Debug+Asserts executable c-arcmt-test > llvm[4]: ======= Finished Linking Debug+Asserts Executable c-arcmt-test > make[4]:正在离开目录 `/home/nancy/work/build-llvm/tools/clang/tools/c-arcmt-test' > make[4]: 正在进入目录 `/home/nancy/work/build-llvm/tools/clang/tools/driver' > llvm[4]: Linking Debug+Asserts executable clang > /usr/bin/ld: 最终连接失败: 内存耗尽 ( in english : Memory exhausted) > collect2: error: ld returned 1 exit status > make[4]: *** [/home/nancy/work/build-llvm/Debug+Asserts/bin/clang] 错误 1 > make[4]:正在离开目录 `/home/nancy/work/build-llvm/tools/clang/tools/driver' > make[3]: *** [driver/.makeall] 错误 2 > make[3]:正在离开目录 `/home/nancy/work/build-llvm/tools/clang/tools' > make[2]: *** [all] 错误 1 > make[2]:正在离开目录 `/home/nancy/work/build-llvm/tools/clang' > make[1]: *** [clang/.makeall] 错误 2 > make[1]:正在离开目录 `/home/nancy/work/build-llvm/tools' > make: *** [all] 错误 1 > > > What should I do to make debug enabled compiling successful? Anyone > can tell me a tiny configuration which can save memory? I only have 3G > RAM, Ubuntu kylin. > > > -- > Best Regards, > Yu Rong Tan > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20140602/37362619/attachment.html>
Tim Northover
2014-Jun-02 14:18 UTC
[LLVMdev] How much memory clang llvm needs for debug compiling?
Hi,> What should I do to make debug enabled compiling successful? Anyone > can tell me a tiny configuration which can save memory? I only have 3G > RAM, Ubuntu kylin.3GB is probably going to be painful no matter what you do, but there are a few things to try. First, you could switch to ld.gold instead of ld.bfd. It uses much less memory when linking. It can also be helpful to reduce the parallelism of the build so that only one thing is linking at any one time. Finally, you can build clang with the debug info in separate files. This needs a newer gdb & gcc/clang to work properly, but 14.04 should be fine. This made a massive difference to me, so I'm really keen on the idea. I think for autoconf you need ".../configure --enable-split-dwarf" to use this. Good luck! Tim.
David Tweed
2014-Jun-02 14:42 UTC
[LLVMdev] How much memory clang llvm needs for debug compiling?
Hi, Just a question: are you doing the actual build on a 32-bit x86 machine (not a 64-bit x86-64 machine)? This seems to be sensible, but I've rarely had problems doing a debug build on x86 within 2GB of memory (after ensuring only one link at once); it's always been the x86-64 builds that are tricky under low memory. Regards, Dave -----Original Message----- From: llvmdev-bounces at cs.uiuc.edu [mailto:llvmdev-bounces at cs.uiuc.edu] On Behalf Of Nancy Sent: 02 June 2014 14:47 To: llvmbugs at cs.uiuc.edu; llvmdev at cs.uiuc.edu Subject: Re: [LLVMdev] How much memory clang llvm needs for debug compiling? $cd llvm-build $../llvm/configure --enable-targets=x86 make[4]:正在离开目录 `/home/nancy/work/build-llvm/tools/clang/tools/libclang' make[4]: 正在进入目录 `/home/nancy/work/build-llvm/tools/clang/tools/c-index-test' llvm[4]: Linking Debug+Asserts executable c-index-test llvm[4]: ======= Finished Linking Debug+Asserts Executable c-index-test make[4]:正在离开目录 `/home/nancy/work/build-llvm/tools/clang/tools/c-index-test' make[4]: 正在进入目录 `/home/nancy/work/build-llvm/tools/clang/tools/c-arcmt-test' llvm[4]: Linking Debug+Asserts executable c-arcmt-test llvm[4]: ======= Finished Linking Debug+Asserts Executable c-arcmt-test make[4]:正在离开目录 `/home/nancy/work/build-llvm/tools/clang/tools/c-arcmt-test' make[4]: 正在进入目录 `/home/nancy/work/build-llvm/tools/clang/tools/driver' llvm[4]: Linking Debug+Asserts executable clang /usr/bin/ld: 最终连接失败: 内存耗尽 ( in english : Memory exhausted) collect2: error: ld returned 1 exit status make[4]: *** [/home/nancy/work/build-llvm/Debug+Asserts/bin/clang] 错误 1 make[4]:正在离开目录 `/home/nancy/work/build-llvm/tools/clang/tools/driver' make[3]: *** [driver/.makeall] 错误 2 make[3]:正在离开目录 `/home/nancy/work/build-llvm/tools/clang/tools' make[2]: *** [all] 错误 1 make[2]:正在离开目录 `/home/nancy/work/build-llvm/tools/clang' make[1]: *** [clang/.makeall] 错误 2 make[1]:正在离开目录 `/home/nancy/work/build-llvm/tools' make: *** [all] 错误 1 What should I do to make debug enabled compiling successful? Anyone can tell me a tiny configuration which can save memory? I only have 3G RAM, Ubuntu kylin. -- Best Regards, Yu Rong Tan _______________________________________________ LLVM Developers mailing list LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Anton Korobeynikov
2014-Jun-02 15:08 UTC
[LLVMdev] How much memory clang llvm needs for debug compiling?
Also, here the problem is ld. Switching to gold may help to resolve the problem. On Mon, Jun 2, 2014 at 6:42 PM, David Tweed <david.tweed at arm.com> wrote:> Hi, > > Just a question: are you doing the actual build on a 32-bit x86 machine (not > a 64-bit x86-64 machine)? This seems to be sensible, but I've rarely had > problems doing a debug build on x86 within 2GB of memory (after ensuring > only one link at once); it's always been the x86-64 builds that are tricky > under low memory. > > Regards, > Dave > > -----Original Message----- > From: llvmdev-bounces at cs.uiuc.edu [mailto:llvmdev-bounces at cs.uiuc.edu] On > Behalf Of Nancy > Sent: 02 June 2014 14:47 > To: llvmbugs at cs.uiuc.edu; llvmdev at cs.uiuc.edu > Subject: Re: [LLVMdev] How much memory clang llvm needs for debug compiling? > > $cd llvm-build > $../llvm/configure --enable-targets=x86 > > > make[4]:正在离开目录 > `/home/nancy/work/build-llvm/tools/clang/tools/libclang' > make[4]: 正在进入目录 > `/home/nancy/work/build-llvm/tools/clang/tools/c-index-test' > llvm[4]: Linking Debug+Asserts executable c-index-test > llvm[4]: ======= Finished Linking Debug+Asserts Executable c-index-test > make[4]:正在离开目录 > `/home/nancy/work/build-llvm/tools/clang/tools/c-index-test' > make[4]: 正在进入目录 > `/home/nancy/work/build-llvm/tools/clang/tools/c-arcmt-test' > llvm[4]: Linking Debug+Asserts executable c-arcmt-test > llvm[4]: ======= Finished Linking Debug+Asserts Executable c-arcmt-test > make[4]:正在离开目录 > `/home/nancy/work/build-llvm/tools/clang/tools/c-arcmt-test' > make[4]: 正在进入目录 `/home/nancy/work/build-llvm/tools/clang/tools/driver' > llvm[4]: Linking Debug+Asserts executable clang > /usr/bin/ld: 最终连接失败: 内存耗尽 ( in english : Memory exhausted) > collect2: error: ld returned 1 exit status > make[4]: *** [/home/nancy/work/build-llvm/Debug+Asserts/bin/clang] 错误 1 > make[4]:正在离开目录 `/home/nancy/work/build-llvm/tools/clang/tools/driver' > make[3]: *** [driver/.makeall] 错误 2 > make[3]:正在离开目录 `/home/nancy/work/build-llvm/tools/clang/tools' > make[2]: *** [all] 错误 1 > make[2]:正在离开目录 `/home/nancy/work/build-llvm/tools/clang' > make[1]: *** [clang/.makeall] 错误 2 > make[1]:正在离开目录 `/home/nancy/work/build-llvm/tools' > make: *** [all] 错误 1 > > > What should I do to make debug enabled compiling successful? Anyone > can tell me a tiny configuration which can save memory? I only have 3G > RAM, Ubuntu kylin. > > > -- > Best Regards, > Yu Rong Tan > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev > > > > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev-- With best regards, Anton Korobeynikov Faculty of Mathematics and Mechanics, Saint Petersburg State University
Eric Christopher
2014-Jun-02 16:44 UTC
[LLVMdev] How much memory clang llvm needs for debug compiling?
Debug information is pretty large, especially for the link step. If you have a recent gdb you can use the split dwarf configure option which should reduce the memory requirements of the link quite significantly (nearly back to no debug information). -eric On Mon, Jun 2, 2014 at 6:46 AM, Nancy <nancydreaming at gmail.com> wrote:> $cd llvm-build > $../llvm/configure --enable-targets=x86 > > > make[4]:正在离开目录 `/home/nancy/work/build-llvm/tools/clang/tools/libclang' > make[4]: 正在进入目录 `/home/nancy/work/build-llvm/tools/clang/tools/c-index-test' > llvm[4]: Linking Debug+Asserts executable c-index-test > llvm[4]: ======= Finished Linking Debug+Asserts Executable c-index-test > make[4]:正在离开目录 `/home/nancy/work/build-llvm/tools/clang/tools/c-index-test' > make[4]: 正在进入目录 `/home/nancy/work/build-llvm/tools/clang/tools/c-arcmt-test' > llvm[4]: Linking Debug+Asserts executable c-arcmt-test > llvm[4]: ======= Finished Linking Debug+Asserts Executable c-arcmt-test > make[4]:正在离开目录 `/home/nancy/work/build-llvm/tools/clang/tools/c-arcmt-test' > make[4]: 正在进入目录 `/home/nancy/work/build-llvm/tools/clang/tools/driver' > llvm[4]: Linking Debug+Asserts executable clang > /usr/bin/ld: 最终连接失败: 内存耗尽 ( in english : Memory exhausted) > collect2: error: ld returned 1 exit status > make[4]: *** [/home/nancy/work/build-llvm/Debug+Asserts/bin/clang] 错误 1 > make[4]:正在离开目录 `/home/nancy/work/build-llvm/tools/clang/tools/driver' > make[3]: *** [driver/.makeall] 错误 2 > make[3]:正在离开目录 `/home/nancy/work/build-llvm/tools/clang/tools' > make[2]: *** [all] 错误 1 > make[2]:正在离开目录 `/home/nancy/work/build-llvm/tools/clang' > make[1]: *** [clang/.makeall] 错误 2 > make[1]:正在离开目录 `/home/nancy/work/build-llvm/tools' > make: *** [all] 错误 1 > > > What should I do to make debug enabled compiling successful? Anyone > can tell me a tiny configuration which can save memory? I only have 3G > RAM, Ubuntu kylin. > > > -- > Best Regards, > Yu Rong Tan > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Nancy
2014-Jun-03 15:06 UTC
[LLVMdev] How much memory clang llvm needs for debug compiling?
On Mon, Jun 2, 2014 at 10:42 PM, David Tweed <david.tweed at arm.com> wrote:> Hi, > > Just a question: are you doing the actual build on a 32-bit x86 machine (not > a 64-bit x86-64 machine)? This seems to be sensible, but I've rarely had > problems doing a debug build on x86 within 2GB of memory (after ensuring > only one link at once); it's always been the x86-64 builds that are tricky > under low memory.Yes, I'm sure it is X86. Thinkpad T61. Maybe you had tried the older version. Latest version do not work. The problem solved. Thank you all the same! -- Best Regards, Yu Rong Tan
Reasonably Related Threads
- [LLVMdev] How much memory clang llvm needs for debug compiling?
- [LLVMdev] How much memory clang llvm needs for debug compiling?
- [LLVMdev] Is there any tool can generate MIPS ELF file?
- [cfe-dev] ARM float16 intrinsic test
- [LLVMdev] Is there any tool can generate MIPS ELF file?