Child pages
  • ParaView Plugin Development

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Added resoltion to problem building numpy on MacOSX

...

  1. Download SuperBuild via git:
    Code Block
    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
      Code Block
      mkdir ~/ParaView-4.0.1_OSX-10.7
      cd ~/ParaView-4.0.1_OSX-10.7
      
    2. Linux
      Code Block
      mkdir ~/ParaView-4.0.1_Linux-x86_64
      cd ~/ParaView-4.0.1_Linux-x86_64
      
  3. Configure
    Code Block
    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. Wiki Markup
      ENABLE\[boost, diy, freetype, hdf5, libxml2, matplotlib, numpy, paraview, png, python, qhull, qt, szip, zlib\] = ON
    3. Wiki Markup
      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.

...

  • If you get an error building Numpy in Linux:
    Code Block
    /usr/bin/g77 -g -Wall -L/export/data1/schmitt/paraview/opt/ParaView-4.0.1-Linux_x86_64/build/install/lib build/temp.linux-x86_64-2.7/numpy/linalg/lapack_litemodule.o build/temp.linux-x86_64-2.7/numpy/linalg/python_xerbla.o -L/usr/lib64 -L/export/data1/schmitt/paraview/opt/ParaView-4.0.1-Linux_x86_64/build/install/lib -Lbuild/temp.linux-x86_64-2.7 -llapack -lblas -lpython2.7 -lg2c -o build/lib.linux-x86_64-2.7/numpy/linalg/lapack_lite.so
    /usr/lib/gcc/x86_64-redhat-linux/3.4.6/libfrtbegin.a(frtbegin.o): In function `main':
    (.text+0x1e): undefined reference to `MAIN__'
    collect2: ld returned 1 exit status
    error: Command "/usr/bin/g77 -g -Wall -L/export/data1/schmitt/paraview/opt/ParaView-4.0.1-Linux_x86_64/build/install/lib build/temp.linux-x86_64-2.7/numpy/linalg/lapack_litemodule.o build/temp.linux-x86_64-2.7/numpy/linalg/python_xerbla.o -L/usr/lib64 -L/export/data1/schmitt/paraview/opt/ParaView-4.0.1-Linux_x86_64/build/install/lib -Lbuild/temp.linux-x86_64-2.7 -llapack -lblas -lpython2.7 -lg2c -o build/lib.linux-x86_64-2.7/numpy/linalg/lapack_lite.so" failed with exit status 1
    /usr/lib/gcc/x86_64-redhat-linux/3.4.6/libfrtbegin.a(frtbegin.o): In function `main':
    (.text+0x1e): undefined reference to `MAIN__'
    collect2: ld returned 1 exit status
    CMake Error at /export/data1/schmitt/paraview/opt/ParaView-4.0.1-Linux_x86_64/build/pv-numpy-build.cmake:26 (message):
      Failed!!!
    
    
    gmake[2]: *** [numpy/src/numpy-stamp/numpy-build] Error 1
    gmake[1]: *** [CMakeFiles/numpy.dir/all] Error 2
    gmake: *** [all] Error 2
    
    • Solution: According to the Numpy bug tracker, you can fix this by leaving LDFLAGS unset prior to building Numpy.  However, the SuperBuild passes in LDFLAGS to configure Numpy.  The fix is easy:  edit pv-numpy-build.cmake and remove the part that sets LDFLAGS.
  • If you get an error building numpy on MacOSX:
    Code Block
    
    File "numpy/core/setup.py", line 41, in check_types
        out = check_types(*a, **kw)
      File "numpy/core/setup.py", line 271, in check_types
        "Cannot compile 'Python.h'. Perhaps you need to "\
    SystemError: Cannot compile 'Python.h'. Perhaps you need to install python-dev|python-devel.
    CMake Error at /Users/wiltbemj/src/ParaView-4.0.1_OSX-10.7/pv-numpy-build.cmake:26 (message):
      Failed!!!
    
    
    gmake[2]: *** [numpy/src/numpy-stamp/numpy-build] Error 1
    gmake[1]: *** [CMakeFiles/numpy.dir/all] Error 2
    gmake: *** [all] Error 2
    
    • Code Block
      
      Solution:  toggle advanced option on ccmake and update CMAKE_C_FLAGS to be \-I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/usr/include
      
      • Code Block
        
        NB version of SDK must match choice for CMAKE_OSX variables
        
  • When building Qt, you get an error that looks like
    Code Block
     81%] Performing build step for 'qt'
    LD_LIBRARY_PATH = /export/data1/schmitt/paraview/opt/ParaView-4.0.1-Linux_x86_64/build/install/lib:/opt/local/pgi-9.04/linux86-64/9.0/lib:/opt/local/pgi-9.04/linux86-64/9.0/mpi/mpich/lib:/home/schmitt/opt/64/mplayer/lib::/home/schmitt/opt/64/lib:/home/schmitt/opt/64/lib64:/opt/local/pgi-9.04/linux86-64/9.0/lib:/opt/local/pgi-9.04/linux86-64/9.0/mpi/mpich/lib:/home/schmitt/opt/64/mplayer/lib::/home/schmitt/opt/64/lib:/home/schmitt/opt/64/lib64
    /usr/bin/ld: warning: libQtCLucene.so.4, needed by /export/data1/schmitt/paraview/opt/ParaView-4.0.1-Linux_x86_64/build/qt/src/qt-build/lib/libQtHelp.so, not found (try using -rpath or -rpath-link)
    /export/data1/schmitt/paraview/opt/ParaView-4.0.1-Linux_x86_64/build/qt/src/qt-build/lib/libQtHelp.so: undefined reference to `QCLuceneIndexWriter::setMergeFactor(int)'
    ...
    
    • Solution: `find . libQtCLucene.so.4` and then edit pv-qt-build.cmake and append to LD_LIBRARY_PATH and LDFLAGS.

...