raulcd commented on issue #55357:
URL: https://github.com/apache/arrow/issues/55357#issuecomment-6656868058

   @h-vetinari it seems like homebrew is messing up with some dependencies on 
that job. I've created a [draft 
PR](https://github.com/conda-forge/arrow-cpp-feedstock/pull/2100) adding the 
following commit on top of your PR and CI [was successful for the native OSX 
arm64](https://dev.azure.com/conda-forge/feedstock-builds/_build/results?buildId=1621598&view=logs&j=d6b58996-039f-5e48-56bf-c3a016e5cd7f).
   ```diff
   $ git log -1 -p
   commit a27c32f257e97c8a22e516d77884a7a04648e5f1 (HEAD -> test-aws-arm, 
origin/test-aws-arm)
   Author: Raúl Cumplido <[email protected]>
   Date:   Thu Nov 5 11:27:14 2026 +0100
   
       Test avoiding homebrew messing up CMake searches
   
   diff --git a/recipe/build.sh b/recipe/build.sh
   index b725cc07..2f924e25 100644
   --- a/recipe/build.sh
   +++ b/recipe/build.sh
   @@ -52,6 +52,11 @@ if [[ "${target_platform}" == "linux-aarch64" ]] || [[ 
"${target_platform}" == "
        export CMAKE_BUILD_PARALLEL_LEVEL=3
    fi
    
   +# native osx-arm64 runners have Homebrew in /opt/homebrew, which CMake 
searches by default
   +if [[ "${target_platform}" == "osx-arm64" ]]; then
   +    CMAKE_ARGS="${CMAKE_ARGS} -DCMAKE_IGNORE_PREFIX_PATH=/opt/homebrew"
   +fi
   +
    # IPO produces segfaults in the test suite on macOS x86-64
    if [[ "$target_platform" == "osx-64" ]]; then
        CMAKE_INTERPROCEDURAL_OPTIMIZATION=OFF
   ```
   
   I did use some AI to find what was going on as the logs were clearly not 
helpful.
   
   The original log `-- Providing CMake module for Findlz4Alt as part of Arrow 
CMake package` seems to be the clue as normally we have the following which 
fails to find the config (unless homebrew is present) and uses find_package:
   ```
   -- Checking for module 'liblz4'
   --   Found liblz4, version 1.10.0
   -- Found lz4Alt: $PREFIX/lib/liblz4.dylib
   ```
   
   Apart from those it seems we have an issue were ORC messes up 
`CMAKE_MODULE_PATH` on some cases (i.e. this case were the dependency was from 
homebrew):
   ```diff
   diff --git a/cpp/cmake_modules/FindorcAlt.cmake 
b/cpp/cmake_modules/FindorcAlt.cmake
   index ce8cd11b4c..38c4a76746 100644
   --- a/cpp/cmake_modules/FindorcAlt.cmake
   +++ b/cpp/cmake_modules/FindorcAlt.cmake
   @@ -26,7 +26,13 @@ endif()
    if(orcAlt_FIND_QUIETLY)
      list(APPEND find_package_args QUIET)
    endif()
   +# orcConfig.cmake overwrites CMAKE_MODULE_PATH and doesn't restore it
   +# when one of its dependencies isn't found because find_dependency()
   +# calls return() in the config file.
   +set(orcAlt_CMAKE_MODULE_PATH_KEEP "${CMAKE_MODULE_PATH}")
    find_package(orc ${find_package_args})
   +set(CMAKE_MODULE_PATH "${orcAlt_CMAKE_MODULE_PATH_KEEP}")
   +unset(orcAlt_CMAKE_MODULE_PATH_KEEP)
    if(orc_FOUND)
      set(orcAlt_FOUND TRUE)
      set(orcAlt_VERSION ${orc_VERSION})
   ```
   I've created a follow up commit on that same PR dropping the homebrew fix 
and applying the above were [CMake configure was also 
successful](https://dev.azure.com/conda-forge/feedstock-builds/_build/results?buildId=1621626&view=logs&s=6884a131-87da-5381-61f3-d7acc3b91d76&j=d6b58996-039f-5e48-56bf-c3a016e5cd7f).
   
   I think both fixes should be applied independently.


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