Some machine has an error when building yocto with error as below:
fatal error: Killed signal terminated program cc1plus
One of the more reasons is the resource (number of CPU core threads used to build) to build machines are not enough.
My solution: configure the number thread for yocto build at file conf/local.conf in the build folder by adding two lines:
PARALLEL_MAKE = "-j x" BB_NUMBER_THREADS = "y"
with x, y are number CPU thread.
PARALLEL_MAKEdefines how many threads should be used when using make -j command during do_compile.
BB_NUMBER_THREADSdefines number of threads for bitbake.
Note: x, y should are less than number CPU of current build machine.
Command to check CPU cores:
$ nproc 8
==> x, y can choose is : 1-> 6
in this case you can config:
PARALLEL_MAKE = "-j 4" BB_NUMBER_THREADS = "4"
I hope this thing can help you 🙂
P/S: x=y=1 is good to avoid this problem but it will be slowly built 🙂
PARALLEL_MAKE = "-j 1" BB_NUMBER_THREADS = "1"