Compiling ParaView

Compiling ParaView

ParaView uses the CMake cross-platform build system. To compile ParaView, you will have to install CMake. Binary and source distributions of CMake can be found here. If it exists for your platform, we highly recommend using a binary distribution. CMake 1.8.3 or newer is required.

The complete distribution of ParaView contains VTK and Tcl/Tk 8.4.5. You do not need to download VTK or Tcl/Tk separately to compile.

Once CMake is installed, you are ready to build ParaView. We highly recommend reading the documentation on running CMake if you are not familiar with this process.

Here is a summary of the ParaView build:

  1. Run one of the CMake user interfaces.
  2. Change configuration options.
  3. Compile (make on UNIX, Visual Studio on Windows).
The ParaView distribution is designed such that all the default build options selected by CMake for VTK and ParaView are appropriate for building ParaView. However you might have to tell CMake the location of some include files and libraries (for example MPI libraries if you enabled MPI support).

UNIX/Linux

The following instructions only apply to Unix/Linux systems. First we will give you the quick-and-dirty way to build ParaView:

  1. Extract the ParaView distribution tarball and enter the directory:
    tar xvzf paraview-1.4.2.tar.gz
    cd paraview-1.4.2
  2. Run cmake in wizard mode, where you have to answer questions about the build:
    cmake . -i
    OR run the terminal-based interface to cmake to interactively change build options:
    ccmake .
  3. Change build options as necessary. The defaults should work for most users. A common option to change is CMAKE_INSTALL_PREFIX which controls the root location of the installation.
  4. Run a make program to build and install the software:
    make && make install
It is a very good idea to tell cmake what C and C++ compilers you will be using. This can prevent many build problems. On most systems you can pass this information to CMake in the following way:
env CXX=/your/C++/compiler CC=/your/c/compiler ccmake .
otherwise you must set CXX and CC in your environment and then run ccmake (or cmake -i).

A better way to build ParaView is to use a build directory separate from the source. This has the advantage of allowing more than one build with different options or on different platforms to share the same source tree. This technique is called an out-of-source build.

The following example shows how to use this technique to build ParaView on multiple architectures. Assume we have a Solaris machine and an IRIX machine with a shared disk with a ParaView source tarball in the home directory. On either machine, extract the source tarball:

tar xvzf paraview-1.4.2.tar.gz
On the Solaris machine, run
mkdir paraview-1.4.2-solaris
cd paraview-1.4.2-solaris
ccmake ../paraview-1.4.2
make && make install
Then on the IRIX machine, run
mkdir paraview-1.4.2-irix
cd paraview-1.4.2-irix
ccmake ../paraview-1.4.2
make && make install

Please note that on some platforms, it might be necessary to use the GNU Make to compile out-of-source. This is due to the fact that the Tcl/Tk build process uses some features not available on all make distributions.

Windows

The Windows build process uses the CMake GUI CMakeSetup.

  1. Install the ParaView source distribution by unzipping into a directory of your choice. A directory called paraview-1.4.2 will be created when the zipfile is extracted.
  2. Execute CMakeSetup. This will pop-up a GUI that allows you to tailor the build. You'll have to tell CMakeSetup where you've placed your ParaView source code, and where to build the object code and dll's. The build directory is typically placed next to the paraview-1.4.2 source directory and called something like paraview-1.4.2-build.
  3. When CMakeSetup completes, start up Visual Studio and load ParaView.dsw or ParaView.sln. Select the ALL_BUILD project, and build it.
We recommend a 300 MByte minimum swap size or you might have trouble during the link phase.

Currently there is no install support for Windows. Just run the paraview executable from the build tree. It will be located in paraview-1.4.2-build/bin/config, where config is either Debug or Release depending on the configuration you chose when building the ALL_BUILD project.