From e6b70998ca7e0b67baeeb34b7b5cc407a75f0523 Mon Sep 17 00:00:00 2001 From: Martyn Gigg Date: Fri, 16 Jan 2015 13:13:54 +0000 Subject: [PATCH] Fix launch script wrapper commands. If eval is used then LD_PRELOAD does not get set. Refs #10912 --- Code/Mantid/Build/CMake/LinuxPackageScripts.cmake | 9 ++++++--- .../Mantid/Build/CMake/Packaging/launch_mantidplot.sh.in | 2 +- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/Code/Mantid/Build/CMake/LinuxPackageScripts.cmake b/Code/Mantid/Build/CMake/LinuxPackageScripts.cmake index 6450735d60ca..b3c39effafcc 100644 --- a/Code/Mantid/Build/CMake/LinuxPackageScripts.cmake +++ b/Code/Mantid/Build/CMake/LinuxPackageScripts.cmake @@ -94,10 +94,12 @@ set ( POST_UNINSTALL_FILE ${CMAKE_CURRENT_BINARY_DIR}/postrm ) if ( "${UNIX_DIST}" MATCHES "RedHatEnterprise" OR "${UNIX_DIST}" MATCHES "^Fedora" ) # RHEL/Fedora if ( "${UNIX_CODENAME}" MATCHES "Santiago" ) # el6 - set ( WRAPPER_COMMAND "scl enable mantidlibs" ) + set ( WRAPPER_PREFIX "scl enable mantidlibs \"" ) + set ( WRAPPER_POSTFIX "\"" ) set ( EXTRA_LDPATH "/usr/lib64/paraview" ) else() - set ( WRAPPER_COMMAND "eval" ) + set ( WRAPPER_PREFIX "" ) + set ( WRAPPER_POSTFIX "" ) endif() if ( NOT MPI_BUILD ) @@ -116,7 +118,8 @@ if ( "${UNIX_DIST}" MATCHES "RedHatEnterprise" OR "${UNIX_DIST}" MATCHES "^Fedor set ( CPACK_RPM_POST_UNINSTALL_SCRIPT_FILE ${POST_UNINSTALL_FILE} ) endif() elseif ( "${UNIX_DIST}" MATCHES "Ubuntu" ) - set ( WRAPPER_COMMAND "eval" ) + set ( WRAPPER_PREFIX "" ) + set ( WRAPPER_POSTFIX "" ) if ( NOT MPI_BUILD ) configure_file ( ${CMAKE_MODULE_PATH}/Packaging/deb/scripts/deb_pre_inst.in diff --git a/Code/Mantid/Build/CMake/Packaging/launch_mantidplot.sh.in b/Code/Mantid/Build/CMake/Packaging/launch_mantidplot.sh.in index 283edbea0940..94ac4695d25a 100644 --- a/Code/Mantid/Build/CMake/Packaging/launch_mantidplot.sh.in +++ b/Code/Mantid/Build/CMake/Packaging/launch_mantidplot.sh.in @@ -21,4 +21,4 @@ else fi # Launch -LD_PRELOAD=${LOCAL_PRELOAD} TCMALLOC_RELEASE_RATE=${TCM_RELEASE} LD_LIBRARY_PATH=${LOCAL_LDPATH} @WRAPPER_COMMAND@ "$INSTALLDIR/@MANTIDPLOT_EXEC@ $*" +LD_PRELOAD=${LOCAL_PRELOAD} TCMALLOC_RELEASE_RATE=${TCM_RELEASE} LD_LIBRARY_PATH=${LOCAL_LDPATH} @WRAPPER_PREFIX@$INSTALLDIR/@MANTIDPLOT_EXEC@ $*@WRAPPER_POSTFIX@