I'm trying to build precimonious on Ubuntu 16.04.3 x64. I allocated 1GB memory for it. My file structure looks like
~
|--- llvm/
|--- precimonious/
where the llvm is on version 3.0 as mentioned at https://github.com/corvette-berkeley/precimonious#requirement. Then I followed the steps on the README but command make
ended with
...
llvm[1]: Linking Debug Shared Library libLLVM-3.0.so
collect2: fatal error: ld terminated with signal 9 [Killed]
compilation terminated.
...
I went through some answers online and they say it might because there's not enough memory to perform the link. But the memory usage is like
The gcc version on my machine is gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.4)
and was installed via apt-get install build-essential
. This is a fresh droplet I just created on DigitalOcean btw. Any help is appreciated.
you can solve this issue by using :
cargo run --release --verbose --jobs 1
It is memory exhaustion. The sampling interval for the memory measurement is just not small enough that it covers the exact point where the OOM killer kicks in.
Depending on the container/VM technology, you may be able to set vm.overcommit_memory=2
before the build, so that the process is not killed (but doing so actually requires more memory and swap space to get the build to complete).
I had this problem, and solved by:
SWAP
disk (8 GB working with me).27 GB
(LLVM 6.0.0) free disk space (check with df -h
in Terminal).Sometimes system kills linker due to CPU overload. If your build is parallel, try -l
option (make and ninja support it). Looks similar to your case.
To decrease system load, build release version of llvm. Linking of debug version is much more expensive.
llvm[1]: Linking Debug Shared Library libLLVM-3.0.so
I had the same error while installing snort on the Ubuntu inside a virtual box with 2 GB of RAM. I increased the RAM to 4 GB and it worked for me.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With