[LLVMdev] problem when building coreutil

Wenbin Zhang zhangwen at cse.ohio-state.edu
Thu Apr 22 10:42:45 PDT 2010


Hi all,

I'm new to llvm and klee. Now I'm trying to build up coreutil with klee.

Following the steps online (http://klee.llvm.org/TestingCoreutils.html), I
went to step 3 and stuck.

When I try to run:
 klee --libc=uclibc --posix-runtime ./cat.bc -version
Error occurred like:
klee: error: Cannot find linker input '/lib/libc.a'
klee: ModuleUtil.cpp:42: llvm::Module* klee::linkWithLibrary(llvm::Module*,
const std::string&): Assertion `0 && "linking in library failed!"' failed.
0   klee            0x0000000000e3b21f
1   klee            0x0000000000e3bcda
2   libpthread.so.0 0x00000036d000dd40
3   libc.so.6       0x00000036cf430015 gsignal + 53
4   libc.so.6       0x00000036cf431980 abort + 272
5   libc.so.6       0x00000036cf429726 __assert_fail + 246
6   klee            0x000000000058a541 klee::linkWithLibrary(llvm::Module*,
std::string const&) + 193
7   klee            0x0000000000523fbe
8   klee            0x000000000052bafc main + 7052
9   libc.so.6       0x00000036cf41d8a4 __libc_start_main + 244
10  klee            0x0000000000521fd9
Aborted
 
I wonder why it looks for libc.a under /lib, and I'm not sure how to direct
it to the correct location.
In fact, I'm not sure which libc it should point to. I try to modify the
makefile under obj-llvm, changing 'libdir' to /usr/lib and
/my/path/to/uclibc/lib, but neither works.
 
 

Later I rebuild and try to let LD_LIBRARY_PATH point to uclibc/lib, the
error remains the same.

One thing I should mention is, some error happened during the "make check":

llvm[0]: Running test suite

make[1]: Entering directory `/home/zhangwen/llvm/klee/test'

( ulimit -t 600 ; ulimit -d 512000 ; \

 
PATH="/home/zhangwen/llvm/klee/Release/bin:/home/zhangwen/llvm/llvm-2.6/Rele
ase/bin:/home/zhangwen/llvm/llvm-2.6/test/Scripts:/home/zhangwen/gcc/gcc-4.2
.1-install/bin:/home/zhangwen/llvm/llvm-gcc4.2-2.6.source-install/bin:/home/
zhangwen/llvm/llvm-2.6/Release/bin:/usr/kerberos/bin:/usr/local/bin:/bin:/us
r/bin:/home/zhangwen/bin" \

          /usr/local/bin/runtest  ;  \

          ! grep FAIL testrun.log; ! grep -q ^FAIL testrun.log;  )

WARNING: Couldn't find the global config file.

WARNING: No tool specified

Test Run By zhangwen on Wed Apr 21 18:26:19 2010

Native configuration is x86_64-unknown-linux-gnu

 

                ===  tests ===

 

Schedule of variations:

    unix

 

Running target unix

Using /usr/local/share/dejagnu/baseboards/unix.exp as board description file
for target.

Using /usr/local/share/dejagnu/config/unix.exp as generic interface file for
target.

WARNING: Couldn't find tool config file for unix, using default.

Running /home/zhangwen/llvm/klee/test/CXX/dg.exp ...

FAIL: /home/zhangwen/llvm/klee/test/CXX/StaticDestructor.cpp

Failed with exit(1) at line 3

while running: grep ":16: memory error" StaticDestructor.cpp.tmp1.log

child process exited abnormally

Running /home/zhangwen/llvm/klee/test/Coverage/dg.exp ...

Running /home/zhangwen/llvm/klee/test/Dogfood/dg.exp ...

Running /home/zhangwen/llvm/klee/test/Expr/Lexer/dg.exp ...

Running /home/zhangwen/llvm/klee/test/Expr/Parser/dg.exp ...

Running /home/zhangwen/llvm/klee/test/Expr/dg.exp ...

Running /home/zhangwen/llvm/klee/test/Feature/dg.exp ...

FAIL: /home/zhangwen/llvm/klee/test/Feature/WriteCov.c

Failed with exit(1) at line 3

while running: grep WriteCov.c:10 klee-last/test000002.cov

child process exited abnormally

Running /home/zhangwen/llvm/klee/test/Programs/dg.exp ...

XPASS: /home/zhangwen/llvm/klee/test/Programs/pcregrep.c

Running /home/zhangwen/llvm/klee/test/Runtime/POSIX/dg.exp ...

XPASS: /home/zhangwen/llvm/klee/test/Runtime/POSIX/SELinux.c

Running /home/zhangwen/llvm/klee/test/Runtime/Uclibc/dg.exp ...

Running /home/zhangwen/llvm/klee/test/Solver/dg.exp ...

Running /home/zhangwen/llvm/klee/test/regression/dg.exp ...

 

                ===  Summary ===

 

# of expected passes            102

# of unexpected failures        2

# of unexpected successes       2

# of expected failures          1

FAIL: /home/zhangwen/llvm/klee/test/CXX/StaticDestructor.cpp

XFAIL: /home/zhangwen/llvm/klee/test/Expr/Evaluate2.pc

FAIL: /home/zhangwen/llvm/klee/test/Feature/WriteCov.c

make[1]: *** [check-local] Error 1

make[1]: Leaving directory `/home/zhangwen/llvm/klee/test'

make: *** [check] Error 2

 
Do someone have any idea about that? 
Thanks.
 
 
Best,
--Wenbin

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20100422/24b311ff/attachment.html>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: ATT00267.txt
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20100422/24b311ff/attachment.txt>


More information about the llvm-dev mailing list