MantisBT - ParaView
View Issue Details
0010685ParaViewBugpublic2010-05-06 15:492010-08-30 15:09
Eric Monson 
David Partyka 
normalminoralways
closedwon't fix 
MacOS X
Development 
3.8.1 
0010685: PV build errors on OS X with VTK_USE_RPATH: OFF
Mike Jackson described the problem (http://www.mail-archive.com/paraview@paraview.org/msg07520.html [^]) when trying to build PV on OS X when VTK_USE_RPATH = OFF:

Checkout/updated from CVS this afternoon and a fresh configure and compile I get the following error on OS X 10.5.8:

[ 23%] Generating vtkSocketCommunicatorHash.h
dyld: Library not loaded: libvtksys.pv3.8.dylib
 Referenced from: /Users/Shared/Kitware-CVS/ParaView3/Build/VTK/Parallel/../../bin/vtkHashSource
 Reason: image not found
/bin/sh: line 1: 19254 Trace/BPT trap ../../bin/vtkHashSource /Users/Shared/Kitware-CVS/ParaView3/VTK/Parallel/vtkSocketCommunicator.cxx vtkSocketCommunicatorHash vtkSocketCommunicatorHash.h
make[2]: *** [VTK/Parallel/vtkSocketCommunicatorHash.h] Error 133
make[1]: *** [VTK/Parallel/CMakeFiles/vtkParallel.dir/all] Error 2
make: *** [all] Error 2

The issue is that the libraries do not have a full install_name on them which forces me to remember to "export DYLD_LIBRARY_PATH=`pwd`/bin" from the build folder. Can this be added to the CMake custom command for OS X? I seem to hit this error every time I do a fresh configure.
Mike proposed this change to VTK\Parallel\CMakeLists.txt that works for me, too:

# Generate "vtkSocketCommunicatorHash.h".
if (APPLE AND NOT VTK_USE_RPATH)
    file(WRITE ${ParaView_BINARY_DIR}/bin/vtkHashSource.sh "#!/bin/sh\n" )
    file(APPEND ${ParaView_BINARY_DIR}/bin/vtkHashSource.sh "export DYLD_LIBRARY_PATH=${ParaView_BINARY_DIR}/bin\n" )
    file(APPEND ${ParaView_BINARY_DIR}/bin/vtkHashSource.sh "cd ${ParaView_BINARY_DIR}/bin\n" )
    file(APPEND ${ParaView_BINARY_DIR}/bin/vtkHashSource.sh "./vtkHashSource ${VTK_SOURCE_DIR}/Parallel/vtkSocketCommunicator.cxx vtkSocketCommunicatorHash ${VTK_BINARY_DIR}/Parallel/vtkSocketCommunicatorHash.h\n")
    ADD_CUSTOM_COMMAND(
        OUTPUT ${VTK_BINARY_DIR}/Parallel/vtkSocketCommunicatorHash.h
      DEPENDS ${ParaView_BINARY_DIR}/bin/vtkHashSource.sh ${VTK_SOURCE_DIR}/Parallel/vtkSocketCommunicator.cxx
              vtkHashSource
      COMMAND /bin/chmod ugo+rx ${ParaView_BINARY_DIR}/bin/vtkHashSource.sh
      COMMAND ${ParaView_BINARY_DIR}/bin/vtkHashSource.sh)
else()
    ADD_CUSTOM_COMMAND(
      OUTPUT ${VTK_BINARY_DIR}/Parallel/vtkSocketCommunicatorHash.h
      DEPENDS ${VTK_SOURCE_DIR}/Parallel/vtkSocketCommunicator.cxx
              vtkHashSource
      COMMAND vtkHashSource
        ${VTK_SOURCE_DIR}/Parallel/vtkSocketCommunicator.cxx
        vtkSocketCommunicatorHash vtkSocketCommunicatorHash.h
      )
endif()
No tags attached.
Issue History
2010-05-06 15:49Eric MonsonNew Issue
2010-05-06 15:53David PartykaStatusbacklog => tabled
2010-05-06 15:53David PartykaAssigned To => David Partyka
2010-08-05 13:38Utkarsh AyachitNote Added: 0021667
2010-08-05 13:38Utkarsh AyachitStatustabled => @80@
2010-08-05 13:38Utkarsh AyachitFixed in Version => 3.8.1
2010-08-05 13:38Utkarsh AyachitResolutionopen => won't fix
2010-08-30 15:09Alan ScottNote Added: 0022005
2010-08-30 15:09Alan ScottStatus@80@ => closed

Notes
(0021667)
Utkarsh Ayachit   
2010-08-05 13:38   
Not an issue anymore. With ParaView 3.8.1 turning VTK_USE_RPATH OFF has been totally removed. "make install" as well as "cpack" ensure that the rpaths are stripped off correctly so we don't need to turn rpath OFF during building at all.
(0022005)
Alan Scott   
2010-08-30 15:09   
Closed as per Utkarsh's comment.