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.
This commit is contained in:
parent
ad82cb5621
commit
5ee270a148
1 changed files with 13 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue