From ee0fa2d0cb8fa1189e6d1c194c03eed79287ecbb Mon Sep 17 00:00:00 2001 From: "Alina (Xi) Li" Date: Thu, 16 Apr 2026 10:28:55 -0700 Subject: [PATCH 1/2] Add debug workflow for ODBC Linux Update cpp_extra.yml --- .github/workflows/cpp_extra.yml | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/.github/workflows/cpp_extra.yml b/.github/workflows/cpp_extra.yml index e5f35fa04e51..8845df955ac1 100644 --- a/.github/workflows/cpp_extra.yml +++ b/.github/workflows/cpp_extra.yml @@ -376,10 +376,16 @@ jobs: matrix: include: - image: ubuntu-cpp-odbc - title: AMD64 Ubuntu + title: AMD64 Ubuntu Release + build-type: release # GH-49582: TODO Enable Debian build for ODBC # - image: debian-cpp-odbc # title: AMD64 Debian + - image: ubuntu-cpp-odbc + title: AMD64 Ubuntu Debug + build-type: debug + run-options: >- + -e ARROW_BUILD_TYPE=DEBUG env: ARCH: amd64 ARCHERY_DEBUG: 1 @@ -402,8 +408,8 @@ jobs: uses: actions/cache@v5 with: path: .docker - key: ${{ matrix.image }}-${{ hashFiles('cpp/**') }} - restore-keys: ${{ matrix.image }}- + key: ${{ matrix.image }}-${{ matrix.build-type }}-${{ hashFiles('cpp/**') }} + restore-keys: ${{ matrix.image }}-${{ matrix.build-type }}- - name: Setup Python on hosted runner uses: actions/setup-python@v6 with: @@ -418,7 +424,7 @@ jobs: # GH-40558: reduce ASLR to avoid ASAN/LSAN crashes sudo sysctl -w vm.mmap_rnd_bits=28 source ci/scripts/util_enable_core_dumps.sh - archery docker run ${{ matrix.image }} + archery docker run ${{ matrix.run-options || '' }} ${{ matrix.image }} - name: Docker Push if: >- success() && From e54000cc35c82af10532a079abb0b998a91b322f Mon Sep 17 00:00:00 2001 From: "Alina (Xi) Li" Date: Tue, 14 Apr 2026 09:15:08 -0700 Subject: [PATCH 2/2] apply static test linkage to ODBC only --- compose.yaml | 2 -- cpp/src/arrow/flight/sql/odbc/tests/CMakeLists.txt | 11 ++++++----- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/compose.yaml b/compose.yaml index 669cabdd9225..a48bf341a369 100644 --- a/compose.yaml +++ b/compose.yaml @@ -571,8 +571,6 @@ services: ARROW_PARQUET: "OFF" ARROW_S3: "OFF" ARROW_SUBSTRAIT: "OFF" - # GH-49651 Link ODBC tests statically on Linux to fix segfault - ARROW_TEST_LINKAGE: "static" # Register ODBC before running tests networks: - odbc_net diff --git a/cpp/src/arrow/flight/sql/odbc/tests/CMakeLists.txt b/cpp/src/arrow/flight/sql/odbc/tests/CMakeLists.txt index a0e8685b63fc..0f45bfd0c811 100644 --- a/cpp/src/arrow/flight/sql/odbc/tests/CMakeLists.txt +++ b/cpp/src/arrow/flight/sql/odbc/tests/CMakeLists.txt @@ -42,13 +42,14 @@ set(ARROW_FLIGHT_SQL_ODBC_TEST_SRCS # GH-46889: move protobuf_test_util to a more common location ../../../../engine/substrait/protobuf_test_util.cc) -# GH-49652: TODO support static test linkage on macOS -if(ARROW_TEST_LINKAGE STREQUAL "static") - set(ARROW_FLIGHT_SQL_ODBC_TEST_LINK_LIBS arrow_flight_sql_odbc_static - ${ARROW_TEST_STATIC_LINK_LIBS}) -else() +# GH-49651 Link ODBC tests statically on Linux and dynamically on macOS/Windows +if(WIN32 OR APPLE) set(ARROW_FLIGHT_SQL_ODBC_TEST_LINK_LIBS arrow_flight_sql_odbc_shared ${ARROW_TEST_SHARED_LINK_LIBS}) +else() + # GH-49651 Link ODBC tests statically on Linux to fix segfault + set(ARROW_FLIGHT_SQL_ODBC_TEST_LINK_LIBS arrow_flight_sql_odbc_static + ${ARROW_TEST_STATIC_LINK_LIBS}) endif() # On macOS, link `ODBCINST` first to ensure iodbc take precedence over unixodbc