[llvm-dev] Parallel build fails for [buffer overflow detected error]

sameeran joshi via llvm-dev llvm-dev at lists.llvm.org
Sat Aug 17 08:19:01 PDT 2019


Hi,
during building LLVM with clang enabled for x86-64 architecture
following the steps here:
http://clang.llvm.org/get_started.html

I tried make -j32
the execution goes well till 92% but, the process exits giving following error:



[ 92%] Building CXX object
tools/llvm-exegesis/lib/CMakeFiles/LLVMExegesis.dir/RegisterValue.cpp.o
*** buffer overflow detected ***: /usr/bin/ld terminated

cc1plus: out of memory allocating 39806 bytes after a total of 651264 bytes
virtual memory exhausted: Cannot allocate memory
/usr/bin/cmake: error while loading shared libraries:
libasn1.so.8/usr/bin/cmake: : failed to map segment from shared
objecterror while loading shared libraries: libasn1.so.8
: failed to map segment from shared object

cc1plus: out of memory allocating 2048 bytes after a total of 843776 bytes

cc1plus: out of memory allocating 2048 bytes after a total of 815104 bytes

cc1plus: out of memory allocating 8032 bytes after a total of 806912 bytes

cc1plus: out of memory allocating 8032 bytes after a total of 790528 bytes

cc1plus: out of memory allocating 17638 bytes after a total of 815104 bytes
tools/llvm-exegesis/lib/CMakeFiles/LLVMExegesis.dir/build.make:398:
recipe for target
'tools/llvm-exegesis/lib/CMakeFiles/LLVMExegesis.dir/Target.cpp.o'
failed
make[2]: *** [tools/llvm-exegesis/lib/CMakeFiles/LLVMExegesis.dir/Target.cpp.o]
Error 127
virtual memory exhausted: Cannot allocate memory
make[2]: *** Waiting for unfinished jobs....
tools/llvm-exegesis/lib/CMakeFiles/LLVMExegesis.dir/build.make:422:
recipe for target
'tools/llvm-exegesis/lib/CMakeFiles/LLVMExegesis.dir/Uops.cpp.o'
failed
make[2]: *** [tools/llvm-exegesis/lib/CMakeFiles/LLVMExegesis.dir/Uops.cpp.o]
Error 127
make[2]: fork: Cannot allocate memory

cc1plus: out of memory allocating 92461 bytes after a total of 815104 bytes
virtual memory exhausted: Cannot allocate memory
virtual memory exhausted: Cannot allocate memory
/usr/bin/ld: can not read symbols: Memory exhausted


When executed
make
only single processor
with no parallel build it's builds successfully.

Is this an issue with the parallel building of LLVM , I encoutered the
issue 2 times that too beyond 90%?

Thanks,
Sameeran Joshi


More information about the llvm-dev mailing list