Skip to content
Snippets Groups Projects
Commit 24f90431 authored by Per Lindgren's avatar Per Lindgren
Browse files

klee 2.2 and aur updates

parent 0255c404
No related branches found
No related tags found
No related merge requests found
......@@ -55,6 +55,28 @@ LLVM (http://llvm.org/):
If your build fails at some point, consult the docs [building klee](https://klee.github.io/build-llvm9/).
## Install KLEE from `aur` (arch linux)
The `aur` package [klee](https://aur.archlinux.org/packages/klee/), installs KLEE in `/usr/bin` (binaries), `/usr/include` (C-include files), and `usr/lib` (libraries). These are the default system folders respectively, so it makes it easier to compile, link, and run the KLEE tools.
```shell
> yay -S klee
> klee -version
KLEE 2.2 (https://klee.github.io)
Build mode: Release (Asserts: ON)
Build revision: 5719d2803e93252e5d4613f43afc7db0d72332f1
LLVM (http://llvm.org/):
LLVM version 11.0.0
Optimized build.
Default target: x86_64-pc-linux-gnu
Host CPU: skylake
```
Notice, if you have previously installed from source, but want to use the `aur` instead you should remove the source installed files found in `/usr/local/bin`, `/usr/local/include` and `/usr/local/lib` (please make sure that you only remove the KLEE related files).
---
## Testing a small function
See the `examples/get_sign` folder.
......@@ -66,10 +66,21 @@ int main()
// > ls /usr/local/lib
// klee libkleeRuntest.so libkleeRuntest.so.1.0
//
// If you installed Klee using the package manager
// the path might be different:
//
// Using `aur` (arch) files are stored in the system default
// folders, `/usr/include` and `/usr/lib`.
//
// If those are ok, then you can compile for replay:
//
// > clang -I /usr/local/include/ -L /usr/local/lib get_sign.c -l kleeRuntest
//
// Or just
// > clang get_sign -l kleeRuntest
//
// If the `include` and `lib` paths are the system defaults.
//
// To replay the first test:
//
// We need to add the libary path so it can be dynamically loaded:
......@@ -81,6 +92,9 @@ int main()
// Under `fish`
// > set -x LD_LIBRARY_PATH /usr/local/lib/:$LD_LIBRARY_PATH
//
// Once again, if using the system default system folders
// you don't need to add anything to `LD_LIBRARY_PATH`.
//
// > KTEST_FILE=klee-last/test000001.ktest ./a.out
//
// Now let's inspect the status (return code), in `bash`:
......@@ -124,6 +138,9 @@ int main()
// First build it with debug symbols (`-g`).
// > clang -g -I /usr/local/include/ -L /usr/local/lib get_sign.c -l kleeRuntest
//
// Or if using system defaults:
// > clang -g get_sign.c -l kleeRuntest
//
// Then start `gdb`:
// > KTEST_FILE=klee-last/test000001.ktest gdb ./a.out
// (gdb) break get_sign
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment