kszucs commented on a change in pull request #10300:
URL: https://github.com/apache/arrow/pull/10300#discussion_r631820114



##########
File path: dev/tasks/jars/check-shared-dependencies.sh
##########
@@ -23,36 +23,51 @@ CPP_BUILD_DIR=$GITHUB_WORKSPACE/arrow/dist/
 
 if [[ $OS_NAME == "linux" ]]; then
   SO_DEP=ldd
+  
   GANDIVA_LIB="$CPP_BUILD_DIR"libgandiva_jni.so
+  DATASET_LIB="$CPP_BUILD_DIR"libarrow_dataset_jni.so
+  ORC_LIB="$CPP_BUILD_DIR"libarrow_orc_jni.so
+  
   WHITELIST=(linux-vdso libz librt libdl libpthread libstdc++ libm libgcc_s 
libc ld-linux-x86-64)
 else
   SO_DEP="otool -L"
+
   GANDIVA_LIB="$CPP_BUILD_DIR"libgandiva_jni.dylib
-  WHITELIST=(libgandiva_jni libz libncurses libSystem libc++)
+  DATASET_LIB="$CPP_BUILD_DIR"libarrow_dataset_jni.dylib
+  ORC_LIB="$CPP_BUILD_DIR"libarrow_orc_jni.dylib
+
+  WHITELIST=(libgandiva_jni libarrow_orc_jni libarrow_dataset_jni libz 
libncurses libSystem libc++)
 fi
 
-# print the shared library dependencies
-$SO_DEP "$GANDIVA_LIB" | tee dependencies_temp_file.txt 
+LIBRARIES=($GANDIVA_LIB $ORC_LIB $DATASET_LIB)
 
-if [[ $CHECK_SHARED_DEPENDENCIES ]] ; then
-  # exit if any shared library not in whitelisted set is found
-  echo "Checking shared dependencies"
+for library in "${LIBRARIES[@]}"

Review comment:
       Seems like we could convert this to a bash function and call it from the 
macos and linux scripts:
   
   ```
   check_dynamic_dependencies <queried-deps-using-ldd-or-otool> <allowed-ones>
   ```




-- 
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.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to