1准备
#1 安装gcc
yum install gcc-c++ libstdc++-devel
#2 安装g++
yum install gcc
#3 安装cmake
yum install cmake
#4 安装git
yum install git
2安装
#1 获得源码, 生成obfuscator文件
git clone -b llvm-4.0 https://github.com/obfuscator-llvm/obfuscator.git
#2 进入obfuscator文件
cd obfuscator
#3 建立build文件
mkdir build
#4 进入build文件
cd build
#5
cmake -DCMAKE_BUILD_TYPE=Release ../
#如果上述命令出错,则使用
cmake -DCMAKE_BUILD_TYPE=Release -DLLVM_INCLUDE_TESTS=OFF ../
#6 编译
make
问题
原因:内存不足
解决方法
#count的大小就是增加的swap空间的大小,64M是块大小,所以空间大小是bs*count=1024MB
sudo dd if=/dev/zero of=/swapfile bs=64M count=16
#把刚才空间格式化成swap格式
sudo mkswap /swapfile
#使用刚才创建的swap空间
sudo swapon /swapfile
编译完毕后需要
swapoff /swapfile
rm /swapfile