@XiaLiangYong I know this is old but I have run into this type of build failure in the past as well.
In my experience, over 2GiB RAM is required to build.
If you are using a Docker environment check before you build otherwise `eosio/builder` will build but `eosio/eos` and `eosio/eos-dev` will likely fail.
$docker system info | grep ‘Total Memory:’
Total Memory: 7.787GiB