Hi,
Could you make sure you reply to the mailing rather than just me, else no
one else but me will see your problem!

I'm sorry but I don't know why you're getting this new error message. I
never had that problem but you could try the following

0. Verify that you don't have multiple versions of LLVM installed. So
verify that your output is similar to this...
$ llvm-gcc --version
llvm-gcc (GCC) 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2.9)

$ llvm-ldd --version
Low Level Virtual Machine (http://llvm.org/):
  llvm version 2.9
  Optimized build with assertions.

$ lli --version
Low Level Virtual Machine (http://llvm.org/):
  llvm version 2.9
  Optimized build with assertions.
  Built Jul 20 2012 (11:49:59).
  Host: x86_64-unknown-linux-gnu
  Host CPU: penryn

  Registered Targets:
    x86    - 32-bit X86: Pentium-Pro and above
    x86-64 - 64-bit X86: EM64T and AMD64

If "lli" doesn't have any registered targets then you will have problems!
You will also have problems if your machines architecture is not listed.

1. delete the "obj-llvm" directory
2. Make sure LLVM_LIB_SEARCH_PATH is set
3. Now make the "obj-llvm" directory. Make sure this folder is NOT in the
source tree for core-utils, in the instructions it seems to be. I prefer
having something like core-utils/src and core-utils/obj-llvm as the source
code and build directories respectively.
$ mkdir obj-llvm
$ cd obj-llvm/
$ ../src/configure --disable-nls CFLAGS="-g"
4. Run make
$ make CC=/path/to/klee-gcc
5. Now try again running cat again.

If that fails inspect the produced bit code files (*.bc)

$ llvm-dis cat.bc

This will produce a "cat.ll" file. Which is the Bitcode file in human
readable form, take a look and check your target triple is something like "
x86_64-unknown-linux-gnu"

Other than that I have nothing more to suggest because I don't know much
about LLVM.

Thanks,
Dan Liew.


On 11 September 2012 15:28, Qiuping Yi <[email protected]> wrote:

> yes, you are right. But after I executed "*make
> CC=/full/path/to/klee/scripts/klee-gcc*" successfully, I cannot
> successfully execute "*/cat --version*" following the guide, and I got
> the next error information.
>
> qiu@qiu:~/installed/coreutils-6.11/obj-llvm/src$ ./cat --version
> lli: JITEmitter.cpp:1141: void
> {anonymous}::JITEmitter::emitJumpTableInfo(llvm::MachineJumpTableInfo*):
> Assertion `MJTI->getEntrySize(*TheJIT->getTargetData()) == sizeof(void*) &&
> "Cross JIT'ing?"' failed.
> 0  lli             0x0000000000b6edff
> 1  lli             0x0000000000b6f309
> 2  libpthread.so.0 0x00007f3595437cb0
> 3  libc.so.6       0x00007f359468d445 gsignal + 53
> 4  libc.so.6       0x00007f3594690bab abort + 379
> 5  libc.so.6       0x00007f359468610e
> 6  libc.so.6       0x00007f35946861b2
> 7  lli             0x000000000078e8a6
> 8  lli             0x000000000054dfc0
> 9  lli             0x0000000000b00acf
> llvm::FPPassManager::runOnFunction(llvm::Function&) + 591
> 10 lli             0x0000000000b0150d
> llvm::FunctionPassManagerImpl::run(llvm::Function&) + 141
> 11 lli             0x0000000000b016cd
> llvm::FunctionPassManager::run(llvm::Function&) + 173
> 12 lli             0x0000000000780d8e
> llvm::JIT::jitTheFunction(llvm::Function*, llvm::MutexGuard const&) + 46
> 13 lli             0x000000000078114c
> llvm::JIT::runJITOnFunctionUnlocked(llvm::Function*, llvm::MutexGuard
> const&) + 28
> 14 lli             0x0000000000781440
> llvm::JIT::getPointerToFunction(llvm::Function*) + 576
> 15 lli             0x000000000077f677
> llvm::JIT::runFunction(llvm::Function*, std::vector<llvm::GenericValue,
> std::allocator<llvm::GenericValue> > const&) + 71
> 16 lli             0x0000000000a0f292
> llvm::ExecutionEngine::runFunctionAsMain(llvm::Function*,
> std::vector<std::string, std::allocator<std::string> > const&, char const*
> const*) + 722
> 17 lli             0x0000000000504665 main + 1829
> 18 libc.so.6       0x00007f359467876d __libc_start_main + 237
> 19 lli             0x000000000050b6c9
> Stack dump:
> 0. Program arguments: lli cat.bc --version
> 1. Running pass 'X86 Machine Code Emitter' on function '@main'
>
>
> --------------------------------------------
> Qiuping Yi
> Institute Of Software
> Chinese Academy of Sciences
>
>
> 2012/9/11 Delcypher <[email protected]>
>
>> 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