yandrey321 commented on code in PR #10513:
URL: https://github.com/apache/ozone/pull/10513#discussion_r3597932195
##########
hadoop-ozone/dist/src/shell/ozone/ozone-functions.sh:
##########
@@ -1348,6 +1349,25 @@ function ozone_os_tricks
export JAVA_HOME
fi
fi
+
+ if [ "$ARCH_TYPE" = "arm64" ]; then
+ TARGET_FILE="libhadoop_osx_aarch_64.dylib"
+ 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.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
Review Comment:
would this export be effective to the current build/test execution process?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]