This is an automated email from the ASF dual-hosted git repository.
adoroszlai pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ozone.git
The following commit(s) were added to refs/heads/master by this push:
new bae32aac3c0 HDDS-16032. cd: lib/native: No such file or directory
(#10909)
bae32aac3c0 is described below
commit bae32aac3c04403790ebd9500aa6728644be987e
Author: Doroszlai, Attila <[email protected]>
AuthorDate: Fri Jul 31 08:27:18 2026 +0200
HDDS-16032. cd: lib/native: No such file or directory (#10909)
---
.../dist/src/shell/ozone/ozone-functions.sh | 50 ++++++++++------------
1 file changed, 23 insertions(+), 27 deletions(-)
diff --git a/hadoop-ozone/dist/src/shell/ozone/ozone-functions.sh
b/hadoop-ozone/dist/src/shell/ozone/ozone-functions.sh
index 3260f677807..c3991e9d1d3 100755
--- a/hadoop-ozone/dist/src/shell/ozone/ozone-functions.sh
+++ b/hadoop-ozone/dist/src/shell/ozone/ozone-functions.sh
@@ -1327,6 +1327,23 @@ function ozone_add_to_classpath_userpath
fi
}
+function ozone_update_native_symlink
+{
+ if [ -z "$TARGET_FILE" ]; then
+ echo "Error: libhadoop doesn't support platform combination ($OS_TYPE /
$ARCH_TYPE)." >&2
+ return 1
+ elif pushd "${OZONE_HOME}/lib/native" > /dev/null 2>&1; then
+ # Check if it already exists but points to the wrong target
+ if [ -L "$LINK_FILE" ] && [ "$(readlink "$LINK_FILE")" != "$TARGET_FILE"
]; then
+ # Forcefully recreate it so it points to the correct target file
+ ln -sf "$TARGET_FILE" "$LINK_FILE" > /dev/null 2>&1
+ fi
+ popd > /dev/null
+ else
+ return 1
+ fi
+}
+
## @description Routine to configure any OS-specific settings.
## @audience public
## @stability stable
@@ -1352,20 +1369,10 @@ function ozone_os_tricks
TARGET_FILE="libhadoop_osx_aarch_64.dylib"
fi
- pushd lib/native > /dev/null
- # If no matching file variant was found for the current environment
- if [ -z "$TARGET_FILE" ]; then
- echo "Error: libhadoop doesn't support platform combination ($OS_TYPE
/ $ARCH_TYPE)." >&2
- else
- LINK_FILE="libhadoop.dylib"
- # Check if it already exists but points to the wrong target
- if [ -L "$LINK_FILE" ] && [ "$(readlink "$LINK_FILE")" !=
"$TARGET_FILE" ]; then
- # Forcefully recreate it so it points to the correct target file
- ln -sf "$TARGET_FILE" "$LINK_FILE" > /dev/null 2>&1
- fi
- export DYLD_LIBRARY_PATH=$OZONE_HOME/lib/native:$DYLD_LIBRARY_PATH
+ LINK_FILE="libhadoop.dylib"
+ if ozone_update_native_symlink; then
+ export DYLD_LIBRARY_PATH="${OZONE_HOME}/lib/native":$DYLD_LIBRARY_PATH
fi
- popd > /dev/null
;;
Linux)
@@ -1381,21 +1388,10 @@ function ozone_os_tricks
TARGET_FILE="libhadoop_linux_x86_64.so"
fi
- pushd . > /dev/null && cd lib/native
- # If no matching file variant was found for the current environment
- if [ -z "$TARGET_FILE" ]; then
- echo "Error: libhadoop doesn't support platform combination ($OS_TYPE
/ $ARCH_TYPE)." >&2
- else
- LINK_FILE="libhadoop.so"
-
- # Check if it already exists but points to the wrong target
- if [ -L "$LINK_FILE" ] && [ "$(readlink "$LINK_FILE")" !=
"$TARGET_FILE" ]; then
- # Forcefully recreate it so it points to the correct target file
- ln -sf "$TARGET_FILE" "$LINK_FILE" > /dev/null 2>&1
- fi
- export LD_LIBRARY_PATH=$OZONE_HOME/lib/native:$LD_LIBRARY_PATH
+ LINK_FILE="libhadoop.so"
+ if ozone_update_native_symlink; then
+ export LD_LIBRARY_PATH="${OZONE_HOME}/lib/native":$LD_LIBRARY_PATH
fi
- popd > /dev/null
;;
CYGWIN*)
# Flag that we're running on Cygwin to trigger path translation later.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]