* resolve #6762 on ldconfig only available on root PATH * break no backward compatibility on ldconfig PATH * fix indenting * Update configure be silent on error when ldconfig is not detected on PATH
This commit is contained in:
parent
6c4fd8c6b1
commit
6148bd461a
7
configure
vendored
7
configure
vendored
@ -418,7 +418,12 @@ while true; do
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if is_linux; then
|
if is_linux; then
|
||||||
CUDNN_PATH_FROM_LDCONFIG="$(ldconfig -p | sed -n 's/.*libcudnn.so .* => \(.*\)/\1/p')"
|
if ! type ldconfig > /dev/null 2>&1; then
|
||||||
|
LDCONFIG_BIN=/sbin/ldconfig
|
||||||
|
else
|
||||||
|
LDCONFIG_BIN=ldconfig
|
||||||
|
fi
|
||||||
|
CUDNN_PATH_FROM_LDCONFIG="$($LDCONFIG_BIN -p | sed -n 's/.*libcudnn.so .* => \(.*\)/\1/p')"
|
||||||
if [ -e "${CUDNN_PATH_FROM_LDCONFIG}${TF_CUDNN_EXT}" ]; then
|
if [ -e "${CUDNN_PATH_FROM_LDCONFIG}${TF_CUDNN_EXT}" ]; then
|
||||||
export TF_CUDNN_VERSION
|
export TF_CUDNN_VERSION
|
||||||
export CUDNN_INSTALL_PATH="$(dirname ${CUDNN_PATH_FROM_LDCONFIG})"
|
export CUDNN_INSTALL_PATH="$(dirname ${CUDNN_PATH_FROM_LDCONFIG})"
|
||||||
|
Loading…
Reference in New Issue
Block a user