Minisat NOT found while installing KLEE

Minisat is required for stp which is required for KLEE installation. However, while following the instructions to install KLEE on Ubuntu 14.04 LTS 64Bit it may not be found even if it is installed. When we run the following command during Building Simple Theorem Prover step

cmake -G 'Unix Makefiles' $HOME/stp

an error may arise saying

-- Could NOT find minisat (missing: MINISAT_LIBRARY MINISAT_INCLUDE_DIR)
CMake Error at CMakeLists.txt:350 (message):
You must install minisat from https://github.com/niklasso/minisat

Solution for missing Minisat

To fix it open $HOME/stp/build/CMakeCache.txt 

and update the following lines:

//Path to a file.
MINISAT_INCLUDE_DIR:PATH=$HOME/minisat/build/include

//MiniSat include directory
MINISAT_INCLUDE_DIRS:PATH=$HOME/minisat/build/include

//MiniSat library directory
MINISAT_LIBDIR:PATH=

//Path to a library.
MINISAT_LIBRARY:FILEPATH=$HOME/minisat/build/lib/libminisat.so

Moreover, if you have installed stp at a location other than /usr/local  you should modify the command as follows:

./configure --with-llvm=$HOME/llvm-2.9 --with-stp=$HOME/stp/build --with-uclibc=$HOME/klee-uclibc --enable-posix-runtime

You may also need to update LD_LIBRARY_PATH  to contain $HOME/minisat/build/lib  if you have installed minisat at a location which not looked up which searching for libraries.

Categories: Dev