1、版本们:llvm(2.9);llvm-gcc(直接下llvm 2.9 对应的binaries版本);gcc(4.7,至少我是在这个版本上成功的);
2、 while making llvm, remember to include <unistd.h> in /home/qingjinlyc/IDEs/llvm-2.9/lib/ExecutionEngine/JIT/Intercept.c/bin/sh:pp IF you`re unsing gcc 4.7
also, before build llvm,
remember
to add llvm-gcc to your PATH!!!!
3. remember to specify following parameters after configure for llvm-gcc: --disable-threads --disable-nls --disable-shared --enable-languages=c,c++ --disable-c-mbchar --program-prefix=llvm- --enable-llvm=/usr/build/llvm (
I strongly recommend use binaries of llvm-gcc directly!!!)
4. 要想build release版本的llvm,在configure的时候加参数--enable-optimized(
It is recommended because klee is slow with debug version of llvm)
5. 一定一定记得加环境变量 C_INCLUDE_PATH=/usr/include/i386-linux-gnu/(
But check /usr/include first, to make sure whether some of the hearders files needed is in /usr/inculde/i386-linux-gnu)
6. 一定一定记住:在
llvm-gcc源代码目录平级的目录下建立存放目标文件的文件夹!!!!!! (
Again, I strongly recommend use binaries of llvm-gcc directly!!!)
7. When configure klee with option --with-stp=path/to/stp, you may got error like 'cannot use stp/c_interface.h', which is the consequence of stp didn`t place its headers file in the place(/usr/include/stp) where klee expects. So, just cp the needed header files to the right possition.
(2013年2月23日,在实验室的PC上装LLVM-GCC时候,老是报错configure: error: C compiler cannot create executables。搞了好长时间,查了好多资料,几乎快疯了
,后来试着修改LIBRARY_PATH=/usr/lib:/usr/lib/i386-linux-gnu,就可以了。不知道为什么,因为在笔记本上做时,并没有改LIBRARY_PATH啊)
为什么ubuntu 12.04的include都放在/usr/include/i386-linux-gnu里面呢,而很多程序都是到/usr/include里面找的
问题是,build LLVM需要llvm-gcc,好,但是,build LLVM-GCC的时候又要llvm,这不是死锁了嘛!
尝试:
1、不要最后一个参数——不行。
2、先不要--with-llvmgcc和--with-llvmg++来build llvm——
回到寝室看笔记本上搭的环境,瞬间明白了——笔记本上用的llvm-gcc直接是Bin版的。明天去就这么搞。但是我不懂啊,实验室机器上那个tgz也是bin版的啊,为什么解压开来是那个鸟样??????