Difference between revisions of "ParaView:Build And Install"

From KitwarePublic
Jump to: navigation, search
(Using Visual Studio)
(Do I need BUILD_SHARED_LIBS set to ON if I want to enable Python scripting?)
(44 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 
=Introduction=
 
=Introduction=
  
This page describes how to build and install ParaView. It covers both the release and the development versions, both Unix-type systems (Linux, HP-UX, Solaris, Mac), as well as Windows.
+
'''<font color="green">This page is applicable for ParaView 3.98 and above. For ParaView 3.14.1 and earlier versions, refer to the [http://paraview.org/Wiki/index.php?title=ParaView:Build_And_Install&oldid=46445 past version] of this document.</font>'''
 +
 
 +
This page describes how to build and install ParaView. It covers both the released and the development versions, both Unix-type systems (Linux, HP-UX, Solaris, Mac), as well as Windows.
 +
 
 +
ParaView depends on several open source tools and libraries such as Python, Qt, CGNS, HDF5, etc. Some of these are included in the ParaView source itself (e.g. HDF5), while others are expected to be present on the machine on which ParaView is being built (e.g. Python, Qt, CGNS). Based on whether you want to build ParaView along with all the external tools it needs or you want to build the external tools yourself (or use versions already available on your system), there are two ways to build ParaView from source.
 +
# To build ParaView complete with all the dependencies it needs, use the [[ParaView:Superbuild|ParaView Super-Build]] instructions.
 +
# To build ParaView source itself by providing existing installations/builds of the external depencies, typical for developers, use the instructions on this page.
  
 
=Prerequisites=
 
=Prerequisites=
  
*The ParaView build process requires [http://www.cmake.org CMake] version 2.8.2 or higher and a working compiler. On Unix-like operating systems, it also requires Make, while on Windows it requires Visual Studio (8 or later).
+
*The ParaView build process requires [http://www.cmake.org CMake] version 2.8.8 or higher and a working compiler. On Unix-like operating systems, it also requires Make, while on Windows it requires Visual Studio (8 or later).
  
*Building ParaView's user interface requires TrollTech's Qt, version 4.6.* (4.6.2 recommended) Qt is dual licensed. To compile ParaView, either the open or commercial version may be used. If you intend to make changes the ParaView's GUI and distribute the results, you must obtain a commercial license. The open source version of Qt can be found here [ftp://ftp.trolltech.no/qt/source/]. Commercial licenses can be purchased directly from TrollTech [http://trolltech.com]. For more information on what can be done with the open source version, read this [http://www.paraview.org/Wiki/ParaView_III_and_Qt_licensing].
+
*Building ParaView's user interface requires [http://qt.nokia.com Qt], version 4.7.* (4.8.* is recommended). To compile ParaView, either the LGPL or commercial versions of Qt may be used.
  
 
*In order to run ParaView in parallel, MPI [http://www-unix.mcs.anl.gov/mpi/], [http://www.lam-mpi.org/] is also required.  
 
*In order to run ParaView in parallel, MPI [http://www-unix.mcs.anl.gov/mpi/], [http://www.lam-mpi.org/] is also required.  
Line 19: Line 25:
 
===Using Binaries===
 
===Using Binaries===
  
There are several precompiled binaries available at the [http://www.cmake.org/HTML/Download.html CMake download page].
+
There are several precompiled binaries available at the [http://www.cmake.org/cmake/resources/software.html CMake download page].
  
 
{| cellspacing="3"  
 
{| cellspacing="3"  
Line 28: Line 34:
 
Let's say on Linux, download the appropriate version and follow these instructions:
 
Let's say on Linux, download the appropriate version and follow these instructions:
  
* Download: http://www.cmake.org/files/v2.8/cmake-2.8.2-Linux-i386.tar.gz
+
* Download: http://www.cmake.org/files/v2.8/cmake-2.8.8-Linux-i386.tar.gz
  
 
<pre>
 
<pre>
 
cd $HOME
 
cd $HOME
wget http://www.cmake.org/files/v2.8/cmake-2.8.2-Linux-i386.tar.gz
+
wget http://www.cmake.org/files/v2.8/cmake-2.8.8-Linux-i386.tar.gz
 
mkdir software
 
mkdir software
 
cd software
 
cd software
tar xvfz ../cmake-2.8.2-Linux-i386.tar.gz
+
tar xvfz ../cmake-2.8.8-Linux-i386.tar.gz
 
</pre>
 
</pre>
  
* Now you have the directory '''$HOME/software/cmake-2.8.2-Linux-i386/bin''', and inside there are executables '''cmake''' and '''ccmake'''.
+
* Now you have the directory '''$HOME/software/cmake-2.8.8-Linux-i386/bin''', and inside there are executables '''cmake''' and '''ccmake'''.
 
* You can also install CMake in the '''/usr/local''' or '''/opt''' by untaring and copying sub-directories. The rest of the instructions will assume the executables are in your '''$PATH'''.
 
* You can also install CMake in the '''/usr/local''' or '''/opt''' by untaring and copying sub-directories. The rest of the instructions will assume the executables are in your '''$PATH'''.
  
Line 45: Line 51:
 
<div style="clear: right; text-align: left; padding: .4em .9em .9em">
 
<div style="clear: right; text-align: left; padding: .4em .9em .9em">
 
====On Windows====
 
====On Windows====
* Download the installer: http://www.cmake.org/files/v2.8/cmake-2.8.2-win32-x86.exe
+
* Download the installer: http://www.cmake.org/files/v2.8/cmake-2.8.8-win32-x86.exe
 
* Follow the installation instructions
 
* Follow the installation instructions
  
 
====On Windows, if you are not administrator====
 
====On Windows, if you are not administrator====
* Download: http://www.cmake.org/files/v2.8/cmake-2.8.2-win32-x86.zip
+
* Download: http://www.cmake.org/files/v2.8/cmake-2.8.8-win32-x86.zip
 
* Uncompress into some directory
 
* Uncompress into some directory
 
* Optional: create a shortcut on the desktop.
 
* Optional: create a shortcut on the desktop.
Line 62: Line 68:
 
<div style="padding: .4em .9em .9em">
 
<div style="padding: .4em .9em .9em">
 
====On Unix-like operating systems====
 
====On Unix-like operating systems====
Download the source code: http://www.cmake.org/files/v2.8/cmake-2.8.2.tar.gz
+
Download the source code: http://www.cmake.org/files/v2.8/cmake-2.8.8.tar.gz
  
 
<pre>
 
<pre>
 
cd $HOME
 
cd $HOME
wget http://www.cmake.org/files/v2.8/cmake-2.8.2.tar.gz
+
wget http://www.cmake.org/files/v2.8/cmake-2.8.8.tar.gz
tar xvfz cmake-2.8.2.tar.gz
+
tar xvfz cmake-2.8.8.tar.gz
cd cmake-2.8.2
+
cd cmake-2.8.8
 
./configure --prefix=$HOME/software
 
./configure --prefix=$HOME/software
 
make
 
make
Line 86: Line 92:
 
==Download And Install Qt==
 
==Download And Install Qt==
  
ParaView uses Trolltech's Qt as its GUI library.  Qt is required whenever the ParaView client is built.  See this page for Qt licensing information: [http://www.paraview.org/Wiki/ParaView_III_and_Qt_licensing].   
+
ParaView uses Qt as its GUI library.  Qt is required whenever the ParaView client is built.   
*As stated above, the open source version of Qt can be found at [ftp://ftp.trolltech.no/qt/source/].
+
*As stated above, the LGPL of Qt can be found at [http://qt.nokia.com/downloads].
**For source code, use the latest stable version of qt-everywhere-opensource-src-VERSION.[tar.gz or zip or dmg].  If this gives you trouble, version 4.6.2 is known to work.
+
**For source code, use the latest stable version of qt-everywhere-opensource-src-VERSION.[tar.gz or zip or dmg].  If this gives you trouble, version 4.8.2 is known to work.
**For binaries, use the latest stable version of qt-PLATFORM-opensource-VERSION.[tar.gz or zip or dmg].  If this gives you trouble, version 4.6.2 is known to work.
+
**For binaries, use the latest stable version of qt-PLATFORM-opensource-VERSION.[tar.gz or zip or dmg].  If this gives you trouble, version 4.8.2 is known to work. When downloading binaries, ensure that your compiler version matches the Qt compiler indicated.
 
+
*Commercial licenses can be purchased directly from TrollTech [http://trolltech.com].
+
  
 
==Download And Install ffmpeg (.avi) movie libraries==
 
==Download And Install ffmpeg (.avi) movie libraries==
Line 117: Line 121:
 
===Download The Release===
 
===Download The Release===
  
Don't forget that you can always just download the binaries from the [http://www.paraview.org/HTML/Download.html ParaView download page]. This page contains binaries for several platforms and the source code for the releases.
+
Don't forget that you can always just download the binaries from the [http://paraview.org/paraview/resources/software.php ParaView download page]. This page contains binaries for several platforms and the source code for the releases.
  
 
====Note: debian build====
 
====Note: debian build====
Line 123: Line 127:
 
List of packages to build ParaView on Debian:  
 
List of packages to build ParaView on Debian:  
  
libphonon-dev libphonon4 libqt4-assistant qt4-dev-tools libqt4-core libqt4-gui qt4-qmake  libxt-dev  g++ gcc cmake-curses-gui libqt4-opengl-dev mesa-common-dev
+
libphonon-dev libphonon4 qt4-dev-tools libqt4-core libqt4-gui qt4-qmake  libxt-dev  g++ gcc cmake-curses-gui libqt4-opengl-dev mesa-common-dev
  
 
With MPI (using openmpi, you can use any other flavour):
 
With MPI (using openmpi, you can use any other flavour):
Line 131: Line 135:
 
With Python:
 
With Python:
  
python2.5-dev
+
python-dev
  
 
===Checkout Development Version from git===
 
===Checkout Development Version from git===
Line 164: Line 168:
  
 
====On Windows====
 
====On Windows====
We recommend [msysgit|http://code.google.com/p/msysgit]. Msysgit provides an msys shell that has the appropriate environment set up for using git and it's tools.
+
We recommend [http://code.google.com/p/msysgit msysgit]. msysgit provides an msys shell that has the appropriate environment set up for using git and it's tools.
 
</div>
 
</div>
 
|}
 
|}
Line 231: Line 235:
 
| bgcolor="#abcdef" height="8" |  '''Description'''
 
| bgcolor="#abcdef" height="8" |  '''Description'''
 
|-
 
|-
| BUILD_SHARED_LIBS || If ON, use shared libraries. This way executables are smaller, but you have to make sure the shared libraries are on every system on the cluster.
+
| BUILD_SHARED_LIBS || If ON, use shared libraries. This way executables are smaller, but you have to make sure the shared libraries are on every system on the cluster. This option should be set to ON if you plan on using plugins for ParaView (there ways to use plugins in static builds of ParaView for advanced users).
 
|-
 
|-
 
| PARAVIEW_USE_MPI || Turn this to ON to enable MPI. Other MPI options will not be available until you turn this on.
 
| PARAVIEW_USE_MPI || Turn this to ON to enable MPI. Other MPI options will not be available until you turn this on.
 
|-
 
|-
| MPI_LIBRARY || Path to the MPI library (such as /usr/lib/libmpi.so). Should be found by default, but you may have to set it. (see the note below)
+
| MPI_C_LIBRARIES || Paths to the MPI libraries (such as /usr/lib/libmpi.so). Should be found by default, but you may have to set it. Certain mpi implementations need more than one library. All the libraries can be specified by separating them with a ';'. (see the note below)
 
|-
 
|-
| MPI_EXTRA_LIBRARY || Path to extra MPI library (such as /usr/lib/libmpi++.so). If the MPI distribution is MPICH, this may not be found; in this case, it is ok for this variable to be set to MPI_EXTRA_LIBRARY-NOTFOUND.
+
| MPI_C_INCLUDE_PATH || Path to MPI includes (such as /usr/include/mpi). Again, this should be found by default.
|-
+
| MPI_INCLUDE_PATH || Path to MPI includes (such as /usr/include/mpi). Again, this should be found by default.
+
 
|-
 
|-
 
| PARAVIEW_ENABLE_PYTHON || Makes Python client scripting and the Python programmable filter available.
 
| PARAVIEW_ENABLE_PYTHON || Makes Python client scripting and the Python programmable filter available.
Line 245: Line 247:
 
| PARAVIEW_BUILD_QT_GUI || Flag to enable/disable the building of the ParaView Qt-based client. This option is useful when building ParaView on server nodes or when we are only interested in the Python client, as it avoids building of the Qt client thus does not require Qt. ON by default.
 
| PARAVIEW_BUILD_QT_GUI || Flag to enable/disable the building of the ParaView Qt-based client. This option is useful when building ParaView on server nodes or when we are only interested in the Python client, as it avoids building of the Qt client thus does not require Qt. ON by default.
 
|-
 
|-
| QT_QMAKE_EXECUTABLE || Path to Qt's qmake executable (such as /usr/local/Trolltech/Qt-4.2.2/bin/qmake). CMake uses this to locate the rest of the required Qt executables, headers and libraries.
+
| QT_QMAKE_EXECUTABLE || Path to Qt's qmake executable (such as /usr/local/bin/qmake). CMake uses this to locate the rest of the required Qt executables, headers and libraries.
|-
+
| VTK_USE_CARBON || For Mac, this is the default. Neither X11 nor COCOA frameworks are supported.
+
|-
+
| VTK_OPENGL_HAS_OSMESA || Turn this to ON to enable MESA (i.e., software rendering).  All mesa directory and file settings below depend on this flag.
+
|-
+
| OSMESA_INCLUDE_DIR || Set this to the include directory for MESA.
+
|-
+
| OPENGL_INCLUDE_DIR || Set this to the include directory for MESA.
+
|-
+
| OPENGL_gl_LIBRARY || Set this to the libGL.a or libGL.so file.
+
 
|-
 
|-
| OPENGL_glu_LIBRARY || Set this to the libGLU.a or libGLU.so file.
+
| PARAVIEW_ENABLE_FFMPEG || Enable FFMPEG support (UNIX only)
 
|-
 
|-
| OSMESA_LIBRARY || Set this to the libOSMesa.a or libOSMesa.so file.
+
| PARAVIEW_USE_VISITBRIDGE || Enable VisItBridge that adds support for additional file formats (requires Boost)
 
|}
 
|}
  
Line 300: Line 292:
  
 
   make -j 4
 
   make -j 4
 
* To create online documentation, type the following.  (Note that ParaVeiw build does not create this documentation by default).
 
 
  make HTMLDocumentation
 
  
 
[[Image:Brpv make.png|400px]]
 
[[Image:Brpv make.png|400px]]
Line 321: Line 309:
 
=Install ParaView=
 
=Install ParaView=
  
ParaView can be run directly from the build directory. That said, for production environments, it should be installed in some system location. For that purpose simply follow the instructions for "Distributing ParaView" and the unpack the generated archive at the appropriate install location.
+
ParaView can be run directly from the build directory. That said, for production environments, it should be installed in some system location.
  
== Distributing ParaView ==
+
For that purpose simply follow these instructions to install to an appropriate location. (these need to be updated for Windows). Note that ParaView is designed to <font color="brown">'''install what it builds'''</font>. Thus only the libraries and executables that ParaView builds are installed. For example, these instructions will not install Qt or ffmpeg libraries to the specified location. If you are interested in creating a binary package that is complete and can be distributed to other users/systems, you may want to refer to [[ParaView:Superbuild|ParaView Super-Build]].
It is possible to create distribution binaries for ParaView using '''CPack''', which is included in CMake. The packaged binary can be in any of the variable supported generator formats eg. DEB (debian packages), RPM (RPM Packages), NSIS (Null Soft Installer) etc. Please refer to [[http://www.cmake.org/Wiki/CMake:CPackPackageGenerators]] for a complete list.
+
  
 
===CMake Variables===
 
===CMake Variables===
When building ParaView so that it can be distributed, in most typical cases, ensure that the values for the following CMake variables are set correctly.
+
 
 +
Some of the CMake variables that affect installation rules are:
  
 
{| border="0" cellpadding="4" cellspacing="4"
 
{| border="0" cellpadding="4" cellspacing="4"
Line 335: Line 323:
 
| bgcolor="#abcdef" height="8" |  '''Description'''
 
| bgcolor="#abcdef" height="8" |  '''Description'''
 
|-
 
|-
| BUILD_SHARED_LIBS
+
| CMAKE_INSTALL_PREFIX
| ON
+
| <path>
| Enables shared libraries (unless you are sure you want to do static builds).
+
| Set this to the root of the location where you want ParaView to be installed. For unix based systems, ParaView will be installed under bin/ lib/ directories under this install prefix. '''This option is not available on Mac OSX'''.
 
|-
 
|-
 
| CMAKE_BUILD_TYPE
 
| CMAKE_BUILD_TYPE
Line 343: Line 331:
 
| Unless you want to end up with debug install, set this to Release.
 
| Unless you want to end up with debug install, set this to Release.
 
|-
 
|-
| PARAVIEW_USE_MPI
+
| PARAVIEW_INSTALL_DEVELOPMENT_FILES
| OFF
+
| Unless you are taking extra steps to ensure that the clients have the required MPI libraries, set this to OFF, since ParaView does not include rules to package MPI.
+
|-
+
| PARAVIEW_ENABLE_PYTHON
+
| OFF
+
| Unless you are taking extra steps to ensure that clients have the required Python libraries/modules.
+
|-
+
| PARAVIEW_GENERATE_PROXY_DOCUMENTATION
+
| ON
+
| To ensure that the html documentation for the sources/filters/readers/writes is generated and packed into the application, turn the following flag ON.
+
|-
+
| PARAVIEW_INSTALL_DEVELOPMENT
+
 
| OFF/ON
 
| OFF/ON
| To package development files so that people can build plugins/custom-apps using the installation.
+
| To install development files, including headers, so that developers can build plugins/custom-applications using the installed version of ParaView, set this to ON. '''Currently, this option is not available on Mac OSX or Windows'''.
 
|-
 
|-
|PARAVIEW_BUILD_QT_GUI
+
| MACOSX_APP_INSTALL_PREFIX
| ON/OFF
+
| <path>
| To enable building the Qt client.
+
| Set this to the location where you want ParaView to install the app bundle on "make install". '''This option is only available on Mac OSX'''
|-
+
|PARAVIEW_INSTALL_THIRD_PARTY_LIBRARIES
+
| ON
+
| To enable bundling of third party libraries when using cpack.  An example is Qt.
+
 
|}
 
|}
  
===PARAVIEW_EXTRA_INSTALL_RULES_FILE: Adding custom install rules===
+
===Installing===
 +
Following the configuration, simply run 'make' to compile and build.
  
You can add additional install rules by writing a custom CMake file with install rules and then set PARAVIEW_EXTRA_INSTALL_RULES_FILE CMake variable to point to that file. ParaView process all install rules that have the COMPONENT set to either "Runtime" (for executables), or "RuntimeLibraries" (for shared libraries), or "BrandedRuntime" (for custom-application specific libraries/executables) only (and "Development" when PARAVIEW_INSTALL_DEVELOPMENT is TRUE). So you want to add your install rules with appropriate COMPONENT values in this custom CMake file.
+
{| cellspacing="3"  
 +
|- valign="top"  
 +
|width="30%" class="MainPageBG" style="border: 1px solid #ffc9c9; color: #000; background-color: #fff3f3"|
 +
<div style="padding: .4em .9em .9em">
 +
====On Unix-like operating systems:====
 +
  make install
  
e.g. you want to include mpilibs in the installation, in that case the custom
+
This will install all the relevant files in directories under the CMAKE_INSTALL_PREFIX. The executables are installed in ${CMAKE_INSTALL_PREFIX}/bin and the libraries are installed in ${CMAKE_INSTALL_PREFIX}/lib/paraview-${major}.${minor}.
install rules file could look something as follows:
+
  
<div style="border: 1px solid #ffc9c9; color: #000; background-color: #fff3f3">
+
</div>
 
+
|width="30%" class="MainPageBG" style="border: 1px solid #c6c9ff; color: #000; background-color: #f0f0ff"|
 
+
<div style="clear: right; text-align: left; padding: .4em .9em .9em">
<source lang="python">
+
  INSTALL (FILES ${MPI_LIBRARY} ${MPI_EXTRA_LIBRARY}
+
          DESTINATION ${PV_INSTALL_LIB_DIR}
+
          COMPONENT RuntimeLibraries)
+
</source>
+
  
 +
====On Windows:====
 +
  <to be decided>
 +
</div>
 +
| width="40%" class="MainPageBG" style="border: 1px solid #c6c9ff; color: #000; background-color: #d1f0e5"|
 +
<div style="clear: right; text-align: left; padding: .4em .9em .9em">
 +
====On Mac:====
 +
  make install
  
 +
This will create an app bundle in the directory specified by MACOSX_APP_INSTALL_PREFIX. This app bundle will have the main application executable under APP/Contents/MacOS, libraries under APP/Contents/Libraries, plugins under APP/Contents/Plugins, and additional executables such as the server executables and python executables under APP/Conents/bin.
 
</div>
 
</div>
 +
|}
  
==Generate Package==
+
==Notes on Mac OSX==
  
Following the configuration, simply run 'make' to compile and build.
+
On Mac OSX, "'''make install'''" will install an app bundle to the location specified by MACOSX_APP_INSTALL_PREFIX. This app will contain all the ParaView libraries, plugins, python scripts, etc. that were built by ParaView. You can move this app around on the same machine like a regular app and it will work without any problems. Note, however, that this is not a redistributable app bundle. You cannot ship this off to your friend and expect it to work. This app does not include any *external dependencies*, such Qt libraries, or Python libraries, and has references to the versions that you used to build ParaView. This is not unique to Mac OSX, but to all other plaforms as well. "make install" is used to install runtimes to be used on the same machine. To generate redistributable packages, refer to [[ParaView:Superbuild|ParaView Super-Build]] instructions.
  
{| cellspacing="3"
+
==Miscellaneous Comments==
|- valign="top"
+
* Build trees of ParaView on non-Windows systems, always have RPATH information embedded in the binaries. When a make install is performed or CPACK is used, all RPATH information is stripped from the binaries in the install tree (expect for paths to external libraries). By default ParaView builds forwarding executables (launchers) that are installed in the bin directory. These binaries properly set up the environment to launch the equivalent executable in the lib/paraview-x.y directory.
|width="50%" class="MainPageBG" style="border: 1px solid #ffc9c9; color: #000; background-color: #fff3f3"|
+
* If you are compiling a MESA version of the ParaView server, start the server with the --use-offscreen-memory flag.
<div style="padding: .4em .9em .9em">
+
On Unix-like operating systems
+
  
To generate a tar ball, in the binary directory, simply run:
+
== Notes ==
cpack -G TGZ --config
+
=== Environment Variables ===
  {ParaViewBuild}/Applications/ParaView/CPackParaViewConfig.cmake
+
  
If PARAVIEW_BUILD_QT_GUI was OFF, then to generate a package consisting of the
+
If you build with shared libraries, you may have to add the Qt directory to you PATH environment variables to run ParaView. With Windows, one way to do so is to open up the environment variables dialog by clicking through '''Start'''|Control Panel|System|Advanced|Environment Variables. From that dialog, add a new user variable called PATH with a value of C:\Qt\4.8.2\bin. For other operating systems, add Qt/4.8.2/lib  to your LD_LIBRARY_PATH environment variable.
server executables alone, use the following command:
+
  
cpack -G TGZ --config
+
=Frequently Asked Questions=
  {ParaViewBuild}/Applications/ParaView/CPackParaViewServersConfig.cmake
+
</div>
+
|width="50%" class="MainPageBG" style="border: 1px solid #c6c9ff; color: #000; background-color: #f0f0ff"|
+
<div style="clear: right; text-align: left; padding: .4em .9em .9em">
+
On Windows
+
  
To generate a null-soft installer (requires [http://nsis.sourceforge.net/Main_Page]), in the binary directory, simply run:
+
===="make install" does not install ffmpeg and other libraries as it did with 3.14.1 and earlier. Is this a bug?====
  
cpack -G NSIS -C Release --config
+
This is a deliberate change. It was decided that ParaView should install only what it builds. Since ParaView doesn't build ffmpeg, it doesn't add install rules to install it. If you are interested in creating a package that includes all files ParaView depends on so that you can distribute to other, refer to
  {ParaViewBuild}/Applications/ParaView/CPackParaViewConfig.cmake
+
[[ParaView:Superbuild|ParaView Super-Build]]. That is supposed to do exactly that.
  
If PARAVIEW_BUILD_QT_GUI was OFF, then to generate a package consisting of the
+
====How do I generate a distributable ParaView package?====
server executables alone, use the following command:
+
  
cpack -G NSIS -C Release --config
+
Refer to [[ParaView:Superbuild | ParaView Super-Build]]. That is the process we use to generate the official binaries that are distributed on paraview.org. It streamlines the process of building all the depedencies for ParaView and then packaging them into installables or tarballs.
  {ParaViewBuild}/Applications/ParaView/CPackParaViewServersConfig.cmake
+
  
</div>
+
====Do I need BUILD_SHARED_LIBS set to be ON if I want to enable Python scripting?====
|-
+
| width="50%" class="MainPageBG" style="border: 1px solid #c6c9ff; color: #000; background-color: #d1f0e5"|
+
<div style="clear: right; text-align: left; padding: .4em .9em .9em">
+
On Mac
+
  
To generate an app bundle that can be distributed, use:
+
No. In ParaView 3.14.1 and earlier, this was indeed the case, ParaView required that BUILD_SHARED_LIBS was ON if Python support was to be enabled. That is no longer the case. BUILD_SHARED_LIBS and PARAVIEW_ENABLE_PYTHON can now be managed independently.
  
cpack -G DragNDrop --config
 
  {ParaViewBuild}/Applications/ParaView/CPackParaViewConfig.cmake
 
  
If PARAVIEW_BUILD_QT_GUI was OFF, then to generate a tarball consisting of the
 
server executables alone, use the following command:
 
  
cpack -G TGZ --config
 
  {ParaViewBuild}/Applications/ParaView/CPackParaViewServersConfig.cmake
 
</div>
 
|}
 
* If packaging with PARAVIEW_INSTALL_DEVELOPMENT ON then the CPack config file will be called CPackParaView-DevelopmentConfig.cmake.
 
  
==Miscellaneous Comments==
 
  
* Don't untar the packaged tar ball over the build directory itself. You can always remove the build directory and untar the tar ball in its place.
 
* Don't use <font color="red">make install</font>, as it may install more files than required.
 
* CMAKE_INSTALL_PREFIX is not applicable when using CPack and will have no effect.
 
* Build trees of ParaView on non-Windows systems, always have RPATH information embedded in the binaries. When a make install is performed or CPACK is used, all RPATH information is stripped from the binaries in the install tree. By default ParaView builds forwarding executables (launchers) that are installed in the bin directory. These binaries properly set up the environment to launch the equivalent executable in the lib/paraview-x.y directory.
 
* If you are compiling a MESA version of the ParaView server, start the server with the --use-offscreen-memory flag.
 
  
== Notes ==
 
=== Compiling on the Mac ===
 
To compile on the Mac, follow the instructions for Unix. The recommended configuration settings are:
 
BUILD_SHARED_LIBS=ON.
 
 
=== Environment Variables ===
 
  
If you build with shared libraries, you may have to add the Qt directory to you PATH environment variables to run ParaView. With Windows, one way to do so is to open up the  environment variables dialog by clicking through '''Start'''|Control Panel|System|Advanced|Environment Variables. From that dialog, add a new user variable called PATH with a value of C:\Qt\4.6.3\bin. For other operating systems, add Qt/4.6.3/lib  to your LD_LIBRARY_PATH environment variable.
 
  
 
{{ParaView/Template/Footer}}
 
{{ParaView/Template/Footer}}

Revision as of 21:21, 31 October 2012

Introduction

This page is applicable for ParaView 3.98 and above. For ParaView 3.14.1 and earlier versions, refer to the past version of this document.

This page describes how to build and install ParaView. It covers both the released and the development versions, both Unix-type systems (Linux, HP-UX, Solaris, Mac), as well as Windows.

ParaView depends on several open source tools and libraries such as Python, Qt, CGNS, HDF5, etc. Some of these are included in the ParaView source itself (e.g. HDF5), while others are expected to be present on the machine on which ParaView is being built (e.g. Python, Qt, CGNS). Based on whether you want to build ParaView along with all the external tools it needs or you want to build the external tools yourself (or use versions already available on your system), there are two ways to build ParaView from source.

  1. To build ParaView complete with all the dependencies it needs, use the ParaView Super-Build instructions.
  2. To build ParaView source itself by providing existing installations/builds of the external depencies, typical for developers, use the instructions on this page.

Prerequisites

  • The ParaView build process requires CMake version 2.8.8 or higher and a working compiler. On Unix-like operating systems, it also requires Make, while on Windows it requires Visual Studio (8 or later).
  • Building ParaView's user interface requires Qt, version 4.7.* (4.8.* is recommended). To compile ParaView, either the LGPL or commercial versions of Qt may be used.
  • In order to run ParaView in parallel, MPI [1], [2] is also required.
  • In order to use scripting, Python is required [3].

Download And Install CMake

CMake is a tool that makes cross-platform building simple. On several systems it will probably be already installed. If it is not, please use the following instructions to install it. If CMake does not exist on the system, and there are no pre-compiled binaries, use the instructions below on how to build it. Use the most recent source or binary version of CMake from the CMake web site.

Using Binaries

There are several precompiled binaries available at the CMake download page.

On Unix-like operating systems

Let's say on Linux, download the appropriate version and follow these instructions:

cd $HOME
wget http://www.cmake.org/files/v2.8/cmake-2.8.8-Linux-i386.tar.gz
mkdir software
cd software
tar xvfz ../cmake-2.8.8-Linux-i386.tar.gz
  • Now you have the directory $HOME/software/cmake-2.8.8-Linux-i386/bin, and inside there are executables cmake and ccmake.
  • You can also install CMake in the /usr/local or /opt by untaring and copying sub-directories. The rest of the instructions will assume the executables are in your $PATH.

On Windows

On Windows, if you are not administrator

Build Your Own CMake

On Unix-like operating systems

Download the source code: http://www.cmake.org/files/v2.8/cmake-2.8.8.tar.gz

cd $HOME
wget http://www.cmake.org/files/v2.8/cmake-2.8.8.tar.gz
tar xvfz cmake-2.8.8.tar.gz
cd cmake-2.8.8
./configure --prefix=$HOME/software
make
make install
  • Again, you can install it in /usr/local or /opt by changing the prefix.

On Windows

To build CMake on windows, a previous version of CMake is required. This can be downloaded from the Cmake download page: [4].

Download And Install Qt

ParaView uses Qt as its GUI library. Qt is required whenever the ParaView client is built.

  • As stated above, the LGPL of Qt can be found at [5].
    • For source code, use the latest stable version of qt-everywhere-opensource-src-VERSION.[tar.gz or zip or dmg]. If this gives you trouble, version 4.8.2 is known to work.
    • For binaries, use the latest stable version of qt-PLATFORM-opensource-VERSION.[tar.gz or zip or dmg]. If this gives you trouble, version 4.8.2 is known to work. When downloading binaries, ensure that your compiler version matches the Qt compiler indicated.

Download And Install ffmpeg (.avi) movie libraries

When the ability to write .avi files is desired, and writing these files is not supported by the OS, ParaView can attach to an ffmpeg library. This is generally true for Linux. Ffmpeg library source code is found here: [6]

Download And Install MESA 3D libraries

ParaView uses the OpenGL graphics drivers and card from a user's workstation. When you want to run ParaView's servers on a platform that does not include hardware OpenGL support, you must use MESA to emulate this hardware in software. Mesa is open source, and it can be downloaded from here: [7].

There is a known problem with MESA version 7.8.2 and ParaView. This has been reported to the MESA team. Version 7.7.1 has been tested and seems to work correctly as well as 7.9.

Build as follows:

  • make realclean
  • make TARGET (for instance, make linux-x86-64)

Note - some platforms will complain during ParaView compiles about needing fPIC. In the configs directory, copy your platform file to another custom file, edit it, and add -fPIC to the compile lines. For instance, cp linux-x86-64 linux-x86-64-fPIC.

For more elaborate discussion on building with Mesa/OSMesa support, refer to ParaView And Mesa_3D.

Download ParaView Source Code

If you are trying to build a ParaView release, download it from the release page. For the development version, please follow the instructions below for checking it out from git.

Download The Release

Don't forget that you can always just download the binaries from the ParaView download page. This page contains binaries for several platforms and the source code for the releases.

Note: debian build

List of packages to build ParaView on Debian:

libphonon-dev libphonon4 qt4-dev-tools libqt4-core libqt4-gui qt4-qmake libxt-dev g++ gcc cmake-curses-gui libqt4-opengl-dev mesa-common-dev

With MPI (using openmpi, you can use any other flavour):

openmpi-common openmpi-bin libopenmpi-dev

With Python:

python-dev

Checkout Development Version from git

Note that you may need to download and install a git client, here: [8]

On Unix-like operating systems

Prepare directory for download
 # mkdir $HOME/projects
 # cd $HOME/projects

To download the source code 
 # git clone git://paraview.org/ParaView.git ParaView
 # cd ParaView
 # git checkout -b trunk origin/master
 # git submodule init
 # git submodule update

To update the code
 # git fetch origin
 # git rebase origin/master
 #git submodule update

On Windows

We recommend msysgit. msysgit provides an msys shell that has the appropriate environment set up for using git and it's tools.

Configure ParaView With CMake

  • Always use a separate build directory. Do not build in the source directory.

On Unix-like systems

  • Use ccmake (Curses CMake GUI) from the CMake installed location. CCMake is a Curses based GUI for CMake. To run it go to the build directory and specify as an argument the src directory.
mkdir $HOME/projects/ParaView-bin
cd $HOME/projects/ParaView-bin

ccmake $HOME/projects/ParaView3

Brpv ccmake.png

About CCMake (Curses CMake GUI)

  • Iterative process.
    • Select values, run configure (c key).
    • Set the settings, run configure, set the settings, run configure, etc.
  • Repeat until all values are set and the generate option is available (g key).
  • Some variables (advanced variables) are not visible right away.
  • To see advanced varables, toggle to advanced mode (t key).
  • To set a variable, move the cursor to the variable and press enter.
    • If it is a boolean (ON/OFF) it will flip the value.
    • If it is string or file, it will allow editing of the string.
    • For file and directories, the <tab> key can be used to complete.
  • To search for a variable press '/' key; to repeat the search, press the 'n' key.

On Windows

  • Use CMakeSetup from the CMake install location.
  • Make sure to select the appropriate source and the build directory.
  • Also, make sure to pick the appropriate generator (on Visual Studio 6, pick the Visual Studio 6 generator). Some CMake versions will ask you to select the generator the first time you press Configure instead of having a drop-down menu in the main dialog.

Brpv cmakesetup.png

About CMakeSetup (Windows CMake GUI)

  • Iterative process.
    • Select values, press the Configure button.
    • Set the settings, run configure, set the settings, run configure, etc.
  • Repeat until all values are set and the OK button becomes available.
  • Some variables (advanced variables) are not visible right away.
  • To see advanced varables, toggle to advanced mode ("Show Advanced Values" toggle).
  • To set the value of a variable, click on that value.
    • If it is boolean (ON/OFF), a drop-down menu will appear for changing the value.
    • If it is file or directory, an ellipsis button will appear ("...") on the far right of the entry. Clicking this button will bring up the file or directory selection dialog.
    • If it is a string, it will become an editable string.

ParaView Settings

Variable Description
BUILD_SHARED_LIBS If ON, use shared libraries. This way executables are smaller, but you have to make sure the shared libraries are on every system on the cluster. This option should be set to ON if you plan on using plugins for ParaView (there ways to use plugins in static builds of ParaView for advanced users).
PARAVIEW_USE_MPI Turn this to ON to enable MPI. Other MPI options will not be available until you turn this on.
MPI_C_LIBRARIES Paths to the MPI libraries (such as /usr/lib/libmpi.so). Should be found by default, but you may have to set it. Certain mpi implementations need more than one library. All the libraries can be specified by separating them with a ';'. (see the note below)
MPI_C_INCLUDE_PATH Path to MPI includes (such as /usr/include/mpi). Again, this should be found by default.
PARAVIEW_ENABLE_PYTHON Makes Python client scripting and the Python programmable filter available.
PARAVIEW_BUILD_QT_GUI Flag to enable/disable the building of the ParaView Qt-based client. This option is useful when building ParaView on server nodes or when we are only interested in the Python client, as it avoids building of the Qt client thus does not require Qt. ON by default.
QT_QMAKE_EXECUTABLE Path to Qt's qmake executable (such as /usr/local/bin/qmake). CMake uses this to locate the rest of the required Qt executables, headers and libraries.
PARAVIEW_ENABLE_FFMPEG Enable FFMPEG support (UNIX only)
PARAVIEW_USE_VISITBRIDGE Enable VisItBridge that adds support for additional file formats (requires Boost)

Note for MPI settings: If your MPI variables aren't set automatically (usually the case if the compiler wrapper [mpicxx] is not in the path or in some standard directory), toggle advanced options and set MPI_COMPILER variable to the full path of your mpi compiler (usually mpicxx), and configure. This should set all the required MPI variables. If not, then you might need to enter them manually.
If you get an error such as "mpi.h: no such file or directory" then set the CMAKE_C_FLAGS= -lmpi and the CMAKE_CXX_FLAGS= -lmpi++ . This is in addition to the MPI variables.

Finish Configuring ParaView

Using CCMake

  • Once all configuration options are set, you should be able to just run <generate> (g key).

Using CMakeSetup

  • Once all configuration options are set, you should be able to just run <generate>, by clicking the "OK" button.

Build ParaView

You can now build ParaView using the appropriate build system.

Using Make

CMake will now generate Make files. These make files have all dependencies and all rules to build ParaView on this system. You should not however try to move the build directory to another location on this system or to another system.

Once you have makefiles you should be able to just type:

 make
  • If you are on multi-processor system (let's say four processor), you can type:
 make -j 4

Brpv make.png

Using Visual Studio

CMake will now create Visual Studio project files. Before you open Visual Studio, be sure that the Qt .dlls are in your path. You should now be able to open the ParaView project (or workspace) file. Make sure to select the appropriate build type (Debug, Release, ...). To build ParaView, simply build the ALL_BUILD target.

Brpv visualstudio71.png

Install ParaView

ParaView can be run directly from the build directory. That said, for production environments, it should be installed in some system location.

For that purpose simply follow these instructions to install to an appropriate location. (these need to be updated for Windows). Note that ParaView is designed to install what it builds. Thus only the libraries and executables that ParaView builds are installed. For example, these instructions will not install Qt or ffmpeg libraries to the specified location. If you are interested in creating a binary package that is complete and can be distributed to other users/systems, you may want to refer to ParaView Super-Build.

CMake Variables

Some of the CMake variables that affect installation rules are:

Variable Value Description
CMAKE_INSTALL_PREFIX <path> Set this to the root of the location where you want ParaView to be installed. For unix based systems, ParaView will be installed under bin/ lib/ directories under this install prefix. This option is not available on Mac OSX.
CMAKE_BUILD_TYPE Release Unless you want to end up with debug install, set this to Release.
PARAVIEW_INSTALL_DEVELOPMENT_FILES OFF/ON To install development files, including headers, so that developers can build plugins/custom-applications using the installed version of ParaView, set this to ON. Currently, this option is not available on Mac OSX or Windows.
MACOSX_APP_INSTALL_PREFIX <path> Set this to the location where you want ParaView to install the app bundle on "make install". This option is only available on Mac OSX

Installing

Following the configuration, simply run 'make' to compile and build.

On Unix-like operating systems:

 make install

This will install all the relevant files in directories under the CMAKE_INSTALL_PREFIX. The executables are installed in ${CMAKE_INSTALL_PREFIX}/bin and the libraries are installed in ${CMAKE_INSTALL_PREFIX}/lib/paraview-${major}.${minor}.

On Windows:

 <to be decided>

On Mac:

 make install

This will create an app bundle in the directory specified by MACOSX_APP_INSTALL_PREFIX. This app bundle will have the main application executable under APP/Contents/MacOS, libraries under APP/Contents/Libraries, plugins under APP/Contents/Plugins, and additional executables such as the server executables and python executables under APP/Conents/bin.

Notes on Mac OSX

On Mac OSX, "make install" will install an app bundle to the location specified by MACOSX_APP_INSTALL_PREFIX. This app will contain all the ParaView libraries, plugins, python scripts, etc. that were built by ParaView. You can move this app around on the same machine like a regular app and it will work without any problems. Note, however, that this is not a redistributable app bundle. You cannot ship this off to your friend and expect it to work. This app does not include any *external dependencies*, such Qt libraries, or Python libraries, and has references to the versions that you used to build ParaView. This is not unique to Mac OSX, but to all other plaforms as well. "make install" is used to install runtimes to be used on the same machine. To generate redistributable packages, refer to ParaView Super-Build instructions.

Miscellaneous Comments

  • Build trees of ParaView on non-Windows systems, always have RPATH information embedded in the binaries. When a make install is performed or CPACK is used, all RPATH information is stripped from the binaries in the install tree (expect for paths to external libraries). By default ParaView builds forwarding executables (launchers) that are installed in the bin directory. These binaries properly set up the environment to launch the equivalent executable in the lib/paraview-x.y directory.
  • If you are compiling a MESA version of the ParaView server, start the server with the --use-offscreen-memory flag.

Notes

Environment Variables

If you build with shared libraries, you may have to add the Qt directory to you PATH environment variables to run ParaView. With Windows, one way to do so is to open up the environment variables dialog by clicking through Start|Control Panel|System|Advanced|Environment Variables. From that dialog, add a new user variable called PATH with a value of C:\Qt\4.8.2\bin. For other operating systems, add Qt/4.8.2/lib to your LD_LIBRARY_PATH environment variable.

Frequently Asked Questions

"make install" does not install ffmpeg and other libraries as it did with 3.14.1 and earlier. Is this a bug?

This is a deliberate change. It was decided that ParaView should install only what it builds. Since ParaView doesn't build ffmpeg, it doesn't add install rules to install it. If you are interested in creating a package that includes all files ParaView depends on so that you can distribute to other, refer to ParaView Super-Build. That is supposed to do exactly that.

How do I generate a distributable ParaView package?

Refer to ParaView Super-Build. That is the process we use to generate the official binaries that are distributed on paraview.org. It streamlines the process of building all the depedencies for ParaView and then packaging them into installables or tarballs.

Do I need BUILD_SHARED_LIBS set to be ON if I want to enable Python scripting?

No. In ParaView 3.14.1 and earlier, this was indeed the case, ParaView required that BUILD_SHARED_LIBS was ON if Python support was to be enabled. That is no longer the case. BUILD_SHARED_LIBS and PARAVIEW_ENABLE_PYTHON can now be managed independently.







ParaView: [Welcome | Site Map]