This is an automated email from the ASF dual-hosted git repository.
amoeba pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow-cookbook.git
The following commit(s) were added to refs/heads/main by this push:
new 6d9ab30 MINOR: [C++] Prepend CONDA_PREFIX to CMAKE_PREFIX_PATH when
set (#414)
6d9ab30 is described below
commit 6d9ab3092f0d15b94b24f3f0d61054806ad8637a
Author: Bryce Mecum <[email protected]>
AuthorDate: Thu Oct 1 18:48:33 2026 -0700
MINOR: [C++] Prepend CONDA_PREFIX to CMAKE_PREFIX_PATH when set (#414)
CI started failing due to linker errors that looked like mixed up
OpenSSL,
https://github.com/apache/arrow-cookbook/actions/runs/36902765632. I
think this was caused by the compilers>2 bump we've seen elsewhere.
This updates the C++ CMakeLists to prepend CONDA_PREFIX when found so
conda-installed versions are used. I think an alternative fix would have
been to add cmake to the conda prefix.
---
cpp/code/CMakeLists.txt | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/cpp/code/CMakeLists.txt b/cpp/code/CMakeLists.txt
index 118abd0..f5c04ab 100644
--- a/cpp/code/CMakeLists.txt
+++ b/cpp/code/CMakeLists.txt
@@ -23,6 +23,14 @@ if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libstdc++")
endif()
+# Search the active conda environment before system paths. conda-forge's
+# compilers>=2 no longer pulls in the activation package that used to set
+# CMAKE_PREFIX_PATH, so without this a system OpenSSL can be picked up instead
+# of the one conda-forge's libcurl was built against.
+if(DEFINED ENV{CONDA_PREFIX})
+ list(PREPEND CMAKE_PREFIX_PATH "$ENV{CONDA_PREFIX}")
+endif()
+
if(DEFINED ENV{ARROW_NIGHTLY})
set(CMAKE_BUILD_TYPE Debug)
set(ARROW_BUILD_SHARED True)