From ad82cb5621820526cf2d32651c063f6b7a2ea255 Mon Sep 17 00:00:00 2001 From: Brian Anderson Date: Thu, 10 Jul 2014 18:16:48 -0700 Subject: [PATCH 1/3] install: Make the LD_LIRARY_PATH warning more aesthetic --- src/etc/install.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/etc/install.sh b/src/etc/install.sh index a89b616edf031..3f40d54de33f8 100644 --- a/src/etc/install.sh +++ b/src/etc/install.sh @@ -489,8 +489,7 @@ then err "${ERR}" else echo - echo " please ensure '${CFG_PREFIX}/lib' is added to ${CFG_LD_PATH_VAR}" - echo + echo " Note: please ensure '${CFG_PREFIX}/lib' is added to ${CFG_LD_PATH_VAR}" fi fi fi From 5ee270a148f95c35b14872fc6497e66c11177ea3 Mon Sep 17 00:00:00 2001 From: Brian Anderson Date: Thu, 10 Jul 2014 18:25:50 -0700 Subject: [PATCH 2/3] install: Run ldconfig when installing on Unix. Closes #15596. If ldconfig fails it emits a warning. This is very possible when installing to a non-system directory, so the warning tries to indicate that it may not be a problem. --- src/etc/install.sh | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/etc/install.sh b/src/etc/install.sh index 3f40d54de33f8..d8cc3d3a3f6a2 100644 --- a/src/etc/install.sh +++ b/src/etc/install.sh @@ -293,9 +293,11 @@ elif [ "$CFG_OSTYPE" = "Darwin" ] then CFG_LD_PATH_VAR=DYLD_LIBRARY_PATH CFG_OLD_LD_PATH_VAR=$DYLD_LIBRARY_PATH + UNIX=1 else CFG_LD_PATH_VAR=LD_LIBRARY_PATH CFG_OLD_LD_PATH_VAR=$LD_LIBRARY_PATH + UNIX=1 fi flag uninstall "only uninstall from the installation prefix" @@ -466,6 +468,17 @@ while read p; do # The manifest lists all files to install done < "${CFG_SRC_DIR}/${CFG_LIBDIR_RELATIVE}/rustlib/manifest.in" +# Run ldconfig to make dynamic libraries available to the linker +if [ $UNIX -eq 1 ] + then + ldconfig + if [ $? -ne 0 ] + then + warn "failed to run ldconfig." + warn "this may happen when not installing as root, in which case you know what you are doing and it's probably fine." + fi +fi + # Sanity check: can we run the installed binaries? # # As with the verification above, make sure the right LD_LIBRARY_PATH-equivalent @@ -494,7 +507,6 @@ then fi fi - echo echo " Rust is ready to roll." echo From 96418569641eecbb5d87a790ce4300658d46fd46 Mon Sep 17 00:00:00 2001 From: Brian Anderson Date: Fri, 11 Jul 2014 17:08:58 -0700 Subject: [PATCH 3/3] Only run ldconfig on Linux --- src/etc/install.sh | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/etc/install.sh b/src/etc/install.sh index d8cc3d3a3f6a2..c949743ea7594 100644 --- a/src/etc/install.sh +++ b/src/etc/install.sh @@ -293,11 +293,9 @@ elif [ "$CFG_OSTYPE" = "Darwin" ] then CFG_LD_PATH_VAR=DYLD_LIBRARY_PATH CFG_OLD_LD_PATH_VAR=$DYLD_LIBRARY_PATH - UNIX=1 else CFG_LD_PATH_VAR=LD_LIBRARY_PATH CFG_OLD_LD_PATH_VAR=$LD_LIBRARY_PATH - UNIX=1 fi flag uninstall "only uninstall from the installation prefix" @@ -469,13 +467,13 @@ while read p; do done < "${CFG_SRC_DIR}/${CFG_LIBDIR_RELATIVE}/rustlib/manifest.in" # Run ldconfig to make dynamic libraries available to the linker -if [ $UNIX -eq 1 ] +if [ "$CFG_OSTYPE" = "Linux" ] then ldconfig if [ $? -ne 0 ] then - warn "failed to run ldconfig." - warn "this may happen when not installing as root, in which case you know what you are doing and it's probably fine." + warn "failed to run ldconfig." + warn "this may happen when not installing as root and may be fine" fi fi