0

During compilation of llvm I get following error:

llvm[2]: ======= Finished Linking Debug+Asserts Executable llvm-config
llvm[2]: Installing Debug+Asserts /usr/local/bin/llvm-config
make[2]: Leaving directory `/usr/bin/tools/llvm-config'
make[2]: Entering directory `/usr/bin/tools/lto'
llvm[2]: Compiling LTODisassembler.cpp for Debug+Asserts build (PIC)
llvm[2]: Compiling lto.cpp for Debug+Asserts build (PIC)
llvm[2]: Linking Debug+Asserts Shared Library libLTO.so
collect2: ld terminated with signal 9 [Killed]
make[2]: *** [/usr/bin/Debug+Asserts/lib/libLTO.so] Error 1
make[2]: Leaving directory `/usr/bin/tools/lto'
make[1]: *** [install] Error 1
make[1]: Leaving directory `/usr/bin/tools'
make: *** [install] Error 1

I do configure llvm by giving path of gcc & g++ compilers. I don't get any error during configuration; but during build same error persist with clang also. I am using Ubntu-12.10 32 bit.

Neha Somani
  • 102
  • 2
  • 11

2 Answers2

2

OK, so to solve this problem, I referred to llvm.org and during configuration added few options as follows: sudo ./configure CC="/usr/bin/gcc" CXX="/usr/bin/g++" --enable-optimization --enable-jit --enable-debug-runtime --enable-targets=all

And I ran a build as SuperUser.

Neha Somani
  • 102
  • 2
  • 11
0

I faced the same error using Ubuntu 13.04 (arch: x86_64). The following error

collect2: ld terminated with signal 9 [Killed]

was an issue with memory usage. I was indeed using a Koding.com cloud VM with 1GB RAM.

I tried the compilation on my laptop as a normal user and the compilation finished without any issues. I used:

$ ./configure

$ make -j4