diff --git a/.github/workflows/cpp_extra.yml b/.github/workflows/cpp_extra.yml index 0ec42d69ea0e..fa57ba9b0b95 100644 --- a/.github/workflows/cpp_extra.yml +++ b/.github/workflows/cpp_extra.yml @@ -529,6 +529,22 @@ 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: | + # ODBC dependency should not include other Arrow libraries + ldd "$(pwd)/build/cpp/release/libarrow_flight_sql_odbc.so" + archery linking check-dependencies \ + --disallow libarrow \ + --disallow libarrow_acero \ + --disallow libarrow_compute \ + --disallow libarrow_dataset \ + --disallow libarrow_flight \ + --disallow libarrow_flight_sql \ + --disallow libarrow_substrait \ + --disallow libarrow_testing \ + --disallow libgandiva \ + --disallow libparquet \ + "$(pwd)/build/cpp/release/libarrow_flight_sql_odbc.so" - name: Save Docker Volumes if: ${{ !cancelled() }} continue-on-error: true diff --git a/compose.yaml b/compose.yaml index a3a65c4c2d04..ea114484eb72 100644 --- a/compose.yaml +++ b/compose.yaml @@ -542,11 +542,12 @@ services: depends_on: dremio: condition: service_healthy + # Use `/arrow/build` so build artifacts are visible on the CI host command: > /bin/bash -c " - /arrow/ci/scripts/cpp_build.sh /arrow /build && + /arrow/ci/scripts/cpp_build.sh /arrow /arrow/build && sudo /arrow/cpp/src/arrow/flight/sql/odbc/install/unix/install_odbc.sh /usr/local/lib/libarrow_flight_sql_odbc.so && - /arrow/ci/scripts/cpp_test.sh /arrow /build" + /arrow/ci/scripts/cpp_test.sh /arrow /arrow/build" ubuntu-cpp-minimal: # Arrow build with minimal components/dependencies diff --git a/dev/tasks/linux-packages/apache-arrow/yum/arrow.spec.in b/dev/tasks/linux-packages/apache-arrow/yum/arrow.spec.in index c4a10036ecfe..ffa7a3ad5410 100644 --- a/dev/tasks/linux-packages/apache-arrow/yum/arrow.spec.in +++ b/dev/tasks/linux-packages/apache-arrow/yum/arrow.spec.in @@ -536,7 +536,8 @@ Libraries and header files for Apache Arrow Flight SQL. %package -n %{name}%{so_version}-flight-sql-odbc-libs Summary: C++ library for interacting with SQL databases via ODBC. License: Apache-2.0 -Requires: %{name}%{so_version}-flight-sql-libs = %{version}-%{release} +# GH-55432: ODBC statically links to Arrow Libraries on Linux, +# Arrow library dependency is not required Requires(post): /usr/bin/odbcinst Requires(postun): /usr/bin/odbcinst