[klee-dev] Trouble installing LLVM2.9 and klee on Ubuntu 12.10 X86_64

Dilip Murali dilipmurali at gmail.com
Thu Dec 13 16:50:48 GMT 2012


Hello,

I am a beginner trying to install KLEE with --enable-posix-runtime and
uclibc on Ubuntu 12.10 X86_64 architecture.
I am trying to use LLVM2.9 with llvm-gcc compiler. I am trying to follow
the instructions in  http://klee.llvm.org/GetStarted.html .

I have a few problems that i have been encountering.

I have the llvm-gcc4.2-2.9-x86_64-linux/
bin in my path variable.
I also have the below environment variables set.
C_INCLUDE_PATH=/usr/include/x86_64-linux-gnu
CPLUS_INCLUDE_PATH=/usr/include/x86_64-linux-gnu

After installing LLVM2.9 with the configuration ./configure
--enable-optimized --enable-assertions
--with-llvmgccdir=$HOME/llvm-gcc4.2-2.9-x86_64-linux
--prefix=$HOME/llvmtools
if i try to do a make check on llvm-2.9 i have errors

# of unexpected failures    53.

In the Makefile.config inside llvm-2.9 i see that the make check fails when
LLVMGCCDIR := /home/deepu/llvm-gcc4.2-2.9-x86_64-linux/bin/..

# Full pathnames of LLVM C/C++ front-end 'cc1' and 'cc1plus' binaries:
LLVMGCC  := /home/deepu/llvm-gcc4.2-2.9-x86_64-linux/bin/llvm-gcc
LLVMGXX  := /home/deepu/llvm-gcc4.2-2.9-x86_64-linux/bin/llvm-g++
LLVMCC1  :=
/home/deepu/llvm-gcc4.2-2.9-x86_64-linux/bin../libexec/gcc/x86_64-unknown-linux-gnu/4.2.1/cc1
LLVMCC1PLUS :=
/home/deepu/llvm-gcc4.2-2.9-x86_64-linux/bin../libexec/gcc/x86_64-unknown-linux-gnu/4.2.1/cc1plus

However if i give a wrong path using
--with-llvmgccdir=$HOME/llvm-gcc4.2-2.9-x86_64-linux/bin
(P.S i have added bin at the end of the path), i see that below is the
configuration in Makefile.config:

LLVMGCCDIR :=

# Full pathnames of LLVM C/C++ front-end 'cc1' and 'cc1plus' binaries:
LLVMGCC  := /home/deepu/llvm-gcc4.2-2.9-x86_64-linux/bin/llvm-gcc
LLVMGXX  := /home/deepu/llvm-gcc4.2-2.9-x86_64-linux/bin/llvm-g++
LLVMCC1  :=
LLVMCC1PLUS :=

With this configuration LLVM builds successfully and the make check also
passes.
But i get a problem when i make klee-uclibc-0.02-x64, since it checks for
llvm-gcc in $HOME/llvm-gcc4.2-2.9-x86_64-linux/bin/bin. (P.S it checks in
the location passed appended by a /bin again). So it does not build.

I also observed that when i pass the correct path for llvmgccdir, and then
rename the libexec folder inside $HOME/llvm-gcc4.2-2.9-x86_64-linux, i see
that all make works fine, make check for llvm passes all tests.

But in all these cases when i try to do a make check for klee, i see the
below problems:

        ===  Summary ===

# of expected passes        111
# of unexpected failures    2
# of expected failures        3
XFAIL: /home/deepu/klee/test/Expr/Evaluate2.pc
XFAIL: /home/deepu/klee/test/Programs/pcregrep.c
FAIL: /home/deepu/klee/test/Runtime/POSIX/DirConsistency.c
FAIL: /home/deepu/klee/test/Runtime/POSIX/DirSeek.c
KLEE: ERROR: ASSERTION FAIL: !(*__errno_location ())
Error: ASSERTION FAIL: !(*__errno_location ())
XFAIL: /home/deepu/klee/test/Runtime/POSIX/SELinux.c
make[1]: *** [check-local] Error 1
make[1]: Leaving directory `/home/deepu/klee/test'

Could someone please explain to me where i am going wrong? Could you please
tell me the required configuration to install LLVM 2.9?
Is it required to pass all the make check test cases for both LLVM and klee
installations?

Thanks in advance.

Regards,
Dilip
-------------- next part --------------
HTML attachment scrubbed and removed


More information about the klee-dev mailing list