I even met this problem on my ubuntu 11.10. Probably it's because gcc cannot find some header files. what I did is to set header files path before compiling the klee.
export C_INCLUDE_PATH=/usr/include/i386-linux-gnu/ Hope it works for you. Thanks, Super On Fri, Jan 20, 2012 at 10:21 AM, James Hongyi Zeng <[email protected]>wrote: > Hi, > > I followed the instructions on http://klee.llvm.org/GetStarted.html trying > to build klee on Ubuntu 11.10. > > hyzeng@hyzeng-desktop:~/sandbox/klee/klee$ uname -a > Linux hyzeng-desktop 3.0.0-14-generic-pae #23-Ubuntu SMP Mon Nov 21 > 22:07:10 UTC 2011 i686 i686 i386 GNU/Linux > > I downloaed llvm-gcc-4.2-2.8-i686-linux, put llvm-gcc in my $PATH, and > compiled llvm-2.8. When I try to compile KLEE, I got the following errors. > Any ideas what can go wrong? > > Thanks, > James > > make[1]: Entering directory `/home/hyzeng/sandbox/klee/klee/runtime' > make[2]: Entering directory > `/home/hyzeng/sandbox/klee/klee/runtime/Intrinsic' > llvm[2]: Compiling klee_int.c for Release+Asserts build (bytecode) > In file included from klee_int.c:10: > /usr/include/assert.h:71: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or > ‘__attribute__’ before ‘extern’ > /usr/include/assert.h: In function ‘__assert_perror_fail’: > /usr/include/assert.h:79: error: expected declaration specifiers before > ‘__THROW’ > /usr/include/assert.h:85: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or > ‘__attribute__’ before ‘__THROW’ > /usr/include/assert.h:88: error: expected declaration specifiers before > ‘__END_DECLS’ > In file included from > /home/hyzeng/sandbox/klee/klee/include/klee/klee.h:13, > from klee_int.c:11: > /usr/include/stdint.h:38: error: storage class specified for parameter > ‘int16_t’ > /usr/include/stdint.h:39: error: storage class specified for parameter > ‘int32_t’ > /usr/include/stdint.h:43: error: expected declaration specifiers before > ‘__extension__’ > /usr/include/stdint.h:49: error: storage class specified for parameter > ‘uint8_t’ > /usr/include/stdint.h:50: error: storage class specified for parameter > ‘uint16_t’ > /usr/include/stdint.h:52: error: storage class specified for parameter > ‘uint32_t’ > /usr/include/stdint.h:58: error: expected declaration specifiers before > ‘__extension__’ > /usr/include/stdint.h:66: error: storage class specified for parameter > ‘int_least8_t’ > /usr/include/stdint.h:67: error: storage class specified for parameter > ‘int_least16_t’ > /usr/include/stdint.h:68: error: storage class specified for parameter > ‘int_least32_t’ > /usr/include/stdint.h:72: error: expected declaration specifiers before > ‘__extension__’ > /usr/include/stdint.h:77: error: storage class specified for parameter > ‘uint_least8_t’ > /usr/include/stdint.h:78: error: storage class specified for parameter > ‘uint_least16_t’ > /usr/include/stdint.h:79: error: storage class specified for parameter > ‘uint_least32_t’ > /usr/include/stdint.h:83: error: expected declaration specifiers before > ‘__extension__’ > /usr/include/stdint.h:91: error: storage class specified for parameter > ‘int_fast8_t’ > /usr/include/stdint.h:97: error: storage class specified for parameter > ‘int_fast16_t’ > /usr/include/stdint.h:98: error: storage class specified for parameter > ‘int_fast32_t’ > /usr/include/stdint.h:99: error: expected declaration specifiers before > ‘__extension__’ > /usr/include/stdint.h:104: error: storage class specified for parameter > ‘uint_fast8_t’ > /usr/include/stdint.h:110: error: storage class specified for parameter > ‘uint_fast16_t’ > /usr/include/stdint.h:111: error: storage class specified for parameter > ‘uint_fast32_t’ > /usr/include/stdint.h:112: error: expected declaration specifiers before > ‘__extension__’ > /usr/include/stdint.h:126: error: storage class specified for parameter > ‘intptr_t’ > /usr/include/stdint.h:129: error: storage class specified for parameter > ‘uintptr_t’ > /usr/include/stdint.h:138: error: expected declaration specifiers before > ‘__extension__’ > /usr/include/stdint.h:140: error: expected declaration specifiers before > ‘__extension__’ > In file included from > /home/hyzeng/sandbox/klee/klee/include/klee/klee.h:14, > from klee_int.c:11: > /home/hyzeng/sandbox/klee/llvm-gcc-4.2-2.8-i686-linux/bin/../lib/gcc/i686-pc-linux-gnu/4.2.1/include/stddef.h:152: > error: storage class specified for parameter ‘ptrdiff_t’ > /home/hyzeng/sandbox/klee/llvm-gcc-4.2-2.8-i686-linux/bin/../lib/gcc/i686-pc-linux-gnu/4.2.1/include/stddef.h:214: > error: storage class specified for parameter ‘size_t’ > /home/hyzeng/sandbox/klee/llvm-gcc-4.2-2.8-i686-linux/bin/../lib/gcc/i686-pc-linux-gnu/4.2.1/include/stddef.h:326: > error: storage class specified for parameter ‘wchar_t’ > In file included from klee_int.c:11: > /home/hyzeng/sandbox/klee/klee/include/klee/klee.h:25: error: expected > declaration specifiers or ‘...’ before ‘size_t’ > /home/hyzeng/sandbox/klee/klee/include/klee/klee.h:35: error: expected > declaration specifiers or ‘...’ before ‘size_t’ > /home/hyzeng/sandbox/klee/klee/include/klee/klee.h:52: error: expected > declaration specifiers before ‘__attribute__’ > /home/hyzeng/sandbox/klee/klee/include/klee/klee.h:56: error: expected > declaration specifiers before ‘__attribute__’ > /home/hyzeng/sandbox/klee/klee/include/klee/klee.h:66: error: expected > declaration specifiers before ‘__attribute__’ > /home/hyzeng/sandbox/klee/klee/include/klee/klee.h:73: error: expected > declaration specifiers before ‘size_t’ > /home/hyzeng/sandbox/klee/klee/include/klee/klee.h:81: error: expected > declaration specifiers before ‘uintptr_t’ > /home/hyzeng/sandbox/klee/klee/include/klee/klee.h:97: error: expected ‘)’ > before ‘n’ > /home/hyzeng/sandbox/klee/klee/include/klee/klee.h:103: error: expected > ‘)’ before ‘condition’ > /home/hyzeng/sandbox/klee/klee/include/klee/klee.h:106: error: expected > declaration specifiers or ‘...’ before ‘uintptr_t’ > /home/hyzeng/sandbox/klee/klee/include/klee/klee.h:117: error: expected > declaration specifiers before ‘int32_t’ > /home/hyzeng/sandbox/klee/klee/include/klee/klee.h:118: error: expected > declaration specifiers before ‘int64_t’ > /home/hyzeng/sandbox/klee/klee/include/klee/klee.h:129: error: expected > declaration specifiers or ‘...’ before ‘size_t’ > klee_int.c:13: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ > before ‘{’ token > klee_int.c:17: error: old-style parameter declarations in prototyped > function definition > klee_int.c:17: error: expected ‘{’ at end of input > make[2]: *** > [/home/hyzeng/sandbox/klee/klee/runtime/Intrinsic/Release+Asserts/klee_int.ll] > Error 1 > make[2]: Leaving directory > `/home/hyzeng/sandbox/klee/klee/runtime/Intrinsic' > make[1]: *** [Intrinsic/.makeall] Error 2 > make[1]: Leaving directory `/home/hyzeng/sandbox/klee/klee/runtime' > make: *** [all] Error 1 > > > _______________________________________________ > klee-dev mailing list > [email protected] > http://keeda.Stanford.EDU/mailman/listinfo/klee-dev > >
_______________________________________________ klee-dev mailing list [email protected] http://keeda.Stanford.EDU/mailman/listinfo/klee-dev
