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.

Debugging Mozilla Firefox in Visual Studio 2012

While debugging Mozilla Firefox either you can create a debug .exe using mozilla build or you can generate a visual studio solution (.sln). In the first case you cannot browse through the code while in the second you can.

Debug Build from Mozilla Build

  1. If you want to debug mozilla in VS2012, compile it in debug mode. Add the following lines to mozilla-release\mozconfig
    ac_add_options --enable-debug
    ac_add_options --disable-optimize
  2. After that create firefox.exe
    cd mozilla-release
    ./mach build
  3. Create a new solution in VS2012 adding the newly created mozilla-release\obj-i686-pc-mingw32\dist\bin\firefox.exe
  4. Open any source file that you believe will definitely run. Mark a break point.
  5. Right click on firefox in Solution Explorer and click Debug > Step Into new instance

A Better Approach

The approach has a problem. You cannot browse through the code. If you want to do that

  1. Create a VisualStudio solution
    cd mozilla-release
    ./mach configure
    ./mach build-backend -b VisualStudio
  2. It will create a VS solution in \mozilla-release\obj-i686-pc-mingw32\msvc\mozilla,sln
  3. Open it in VS2012. It may update the solution to latest format.
  4. That’t it.