h-vetinari opened a new issue, #44982:
URL: https://github.com/apache/arrow/issues/44982

   ### Describe the enhancement requested
   
   I've been wanting to add opentelemetry 
[support](https://github.com/conda-forge/arrow-cpp-feedstock/pull/1048) in 
conda-forge for a long time, but given the amount of mutation that happens in 
packaging there, I wasn't comfortable in doing that before landing 
https://github.com/conda-forge/arrow-cpp-feedstock/pull/1058.
   
   Now that this is in, I've rebased the PR, but am running into problems 
pretty quickly. For one, arrow hardcodes
   
https://github.com/apache/arrow/blob/8428c47b6dc4d46d1d3839cd82d2bd39f5544a67/cpp/cmake_modules/ThirdpartyToolchain.cmake#L4974
   even if the config explicitly asks for 
`-Dopentelemetry-cpp_SOURCE="SYSTEM"`. With the following patch
   
   ```diff
   diff --git a/cpp/cmake_modules/ThirdpartyToolchain.cmake 
b/cpp/cmake_modules/ThirdpartyToolchain.cmake
   index 0b215b5b2..b9cc05953 100644
   --- a/cpp/cmake_modules/ThirdpartyToolchain.cmake
   +++ b/cpp/cmake_modules/ThirdpartyToolchain.cmake
   @@ -4977,7 +4977,6 @@ if(ARROW_WITH_OPENTELEMETRY)
      # cURL is required whether we build from source or use an existing 
installation
      # (OTel's cmake files do not call find_curl for you)
      find_curl()
   -  set(opentelemetry-cpp_SOURCE "AUTO")
      resolve_dependency(opentelemetry-cpp)
      set(ARROW_OPENTELEMETRY_LIBS
          opentelemetry-cpp::trace
   ```
   
   I then run into further problems in `ThirdpartyToolchain.cmake`
   ```
   CMake Error at cmake_modules/ThirdpartyToolchain.cmake:313 (find_package):
     By not providing "Findopentelemetry-cpp.cmake" in CMAKE_MODULE_PATH this
     project has asked CMake to find a package configuration file provided by
     "opentelemetry-cpp", but CMake did not find one.
   
     Could not find a package configuration file provided by "opentelemetry-cpp"
     with any of the following names:
   
       opentelemetry-cppConfig.cmake
       opentelemetry-cpp-config.cmake
   
     Add the installation prefix of "opentelemetry-cpp" to CMAKE_PREFIX_PATH or
     set "opentelemetry-cpp_DIR" to a directory containing one of the above
     files.  If "opentelemetry-cpp" provides a separate development package or
     SDK, be sure it has been installed.
   Call Stack (most recent call first):
     cmake_modules/ThirdpartyToolchain.cmake:4980 (resolve_dependency)
     CMakeLists.txt:546 (include)
   ```
   despite the fact that our otel packages 
[clearly](https://conda-metadata-app.streamlit.app/?q=conda-forge%2Flinux-64%2Flibopentelemetry-cpp-1.18.0-h5f02ccb_0.conda)
 contain the CMake metadata.
   
   CC @lidavidm @kou
   
   ### Component(s)
   
   C++, Packaging


-- 
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: issues-unsubscr...@arrow.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to