This is an automated email from the ASF dual-hosted git repository.
kou 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 f2df1b047e9 GH-51632: [C++][CI] Link OpenTelemetry libs for
parquet-arrow-reader-writer-tracing-test depending on System vs Bundled
OpenTelemetry (#51633)
f2df1b047e9 is described below
commit f2df1b047e9fc7bc2d545384cb4064316142cd28
Author: Raúl Cumplido <[email protected]>
AuthorDate: Tue Sep 29 23:49:13 2026 +0200
GH-51632: [C++][CI] Link OpenTelemetry libs for
parquet-arrow-reader-writer-tracing-test depending on System vs Bundled
OpenTelemetry (#51633)
### Rationale for this change
After merging https://github.com/apache/arrow/pull/51606 some debian jobs
that use System opentelemetry were failing with missing symbols.
### What changes are included in this PR?
Change what we link depending on bundled vs system OpenTelemetry.
### Are these changes tested?
Yes all the CI jobs that the previous issue and this new issue had failing
have been exercised and are successful
### Are there any user-facing changes?
No
### Was AI used for this PR?
In accordance to the [AI generation
guidelines](https://arrow.apache.org/docs/dev/developers/overview.html#ai-generated-code),
please disclose below whether and how AI was used in this PR.
**PR code and description written by:**
- [x] Human
- [ ] AI
**Reviewed before submission by:**
- [x] Human
- [ ] AI
- [ ] Not reviewed
* GitHub Issue: #51632
Authored-by: Raúl Cumplido <[email protected]>
Signed-off-by: Sutou Kouhei <[email protected]>
---
cpp/src/parquet/CMakeLists.txt | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/cpp/src/parquet/CMakeLists.txt b/cpp/src/parquet/CMakeLists.txt
index 077946e6cc4..5810317a959 100644
--- a/cpp/src/parquet/CMakeLists.txt
+++ b/cpp/src/parquet/CMakeLists.txt
@@ -413,11 +413,20 @@ add_parquet_test(arrow-reader-writer-test
arrow/variant_test.cc)
if(ARROW_WITH_OPENTELEMETRY)
+ if(opentelemetry-cpp_SOURCE STREQUAL "SYSTEM")
+ # System OpenTelemetry is not bundled with libarrow.
+ # We need to link against it explicitly otherwise we get missing symbols.
+ set(EXTRA_TEST_LINK_LIBS ${ARROW_OPENTELEMETRY_LIBS})
+ else()
+ # Bundled OpenTelemetry is statically linked into libarrow; linking it
+ # again duplicates globals and causes a double free at exit.
+ set(EXTRA_TEST_LINK_LIBS opentelemetry-cpp::sdk)
+ endif()
add_parquet_test(arrow-reader-writer-tracing-test
SOURCES
arrow/arrow_reader_writer_tracing_test.cc
EXTRA_LINK_LIBS
- opentelemetry-cpp::sdk)
+ ${EXTRA_TEST_LINK_LIBS})
endif()
add_parquet_test(arrow-index-test SOURCES arrow/index_test.cc)