g++ -I. -I… -DUSE_WX_EXTENSIONS -I/usr/local/lib/wx/include/base-unicode-static-3.2 -I/usr/local/include/wx-3.2 -D_FILE_OFFSET_BITS=64 -DwxUSE_GUI=0 -I/usr/local/include/upnp -DENABLE_UPNP=1 -pthread -I./libs -Ilibs -I./include -DAMULE_DAEMON -W -Wall -Wshadow -Wundef -O2 -pthread -MT amuled-ExternalConn.o -MD -MP -MF .deps/amuled-ExternalConn.Tpo -c -o amuled-ExternalConn.o test -f ‘ExternalConn.cpp’ || echo './'ExternalConn.cpp

g++: fatal error: Killed signal terminated program cc1plus compilation terminated.

The error message g++: fatal error: Killed signal terminated program cc1plus typically indicates that the compilation process was killed by the system, often due to the system running out of memory (OOM). This is common when compiling large projects on systems with limited RAM.

Here are some steps you can take to address this issue:

  1. Add Swap Space:
    Adding swap space can help if your system runs out of RAM. Here’s how you can add swap space on Debian:
sudo fallocate -l 2G /swapfile
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile
sudo sh -c 'echo "/swapfile none swap sw 0 0" >> /etc/fstab'
  1. Compile with Fewer Jobs:
    If you’re using make -j to compile with multiple jobs, reduce the number of jobs or compile without the -j flag to reduce memory usage.
make
  1. Increase System Memory:
    If possible, increase the physical memory of your system.
  2. Close Unnecessary Applications:
    Ensure no other applications are consuming significant memory while you compile.
  3. Use a System with More Resources:
    If you’re compiling on a virtual private server (VPS) or a system with limited resources, consider using a system with more memory.

If the issue persists even after adding swap space and reducing the number of jobs, you might need to compile the project on a system with more memory.