Install opam [Quick Install] and then do
git clone https://github.com/goblint/analyzer.git
cd analyzer
make setup
to install OCaml 4.02.1 and the latest versions of the dependencies for the current user. After that you can build goblint:
make
If something goes wrong, take a look at travis-ci.sh for an example setup.
You may now try running goblint: ./goblint tests/regression/04-mutex/01-simple_rc.c
.
The above instructions for Linux work just as well for Mac OS X. Goblint
successfully compiles, but it may fail to parse files. We need cpp
in order
to preprocess source files and current versions of the clang frontend will not
work with goblint. You therefore have to do, e.g., brew install gcc
, and if
you do not want to mess with Apple's default wiring, you can edit src/config.ml
and set the cpp variable to the gcc version installed by homebrew (currently
"cpp-4.9").
For a goblint binary package, follow these instructions. For building from source, install Cygwin using setup-cygwin-dev.bat and then do
wget "https://raw.githubusercontent.com/goblint/analyzer/master/scripts/setup-cygwin-dev.sh" && source setup-cygwin-dev.sh
A ready-to-use virtual machine can be set up using Vagrant:
vagrant up
vagrant ssh
sudo su -
cd analyzer
Running goblint in a Docker container is even faster since everything is already installed:
docker pull voglerr/goblint
docker run voglerr/goblint /analyzer/goblint --help
Use make npm
to setup the web frontend and start serving on http://localhost:3000.
See its README for details.
Use make jar
to build g2html.jar
, which can be used like so
./goblint --html -o result path/to/file.c && firefox result/index.xml