← Prev | Next → |
The following are some suggestions regarding ways things could go wrong while building CSI, and some additional information about build options.
If you want to use a different C++ compiler than your default, you can
specify this by a command like
scons CXX_ALT=/path/to/COMPILER
CSI should build nicely (squelching all warnings in the appropriate places) for Clang and GCC versions 4.6+. It is unlikely to build for GCC versions before 4.2.
As noted, LLVM version 3.1 or newer is required. If LLVM is not installed
in a standard location, you will probably have to tell scons where to find the
LLVM configuration helper for your installation. You can do this by a command
like
scons LLVM_CONFIG=/path/to/llvm-config
If you get an error like
/usr/bin/ld: cannot find -lLLVM-3.X
this means that your LLVM installation isn’t built as a shared object. This
will likely only happen if you built LLVM from source. Your configure command
when building LLVM should look something like
configure --enable-shared
If you intend to use aggressive optimization (see below), you should
also consider building LLVM with assertions enabled. The flags for this will
vary with LLVM version, but, as an example, a standard build to use CSI with
LLVM 4.0 would be:
cmake srcdir -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_ASSERTIONS=ON
-DLLVM_ENABLE_RTTI=ON -DLLVM_LINK_LLVM_DYLIB=ON
CSI is capable of aggressive optimization for program coverage instrumentation schemes. Specifically, if you are hoping to use fully-optimal instrumentation for program coverage (see the coverage optimization page), you will need to build CSI with support for connecting to one of the following:
For the first option, you first need to have GAMS installed.
Then, you can tell CSI where to find your
GAMS installation by a command like
scons GAMSDIR=/path/to/GAMS
Note that this path should point to the primary
GAMS installation directory, which contains
the gams executable, as well as a subdirectory called
apifiles/.
For the second option, you, again, need to up-to-date installations of
GAMS and
LEMON.
Then, you can tell CSI where to find your installations by a command like
scons LEMONDIR=/path/to/lemon GUROBIDIR=/path/to/gurobi
Again, these paths should point to the top-level directories of the installed
tools, containing subdirectories like bin and include.
If building on OSX, note that many pre-packaged distributions of LLVM do not include a full LLVM shared object for linking with CSI. If you see linker errors when building with pre-installed LLVM, please try building LLVM from source. The LLVM project provides guides for installing LLVM and Clang from source.
← Prev | Next → |