alinaliBQ commented on code in PR #55604:
URL: https://github.com/apache/arrow/pull/55604#discussion_r4593175718
##########
cpp/src/arrow/flight/sql/odbc/odbc_impl/CMakeLists.txt:
##########
@@ -130,38 +130,36 @@ if(WIN32)
win_system_dsn.cc)
endif()
-if(WIN32)
+# On macOS, always link Arrow libraries statically.
+# On Windows and Linux, link Arrow libraries dynamically if the shared
libraries are
+# built, and statically otherwise.
+if(NOT APPLE)
Review Comment:
yup, done
##########
.github/workflows/cpp_extra.yml:
##########
@@ -529,10 +530,21 @@ jobs:
sudo sysctl -w vm.mmap_rnd_bits=28
source ci/scripts/util_enable_core_dumps.sh
archery docker run ubuntu-cpp-odbc
+ - name: Check ODBC Dependency
+ run: |
+ # The ODBC driver should link Arrow libraries dynamically on Linux
+ lib="$(pwd)/build/cpp/release/libarrow_flight_sql_odbc.so"
+ ldd "${lib}"
+ for arrow_lib in libarrow libarrow_compute libarrow_flight
libarrow_flight_sql; do
+ ldd "${lib}" | grep -Fq "${arrow_lib}.so" || {
+ echo "Error: ${arrow_lib} is not dynamically linked to ${lib}"
+ exit 1
+ }
+ done
Review Comment:
ok, removed the check. On a separate note, I will add an ODBC Dependency
check for Windows, because I realize we need verification to ensure Windows
static ODBC.dll doesn't require other Arrow library dependencies (or else the
installed ODBC won't work), this is same type of check we have for macOS ODBC.
--
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]