Skip to content

Commit 8a2b7a5

Browse files
committed
auto merge of #15597 : brson/rust/ldconfig, r=pcwalton
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.
2 parents 5ad7286 + 9641856 commit 8a2b7a5

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

Diff for: src/etc/install.sh

+12-3
Original file line numberDiff line numberDiff line change
@@ -466,6 +466,17 @@ while read p; do
466466
# The manifest lists all files to install
467467
done < "${CFG_SRC_DIR}/${CFG_LIBDIR_RELATIVE}/rustlib/manifest.in"
468468

469+
# Run ldconfig to make dynamic libraries available to the linker
470+
if [ "$CFG_OSTYPE" = "Linux" ]
471+
then
472+
ldconfig
473+
if [ $? -ne 0 ]
474+
then
475+
warn "failed to run ldconfig."
476+
warn "this may happen when not installing as root and may be fine"
477+
fi
478+
fi
479+
469480
# Sanity check: can we run the installed binaries?
470481
#
471482
# As with the verification above, make sure the right LD_LIBRARY_PATH-equivalent
@@ -489,13 +500,11 @@ then
489500
err "${ERR}"
490501
else
491502
echo
492-
echo " please ensure '${CFG_PREFIX}/lib' is added to ${CFG_LD_PATH_VAR}"
493-
echo
503+
echo " Note: please ensure '${CFG_PREFIX}/lib' is added to ${CFG_LD_PATH_VAR}"
494504
fi
495505
fi
496506
fi
497507

498-
499508
echo
500509
echo " Rust is ready to roll."
501510
echo

0 commit comments

Comments
 (0)