Uploaded image for project: 'Qpid Dispatch'
  1. Qpid Dispatch
  2. DISPATCH-1321

Set rpath for qpid-proton (and other dependencies) when they are found in nonstandard location

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.6.0
    • Fix Version/s: 1.8.0
    • Component/s: None
    • Labels:
      None
    • Flags:
      Patch

      Description

      Currently, Dispatch has a config.sh helper script which must be sourced when nonstandard installation prefix for dependencies is used, e.g. by compiling Proton with -DCMAKE_INSTALL_PREFIX= and then letting Dispatch find it by -DProton_DIR=. The script currently sets, among other things, the PYTHONPATH and LD_LIBRARY_PATH

      if [[ ! -f config.sh ]]; then
          echo "You must source config.sh from within its own directory"
          return
      fi
      
      export SOURCE_DIR=$(pwd)
      export BUILD_DIR=$SOURCE_DIR/${1:-build}
      export INSTALL_DIR=$SOURCE_DIR/${2:-install}
      
      PYTHON_BIN=`type -P python || type -P python3`
      PYTHON_LIB=$(${PYTHON_BIN} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(prefix='$INSTALL_DIR'))")
      
      export LD_LIBRARY_PATH=$INSTALL_DIR/lib64:$INSTALL_DIR/lib:$LD_LIBRARY_PATH
      export PYTHONPATH=$PYTHON_LIB:$PYTHONPATH
      export PATH=$INSTALL_DIR/sbin:$INSTALL_DIR/bin:$SOURCE_DIR/bin:$PATH

      I don't know if anything can be done about PYTHONPATH (I guess something can be programmed in CMakeLists.txt, which knows where Proton is, and where Python is), but there is easy fix for LD_LIBRARY_PATH, which is to set

      set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                jdanek Jiri Daněk
                Reporter:
                jdanek Jiri Daněk
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: