We provide a source release of Infer packaged with pre-build binaries for clang and facebook-clang-plugins for Linux and MacOS. We encourage you to use this release.
Install the dependencies for your operating system and then follow the instructions
in [Infer's getting-started page](http://fbinfer.com/docs/getting-started.html).
## Pre-compiled versions
We provide a source release of Infer packaged with pre-build binaries
for clang and facebook-clang-plugins for Linux and MacOS. We encourage
you to use this release as compiling clang is time-consuming. Install
the dependencies as explained in the next section, then follow the
instructions in [Infer's getting-started
page](http://fbinfer.com/docs/getting-started.html) to compile and
install Infer.
# Install the dependencies
Alternatively, we also provide a docker image in the docker/
directory. Simply go to that directory and run `./run.sh` to get
started with a working installation of Infer.
## MacOS X
## Infer dependencies for MacOSX
Here are the prerequisites to be able to compile Infer. Make sure you have
the dependencies installed and opam configured properly. After that either
[use the release](http://fbinfer.com/docs/getting-started.html) (faster), or [compile everything from source](#compile-clang-and-infer-from-source).
Here are the prerequisites to be able to compile Infer on MacOSX. This
is required to be able to [use the
release](http://fbinfer.com/docs/getting-started.html) (faster), or to
compile everything from source (see the end of this document).
Infer uses a special version of clang along with a clang plugin. Follow these instructions to compile them from source. Alternatively, you can skip these instructions and use the [release](http://fbinfer.com/docs/getting-started.html).
## Compile Infer from source for the Java analysis
If you use Infer to analyze Java programs only, you can simple use
these steps to get Infer up and running:
```sh
# Checkout Infer
git clone https://github.com/facebook/infer.git
cd infer
# Compile Infer
make -C infer java
# Install Infer into your PATH
export PATH=`pwd`/infer/bin:$PATH
```
## Compile Infer from source with clang enabled
You do not need to follow the instructions below if you are using a
[release of Infer](http://fbinfer.com/docs/getting-started.html) or if
you only need to run Infer on Java programs.
Infer uses a special version of clang along with a clang
plugin. Follow these steps to compile them from source and install
Infer.
```bash
```sh
# Checkout Infer
git clone https://github.com/facebook/infer.git
cd infer
@ -85,5 +167,6 @@ facebook-clang-plugins/clang/setup.sh # go have a coffee :)