raulcd commented on code in PR #51606:
URL: https://github.com/apache/arrow/pull/51606#discussion_r4122043764


##########
cpp/src/parquet/CMakeLists.txt:
##########
@@ -412,12 +412,18 @@ add_parquet_test(arrow-reader-writer-test
                  arrow/arrow_statistics_test.cc
                  arrow/variant_test.cc)
 
-if(ARROW_WITH_OPENTELEMETRY AND NOT ARROW_USE_ASAN)
+if(ARROW_WITH_OPENTELEMETRY)
+  # Use extra include directories and compile definitions for OpenTelemetry
+  # instead of linking otherwise we double link it, libarrow already contains 
it
+  # and ASAN/TSAN fails with double free errors.
   add_parquet_test(arrow-reader-writer-tracing-test
                    SOURCES
                    arrow/arrow_reader_writer_tracing_test.cc
-                   EXTRA_LINK_LIBS
-                   ${ARROW_OPENTELEMETRY_LIBS})
+                   EXTRA_INCLUDES
+                   
$<TARGET_PROPERTY:opentelemetry-cpp::trace,INTERFACE_INCLUDE_DIRECTORIES>
+                   DEFINITIONS
+                   
$<TARGET_PROPERTY:opentelemetry-cpp::trace,INTERFACE_COMPILE_DEFINITIONS>

Review Comment:
   Thanks @kou, I tested locally and it does seem that only linking only 
`opentelemetry-cpp::sdk` solves indeed the ASAN/TSAN issues. I have pushed the 
change.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to