Hi Frank,

Thanks for your reply. I typed this command as you suggested previously:
./configure --make-llvm-lib --with-cc clang-11 --with-llvm-config
llvm-config-11

Here are what I got after typing that command:

INFO:Forcing C compiler to be...clang-11
INFO:Absolute path to compiler.../usr/bin/clang-11
INFO:Disabling assertions
INFO:Configuring for Debug build
INFO:Configuring for LLVM bitcode archive
INFO:Using llvm-config at.../usr/bin/llvm-config-11
INFO:Using llvm tool dir.../usr/lib/llvm-11/bin
INFO:Found "/usr/lib/llvm-11/bin/llvm-nm".
INFO:Found "/usr/lib/llvm-11/bin/llvm-ar".
INFO:Found "/usr/lib/llvm-11/bin/llvm-link".
INFO:Found "/usr/lib/llvm-11/bin/llvm-objdump".
INFO:Using LLVM Bitcode Compiler specified by CC .../usr/bin/clang-11
INFO:Testing LLVM Bitcode compiler.../usr/bin/clang-11
INFO:Compiler /usr/bin/clang-11 works
INFO:Checking for ncurses...
INFO:Removing template destination
"/home/biqiancheng/klee-uclibc/Makefile.klee"
INFO:Writing templated file to "/home/biqiancheng/klee-uclibc/Makefile.klee"
WARNING:Removing existing config
file.../home/biqiancheng/klee-uclibc/.config
INFO:Setting up pre-made configure for...x86_64
INFO:Installing .config file
INFO:Looking for kernel include path...
INFO:Found "/usr/include/x86_64-linux-gnu"

This should mean I have configured it correctly, right?

After doing that, I still get the same error message:

KLEE:  ERROR: Loading file /usr/local/lib/klee/runtime/klee-uclibc.bca
failed: Invalid record


I checked LLVM versions that are installed by running this command: apt
list --installed | grep -i llvm

WARNING: apt does not have a stable CLI interface. Use with caution in
scripts.

libllvm10/focal,now 1:10.0.0-4ubuntu1 amd64 [installed,automatic]
libllvm11/unknown,now
1:11.1.0~++20211011094159+1fdec59bffc1-1~exp1~20211011214622.5 amd64
[installed,automatic]
llvm-10-dev/focal,now 1:10.0.0-4ubuntu1 amd64 [installed,automatic]
llvm-10-runtime/focal,now 1:10.0.0-4ubuntu1 amd64 [installed,automatic]
llvm-10-tools/focal,now 1:10.0.0-4ubuntu1 amd64 [installed,automatic]
llvm-10/focal,now 1:10.0.0-4ubuntu1 amd64 [installed,automatic]
llvm-11-dev/unknown,now
1:11.1.0~++20211011094159+1fdec59bffc1-1~exp1~20211011214622.5 amd64
[installed]
llvm-11-doc/unknown,unknown,now
1:11.1.0~++20211011094159+1fdec59bffc1-1~exp1~20211011214622.5 all
[installed,automatic]
llvm-11-linker-tools/unknown,now
1:11.1.0~++20211011094159+1fdec59bffc1-1~exp1~20211011214622.5 amd64
[installed,automatic]
llvm-11-runtime/unknown,now
1:11.1.0~++20211011094159+1fdec59bffc1-1~exp1~20211011214622.5 amd64
[installed,automatic]
llvm-11-tools/unknown,now
1:11.1.0~++20211011094159+1fdec59bffc1-1~exp1~20211011214622.5 amd64
[installed]
llvm-11/unknown,now
1:11.1.0~++20211011094159+1fdec59bffc1-1~exp1~20211011214622.5 amd64
[installed]
llvm-dev/focal,now 1:10.0-50~exp1 amd64 [installed]
llvm-runtime/focal,now 1:10.0-50~exp1 amd64 [installed,automatic]
llvm/focal,now 1:10.0-50~exp1 amd64 [installed]

I used clang-11 to get .bc files, and build KLEE with LLVM 11. Based on
this, do I mix different LLVM versions?

Thank you!
Biqian Cheng


On Mon, Aug 8, 2022 at 12:56 PM Frank Busse <f.bu...@imperial.ac.uk> wrote:

> Hi,
>
>
> On Mon, 8 Aug 2022 12:30:24 -0700
> Biqian Cheng <bchen...@ucr.edu> wrote:
>
> > The error message is:
> >
> > KLEE:  ERROR: Loading file /usr/local/lib/klee/runtime/klee-uclibc.bca
> > failed: Invalid record
>
> This happens typically when you mix different LLVM versions. See step 5:
> https://klee.github.io/build-llvm11/
>
> and make sure you're using the right llvm-config (and don't put '#' in
> the command).
>
>
> Kind regards,
>
> Frank
>
_______________________________________________
klee-dev mailing list
klee-dev@imperial.ac.uk
https://mailman.ic.ac.uk/mailman/listinfo/klee-dev

Reply via email to