Table of Contents:

ParaView "SuperBuild"

When you wish to deploy a plugin that works with the KitWare release of ParaView, you must build a special version of ParaView:  the Super Build.  

SuperBuild Prerequisites

I typically use the GNU compilers (gcc, g++, gfortran or g77) for everything. You also need a recent copy of cmake. On Mac OS-X systems, you need to install a recent version of XCode.

Building the SuperBuild

Here's a cheat sheet on how to build the SuperBuild.

  1. Download SuperBuild via git:
    git clone git://paraview.org/ParaViewSuperbuild.git
    
    If you'd like to get a specific version (eg. 4.0.1), find the tag identifier via GitWeb. Edit versions.cmake and set GIT_TAG "v4.0.1"
  2. Create a build directory:
    1. Mac OS-X
      mkdir ~/ParaView-4.0.1_OSX-10.7
      cd ~/ParaView-4.0.1_OSX-10.7
      
    2. Linux
      mkdir ~/ParaView-4.0.1_Linux-x86_64
      cd ~/ParaView-4.0.1_Linux-x86_64
      
  3. Configure
    ccmake ../src/ParaViewSuperbuild/ -DENABLE_boost=on -DENABLE_diy=ON -DENABLE_freetype=ON -DENABLE_hdf5=ON -DENABLE_libxml2=ON -DENABLE_matplotlib=ON -DENABLE_numpy=ON -DENABLE_paraview=ON -DENABLE_png=ON -DENABLE_python=ON -DENABLE_qhull=ON -DENABLE_qt=ON -DENABLE_szip=ON -DENABLE_zlib=ON
  4. Once the CMake Curses GUI comes up, set a few common settings:
    1. BUILD_TESTING: ON
    2. ENABLE[boost, diy, freetype, hdf5, libxml2, matplotlib, numpy, paraview, png, python, qhull, qt, szip, zlib] = ON
    3. ENABLE[accusolve, cgns, cosmologytools, ffmpeg, manta, silo, visitbridge, vistrails] = OFF
    4. We recommend USE_SYSTEM_qt and USE_SYSTEM_mpi = OFF
    5. For Mac OS-X, CMAKE_OSX_DEPLOYMENT_TARGET and CMAKE_OSX_SYSROOT should match version of OS-X (Click Apple menu -> About This Mac... Should be 10.7, 10.8, etc.)
  5. Press "g" to Generate build scripts.
  6. Compile with gmake (do not use parallel "gmake -j2"!) . . . and grab a cup of coffee. . . Took 4 hours on 2012 MacBook Pro
  7. For Mac OS-X
    1. ctest to link binary & libraries
    2. cpack -G"DragNDrop" to build distributable binary
    3. Use fixup_plugin.py to fix library paths in plugins.

Debugging problems with the ParaView SuperBuild

LFM Plugin (aka GHOST-kit)

The LFM plugin is distributed with Geospace/Heliosphere Observation & Simulation Tool-kit (GHOST-kit) developed by Josh Murphy & Peter Schmitt.

Prerequisites

The "newCMAKE" branch will automagically download & build all the prerequisites required by GHOST. However, this hasn't been merged to master (similar to trunk in SVN parlance). Until Josh has a stable version, you will need to manually build the following prerequisites for LFM and Enlil plugins:

You only need the static (.a) not dynamic (.so or *.dylib) versions of these libraries! If you only build the dynamic version, then other users might get run-time errors about missing libraries. It's easiest to package everything together with the static libraries.

Download & build the plugin

Here's how you build the plugin:

  1. Obtain source code
    git clone https://github.com/ghost-kit/GHOST.git
    
  2. Setup build directory
    mkdir GHOST/build
    cd GHOST/build
    
  3. Use CMake to Configure. Note you need to pass a variable ParaView_DIR which points to the direcotry containing the file ParaViewConfig.cmake:
    cmake .. -DParaView_DIR=/Users/schmitt/paraview/opt/ParaView-3.98.1_OSX-10.7/paraview/src/paraview-build -DGHOST_BUILD_CDAWEB=OFF
    
  4. If there were no errors, compile the plugin:
    gmake
    
    1. On Mac, build the dist target to fix library locations
      gmake dist
      
      Try running `otool -L lib/libGHOST.dylib` before & after the dist target to see how hard-coded library paths change in the dylib.

Now you should be ready to load the plugin into ParaView.

  1. Start ParaView
  2. Go to Tools -> Manage Plugins
  3. Click "Load..."
  4. Select GHOST/build/libGHOST.dylib
    1. Check the "Always Load" button to use the plugin at startup.

Useful GHOST-kit links