ParaView:Build And Install: Difference between revisions

From KitwarePublic
Jump to navigationJump to search
 
(146 intermediate revisions by 18 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. Also, it covers both Unix-type systems (Linux, HP-UX, Solaris, Mac) as well as Windows.
'''<font color="red">This page has been replaced by [https://gitlab.kitware.com/paraview/paraview/blob/master/Documentation/dev/build.md build documentation in the paraview repository].


=Prerequisites=
'''To build ParaView complete with all the dependencies it needs and to package it, use the [https://gitlab.kitware.com/paraview/paraview-superbuild/-/blob/master/README.md?ref_type=heads paraview superbuild instructions].</font>


The ParaView build process requires [http://www.cmake.org CMake] version 2.4.5 or higher and a working compiler. On Unix-like operating systems, it also requires Make, while on Windows it requires Visual Studio (7 or later).
Building ParaView's user interface requires Trolltech's Qt, version 4.3.* (4.3.5 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].
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 use scripting, python is required [http://www.python.org].
==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 Binaries===
There are several precompiled binaries available at the [http://www.cmake.org/HTML/Download.html CMake download page].
{| cellspacing="3"
|- valign="top"
|width="50%" class="MainPageBG" style="border: 1px solid #ffc9c9; color: #000; background-color: #fff3f3"|
<div style="padding: .4em .9em .9em">
====On Unix-like operating systems====
Let's say on Linux, download the appropriate version and follow these instructions:
* Download http://www.cmake.org/files/v2.4/cmake-2.4.5-Linux-i386.tar.gz
<pre>
cd $HOME
wget http://www.cmake.org/files/v2.4/cmake-2.4.5-Linux-i386.tar.gz
mkdir software
cd software
tar xvfz ../cmake-2.4.5-Linux-i386.tar.gz
</pre>
* Now you have the directory '''$HOME/software/cmake-2.4.5-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'''.
</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====
* Download the installer http://www.cmake.org/files/v2.4/cmake-2.4.5-win32-x86.exe
* Follow the installation instructions
====On Windows, if you are not administrator====
* Download http://www.cmake.org/files/v2.4/cmake-2.4.5-win32-x86.zip
* Uncompress into some directory
* Optional: create a shortcut on the desktop.
</div>
|}
===Build Your Own CMake===
{| cellspacing="3"
|- valign="top"
|width="50%" class="MainPageBG" style="border: 1px solid #ffc9c9; color: #000; background-color: #fff3f3"|
<div style="padding: .4em .9em .9em">
====On Unix-like operating systems====
Download the source code http://www.cmake.org/files/v2.4/cmake-2.4.5.tar.gz
<pre>
cd $HOME
wget http://www.cmake.org/files/v2.4/cmake-2.4.5.tar.gz
tar xvfz cmake-2.4.5.tar.gz
mkdir cmake-2.4.5-bin
cd cmake-2.4.5-bin
../cmake-2.4.5/bootstrap --prefix=$HOME/software
make
make install
</pre>
* Again, you can install it in '''/usr/local''' or '''/opt''' by changing the prefix.
</div>
|width="50%" class="MainPageBG" style="border: 1px solid #c6c9ff; color: #000; background-color: #f0f0ff"|
<div style="clear: right; text-align: left; float: right; padding: .4em .9em .9em">
====On Windows====
To build CMake on windows, a previous version of CMake is required. This can be downloaded from the  [http://www.cmake.org/HTML/Download.html CMake download page].
</div>
|}
=Build ParaView=
==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 CVS.
===Download The Release===
You can always download the binaries from [http://www.paraview.org/HTML/Download.html ParaView download page]. This page contains binaries for several platforms and the source code for the releases.
===Checkout Development Version from CVS===
{| cellspacing="3"
|- valign="top"
|width="50%" class="MainPageBG" style="border: 1px solid #ffc9c9; color: #000; background-color: #fff3f3"|
<div style="padding: .4em .9em .9em">
====On Unix-like operating systems====
<pre>
mkdir $HOME/projects
cd $HOME/projects
cvs -d:pserver:anoncvs@www.paraview.org:/cvsroot/ParaView3 login
<nowiki><enter></nowiki>
cvs -d:pserver:anoncvs@www.paraview.org:/cvsroot/ParaView3 co ParaView3
</pre>
</div>
|width="50%" class="MainPageBG" style="border: 1px solid #c6c9ff; color: #000; background-color: #f0f0ff"|
<div style="clear: right; text-align: left; float: right; padding: .4em .9em .9em">
====On Windows====
If you have Cygwin or Mingw shell, then use them, and follow the instructions for Unix-like oprating systems.
If you are on Windows and do not have Cygwin or Mingw shell, please download a CVS client. We recommend [http://www.tortoisecvs.org/ TortoiseCVS], which is a GUI for CVS on Windows.
The following parameters are used for TortoiseCVS:<br>
<table><tr><td>CVSROOT</td><td>:pserver:anoncvs@www.paraview.org:/cvsroot/ParaView3</td></tr>
<tr><td>Protokoll</td><td>pserver</td></tr>
<tr><td>Server</td><td>www.paraview.org</td></tr>
<tr><td>Folder</td><td>/cvsroot/ParaView3</td></tr>
<tr><td>Username</td><td>anoncvs</td></tr>
<tr><td>Modul</td><td>paraview</td></tr>
</table>
</div>
|}
==Configure ParaView With CMake==
* Always use a <font color="red">'''separate build directory'''</font>. Do not build in the source directory.
{| cellspacing="3"
|- valign="top"
|width="50%" class="MainPageBG" style="border: 1px solid #ffc9c9; color: #000; background-color: #fff3f3"|
<div style="padding: .4em .9em .9em">
===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.
<pre>
mkdir $HOME/projects/ParaView-bin
cd $HOME/projects/ParaView-bin
ccmake $HOME/projects/ParaView3
</pre>
[[Image:Brpv ccmake.png|400px]]
===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 <nowiki><tab></nowiki> key can be used to complete
* To search for a variable press '/' key, and to repeat the search, press the 'n' key.
</div>
|width="50%" class="MainPageBG" style="border: 1px solid #c6c9ff; color: #000; background-color: #f0f0ff"|
<div style="clear: right; text-align: left; float: right; padding: .4em .9em .9em">
===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.
[[Image:Brpv cmakesetup.png|400px]]
===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.
</div>
|}
===ParaView Settings===
{| border="0" cellpadding="4" cellspacing="4"
|-
| bgcolor="#abcdef" height="8" |  '''Variable'''
| 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.
|-
| 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_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_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/Trolltech/Qt-4.2.2/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.
|-
|}
'''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.
===Finish Configuring ParaView===
{| cellspacing="3"
|- valign="top"
|width="50%" class="MainPageBG" style="border: 1px solid #ffc9c9; color: #000; background-color: #fff3f3"|
<div style="padding: .4em .9em .9em">
====Using CCMake====
* Once all configuration options are set, you should be able to just run <nowiki><generate></nowiki> (g key).
</div>
|width="50%" class="MainPageBG" style="border: 1px solid #c6c9ff; color: #000; background-color: #f0f0ff"|
<div style="clear: right; text-align: left; float: right; padding: .4em .9em .9em">
====Using CMakeSetup====
* Once all configuration options are set, you should be able to just run <nowiki><generate></nowiki>, by clicking the "OK" button.
</div>
|}
==Build ParaView==
You can now build ParaView using the appropriate build system.
{| cellspacing="3"
|- valign="top"
|width="50%" class="MainPageBG" style="border: 1px solid #ffc9c9; color: #000; background-color: #fff3f3"|
<div style="padding: .4em .9em .9em">
===Using Make===
CMake will now generate Make files. These makefiles 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 4 processor), you can type:
  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]]
</div>
|width="50%" class="MainPageBG" style="border: 1px solid #c6c9ff; color: #000; background-color: #f0f0ff"|
<div style="clear: right; text-align: left; float: right; padding: .4em .9em .9em">
===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.
The ParaView build does not create the online documentation by default.  Select the '''HTMLDocumentation''' target, right click, and select Build.
[[Image:Brpv visualstudio71.png|400px]]
|}
=Install ParaView=
ParaView can be run directly from the build directory. That said, for production environments, it should be installed in some system location.
{| cellspacing="3"
|- valign="top"
|width="50%" class="MainPageBG" style="border: 1px solid #ffc9c9; color: #000; background-color: #fff3f3"|
<div style="padding: .4em .9em .9em">
====Using Make====
On Unix-like operating systems, the install location is ''/usr'', ''/usr/local'', ''/opt'', or something similar. You can change the install location by changing the '''CMAKE_INSTALL_PREFIX''' cmake variable.
To install ParaView, simply run:
  make install
Make sure to have write access to this location. If you do not, it may be necessary to run install as an administrator. For example, on Unix you would do something like:
<pre>
  su
  <root password>
  make install
</pre>
</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">
====Using Visual Studio====
On Windows, this location is something like ''c:\Program Files\ParaView''.
To install ParaView, simply run ''INSTALL'' target within the build system.
</div>
|}
== Distributing ParaView ==
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.
{| cellspacing="3"
|- valign="top"
|width="50%" class="MainPageBG" style="border: 1px solid #ffc9c9; color: #000; background-color: #fff3f3"|
<div style="padding: .4em .9em .9em">
On Unix-like operating systems
To generate a tar ball, in the binary directory, simply run
  cpack -G TGZ
To generate a RPM, in the binary directory, simply run
  cpack -G RPM
</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
  cpack -G NSIS
</div>
|}
== Notes ==
=== Compiling on the Mac ===
To compile on the Mac, follow the instructions for Unix. The recommended configuration settings are:
VTK_USE_CARBON=ON,
BUILD_SHARED_LIBS=ON,
VTK_USE_RPATH=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. On 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.2.2\bin. For other operating systems, add Qt/4.2.2/lib  to your LD_LIBRARY_PATH environment variable.


{{ParaView/Template/Footer}}
{{ParaView/Template/Footer}}

Latest revision as of 23:43, 19 March 2024

Introduction

This page has been replaced by build documentation in the paraview repository.

To build ParaView complete with all the dependencies it needs and to package it, use the paraview superbuild instructions.




ParaView: [Welcome | Site Map]