I want to build qemu from source in my Ubuntu 20.04. It seems ordinary to build QEMU by following the official instruction.
Execution of command make -j
works well at the beginning, and slows down gradually after a period of compiling. Finally, the entire system hangs, keyboard and mouse freeze. The only way to recover from such a situation is pressing power button.
So, it that a compatibility problem of mismatch of gcc and the source code? Or is that I use -j
option illegally?
Update:
- Removal of
-j
option makes the problem gone. - Using parallel jobs less than the number of CPU cores by appending
-jN
option also eliminates the problem. Single-j
option without an argument makesmake
command utilize the whole cores to do compiling.
man mkswap swapon
watch -n 1 free -h
, and before system halt, free reports that it is still unused memory available. Also, I have swap partition enabled as default.