This is an automated email from the ASF dual-hosted git repository.

lidavidm pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow.git


The following commit(s) were added to refs/heads/main by this push:
     new d7a02c1aa7 GH-49651: [C++][FlightRPC] Fix ODBC Linux test segmentation 
fault (#49688)
d7a02c1aa7 is described below

commit d7a02c1aa72cf35ee7d848d53dd25d82a451c8d6
Author: Alina (Xi) Li <[email protected]>
AuthorDate: Sun Apr 19 16:35:37 2026 -0700

    GH-49651: [C++][FlightRPC] Fix ODBC Linux test segmentation fault (#49688)
    
    ### Rationale for this change
    GH-49651
    
    ### What changes are included in this PR?
    - On Linux, change to use static test linking for ODBC only
    
    Note: enabling Linux test build will be in a separate PR
    
    ### Are these changes tested?
    Tested on local machine and in our local repository
    
    ### Are there any user-facing changes?
    N/A
    * GitHub Issue: #49651
    
    Lead-authored-by: Alina (Xi) Li <[email protected]>
    Co-authored-by: Alina (Xi) Li <[email protected]>
    Signed-off-by: David Li <[email protected]>
---
 .github/workflows/cpp_extra.yml                    |  2 +-
 cpp/src/arrow/flight/sql/odbc/tests/CMakeLists.txt | 17 +++++++++++++----
 2 files changed, 14 insertions(+), 5 deletions(-)

diff --git a/.github/workflows/cpp_extra.yml b/.github/workflows/cpp_extra.yml
index 58853970fc..c762b7cfcd 100644
--- a/.github/workflows/cpp_extra.yml
+++ b/.github/workflows/cpp_extra.yml
@@ -413,7 +413,7 @@ jobs:
       needs.check-labels.outputs.force == 'true' ||
       contains(fromJSON(needs.check-labels.outputs.ci-extra-labels || '[]'), 
'CI: Extra') ||
       contains(fromJSON(needs.check-labels.outputs.ci-extra-labels || '[]'), 
'CI: Extra: C++')
-    timeout-minutes: 75
+    timeout-minutes: 120
     strategy:
       fail-fast: false
       matrix:
diff --git a/cpp/src/arrow/flight/sql/odbc/tests/CMakeLists.txt 
b/cpp/src/arrow/flight/sql/odbc/tests/CMakeLists.txt
index e0e562f2d2..0f45bfd0c8 100644
--- a/cpp/src/arrow/flight/sql/odbc/tests/CMakeLists.txt
+++ b/cpp/src/arrow/flight/sql/odbc/tests/CMakeLists.txt
@@ -42,12 +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)
 
-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
@@ -65,6 +67,13 @@ else()
   # Unix
   list(APPEND ARROW_FLIGHT_SQL_ODBC_TEST_STATIC_LINK_LIBS
        ${ARROW_FLIGHT_SQL_ODBC_TEST_LIBS} 
${ARROW_FLIGHT_SQL_ODBC_TEST_LINK_LIBS})
+
+  if(NOT APPLE)
+    # Links static dependencies on Linux to support ARROW_TEST_LINKAGE=static
+    list(APPEND ARROW_FLIGHT_SQL_ODBC_TEST_STATIC_LINK_LIBS arrow_odbc_spi_impl
+         ${ARROW_PROTOBUF_LIBPROTOBUF})
+  endif()
+
 endif()
 
 add_arrow_test(flight_sql_odbc_test

Reply via email to