benibus commented on code in PR #39905:
URL: https://github.com/apache/arrow/pull/39905#discussion_r1619339019


##########
cpp/cmake_modules/ThirdpartyToolchain.cmake:
##########
@@ -4679,9 +4690,16 @@ macro(build_opentelemetry)
                       IMPORTED_LOCATION)
   list(APPEND
        OPENTELEMETRY_CMAKE_ARGS
-       -DWITH_OTLP=ON
        -DWITH_OTLP_HTTP=ON
        -DWITH_OTLP_GRPC=OFF
+       # Disabled because it seemed to cause linking errors. May be worth a 
closer look.
+       -DWITH_FUNC_TESTS=OFF
+       # These options are slated for removal in v1.14 and their features are 
deemed stable
+       # as of v1.13. However, setting their corresponding ENABLE_* macros in 
headers seems
+       # finicky - resulting in build failures or ABI-related runtime errors 
during HTTP

Review Comment:
   Looked into it a bit more. The issue seems to be that the macros do get 
defined for `opentelemetry-cpp`, but they're not exposed to Arrow - which 
results in an ABI mismatch in the affected headers. I'm pretty sure we're 
linking against `opentelemetry_api` just fine because manually defining the 
options in `ThirdPartyToolchain.cmake` (around 
[here](https://github.com/apache/arrow/blob/c45b759d2d8ea34cc53af756873280c0a4bf44ec/cpp/cmake_modules/ThirdpartyToolchain.cmake#L4770))
 solves the issue, e.g:
   ```
   target_compile_definitions(opentelemetry-cpp::api
                              INTERFACE
                              ENABLE_HTTP_SSL_PREVIEW
                              ENABLE_OTLP_HTTP_SSL_PREVIEW
                              ENABLE_HTTP_SSL_TLS_PREVIEW
                              ENABLE_OTLP_HTTP_SSL_TLS_PREVIEW)
   ```
   I haven't found a way to get CMake to automatically pass these options to 
us, though.
   
   Alternatively, we could further bump the version to 1.14 or 1.15 where this 
becomes a nonissue. v.1.15 seems to work interchangeably from what I've tested.



-- 
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