Details
-
Improvement
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.6.0
-
None
-
None
-
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
- links to