参考KLEE官网主页http://klee.github.io/klee/‘
首先安装llvm-gcc,官网上说KLEE运用的系统及CPU最好是Linux x86-64,而我的笔记本是i686(即x86-32)的,所以不是最好的,官网介绍说“might break on x86-32”.
原文地址:http://thread.gmane.org/gmane.comp.compilers.llvm.klee/923
cd ~ sudo apt-get -y install g++ curl dejagnu subversion bison flex mkdir work cd work wget http://llvm.org/releases/2.9/llvm-gcc-4.2-2.9-i686-linux.tgz tar zxfv llvm-gcc-4.2-2.9-i686-linux.tgz echo "export PATH=\$PATH:~/work/llvm-gcc-4.2-2.9-i686-linux/bin" >> ~/.bashrc echo "export PATH=\$PATH:~/work/klee/Release+Asserts/bin" >> ~/.bashrc echo "export C_INCLUDE_PATH=/usr/include/i386-linux-gnu" >> ~/.bashrc source ~/.bashrc curl -O http://llvm.org/releases/2.9/llvm-2.9.tgz tar zxvf llvm-2.9.tgz cd llvm-2.9 ./configure --enable-optimized --enable-assertions make -j $(grep -c processor /proc/cpuinfo) cd .. svn co -r 940 https://svn.code.sf.net/p/stp-fast-prover/code/trunk/stp stp cd stp ./scripts/configure --with-prefix=/home/$(whoami)/work/stp_install --with-cryptominisat2 make -j $(grep -c processor /proc/cpuinfo) OPTIMIZE=-O2 CFLAGS_M32= install cd .. svn co http://llvm.org/svn/llvm-project/klee/trunk klee cd klee ./configure --with-llvm=/home/$(whoami)/work/llvm-2.9 --with-stp=/home/$(whoami)/work/stp_install make -j $(grep -c processor /proc/cpuinfo) ENABLE_OPTIMIZED=1 make unittests