Skip to content

Commit 3e28812

Browse files
committed
Fix ODBC Linux test segmentation fault
* Resolve segfault issue on Linux and pass `ARROW_TEST_LINKAGE=static` Pass `ARROW_TEST_LINKAGE=static` * Clean up
1 parent bb4e492 commit 3e28812

2 files changed

Lines changed: 10 additions & 0 deletions

File tree

compose.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -516,6 +516,8 @@ services:
516516
ARROW_PARQUET: "OFF"
517517
ARROW_S3: "OFF"
518518
ARROW_SUBSTRAIT: "OFF"
519+
# GH-49651 Link ODBC tests statically on Linux to fix segfault
520+
ARROW_TEST_LINKAGE: "static"
519521
# Register ODBC before running tests
520522
command: >
521523
/bin/bash -c "

cpp/src/arrow/flight/sql/odbc/tests/CMakeLists.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ set(ARROW_FLIGHT_SQL_ODBC_TEST_SRCS
4242
# GH-46889: move protobuf_test_util to a more common location
4343
../../../../engine/substrait/protobuf_test_util.cc)
4444

45+
# GH-49652: TODO support static test linkage on macOS
4546
if(ARROW_TEST_LINKAGE STREQUAL "static")
4647
set(ARROW_FLIGHT_SQL_ODBC_TEST_LINK_LIBS arrow_flight_sql_odbc_static
4748
${ARROW_TEST_STATIC_LINK_LIBS})
@@ -65,6 +66,13 @@ else()
6566
# Unix
6667
list(APPEND ARROW_FLIGHT_SQL_ODBC_TEST_STATIC_LINK_LIBS
6768
${ARROW_FLIGHT_SQL_ODBC_TEST_LIBS} ${ARROW_FLIGHT_SQL_ODBC_TEST_LINK_LIBS})
69+
70+
if(NOT APPLE)
71+
# Links static dependencies on Linux to support ARROW_TEST_LINKAGE=static
72+
list(APPEND ARROW_FLIGHT_SQL_ODBC_TEST_STATIC_LINK_LIBS arrow_odbc_spi_impl
73+
${ARROW_PROTOBUF_LIBPROTOBUF})
74+
endif()
75+
6876
endif()
6977

7078
add_arrow_test(flight_sql_odbc_test

0 commit comments

Comments
 (0)