ubuntu下klee安装方法


原文地址: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
 
 
 
  1. (Optional) Build uclibc and the POSIX environment model: By default, KLEE works on closed programs (programs that don’t use any external code such as C library functions). However, if you want to use KLEE to run real programs you will want to enable the KLEE POSIX runtime, which is built on top of the uClibc C library.

    $ git clone https://github.com/klee/klee-uclibc.git
    $ cd klee-uclibc
    $ ./configure --make-llvm-lib
    $ make -j2
    

    NOTE: If you are on a different target (i.e., not i386 or x64), you will need to run make config and select the correct target. The defaults for the other uClibc configuration variables should be fine.

cd ..svn co http://llvm.org/svn/llvm-project/klee/trunk kleecd klee./configure --with-llvm=/home/$(whoami)/work/llvm-2.9 --with-stp=/home/$(whoami)/work/stp_installmake -j $(grep -c processor /proc/cpuinfo) ENABLE_OPTIMIZED=1make unittests

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值