LLVM-LD can't find the libraries it needs to link with. In the is case
librt (the realtime library).

Find the location of librt.a on your system and set the
LLVM_LIB_SEARCH_PATH variable before you run make.

For example on my system librt is in /usr/lib/ so I would run in my shell

$ export LLVM_LIB_SEARCH_PATH=/usr/lib

Read the manpage of llvm-ld for more information.

That should fix your problem.

Regards,
Dan Liew.

On 11 September 2012 10:02, Qiuping Yi <[email protected]> wrote:

> Dear everyone,
>
> I am a new user of klee, today I began to test the "coreutils case study"
> following the
> instructions in klee.llvm.org/TestingCoreutils.html. In the second step
> (build coreutils with llvm),
> I got the next error information when I executed "*obj-llvm$ make
> CC=/full/path/to/klee/scripts/klee-gcc*" .
> What should I do to correct the error? Thank you all very much!
>
> /home/yq/installed/klee/scripts/klee-gcc  -g  -Wl,--as-needed -o chmod
> chmod.o ../lib/libcoreutils.a  ../lib/libcoreutils.a
> /home/yq/installed/klee/scripts/klee-gcc  -I. -I../../src -I../lib
>  -I../../lib   -g -MT cp.o -MD -MP -MF .deps/cp.Tpo -c -o cp.o
> ../../src/cp.c
> mv -f .deps/cp.Tpo .deps/cp.Po
> /home/yq/installed/klee/scripts/klee-gcc  -I. -I../../src -I../lib
>  -I../../lib   -g -MT copy.o -MD -MP -MF .deps/copy.Tpo -c -o copy.o
> ../../src/copy.c
> mv -f .deps/copy.Tpo .deps/copy.Po
> /home/yq/installed/klee/scripts/klee-gcc  -I. -I../../src -I../lib
>  -I../../lib   -g -MT cp-hash.o -MD -MP -MF .deps/cp-hash.Tpo -c -o
> cp-hash.o ../../src/cp-hash.c
>  mv -f .deps/cp-hash.Tpo .deps/cp-hash.Po
> /home/yq/installed/klee/scripts/klee-gcc  -g  -Wl,--as-needed -o cp cp.o
> copy.o cp-hash.o ../lib/libcoreutils.a  ../lib/libcoreutils.a
> /home/yq/installed/klee/scripts/klee-gcc  -I. -I../../src -I../lib
>  -I../../lib   -g -MT dd.o -MD -MP -MF .deps/dd.Tpo -c -o dd.o
> ../../src/dd.c
> mv -f .deps/dd.Tpo .deps/dd.Po
> /home/yq/installed/klee/scripts/klee-gcc  -g  -Wl,--as-needed -o dd dd.o
> ../lib/libcoreutils.a  ../lib/libcoreutils.a -lrt
> llvm-ld: error: Cannot find library 'rt'
> make[3]: *** [dd] Error 1
> make[3]: Leaving directory
> `/home/qiu/installed/coreutils-6.11/obj-llvm/src'
> make[2]: *** [all] Error 2
> make[2]: Leaving directory
> `/home/qiu/installed/coreutils-6.11/obj-llvm/src'
> make[1]: *** [all-recursive] Error 1
> make[1]: Leaving directory `/home/qiu/installed/coreutils-6.11/obj-llvm'
> --------------------------------------------
> Qiuping Yi
> Institute Of Software
> Chinese Academy of Sciences
>
> _______________________________________________
> 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

Reply via email to