Skip to content

[C++] AWS SDK not found for osx-arm #55357

Open

Description

@h-vetinari

Describe the bug, including details regarding any error messages, version, and platform.

Not sure what changed, but in conda-forge/arrow-cpp-feedstock#2062, osx-arm64 builds (which we still have to cross-compile due to #50143) are failing to find aws with

update: I hadn't noticed that the bot had already switched to native builds in conda-forge/arrow-cpp-feedstock@4d5ff10; so the issue is not in cross-compiled builds, but in native osx-arm builds

CMake Error at cmake_modules/ThirdpartyToolchain.cmake:316 (find_package):
  By not providing "FindAWSSDKAlt.cmake" in CMAKE_MODULE_PATH this project
  has asked CMake to find a package configuration file provided by
  "AWSSDKAlt", but CMake did not find one.

  Could not find a package configuration file provided by "AWSSDKAlt"
  (requested version 1.11.0) with any of the following names:

    AWSSDKAlt.cps
    awssdkalt.cps
    AWSSDKAltConfig.cmake
    awssdkalt-config.cmake

  Add the installation prefix of "AWSSDKAlt" to CMAKE_PREFIX_PATH or set
  "AWSSDKAlt_DIR" to a directory containing one of the above files.  If
  "AWSSDKAlt" provides a separate development package or SDK, be sure it has
  been installed.
Call Stack (most recent call first):
  cmake_modules/ThirdpartyToolchain.cmake:4348 (resolve_dependency)
  CMakeLists.txt:542 (include)

Other platforms (including osx-64 natively, as well as the cross-compiled linux-ppc64le) have no problems finding the SDK.

Unlikely to be the cause, but while I'm at it, lz4 (as part of finding orc) is also not found on osx-arm64, though it's certainly present in the host environment, and found without issue on the other platforms

-- LZ4_HOME: 
-- Could not find LZ4 in system search paths.
CMake Warning at cmake_modules/FindorcAlt.cmake:29 (find_package):
  Found package configuration file:

    /Users/runner/miniforge3/conda-bld/apache-arrow_1793511839767/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placeh/lib/cmake/orc/orcConfig.cmake

  but it set orc_FOUND to FALSE so package "orc" is considered to be NOT
  FOUND.  Reason given by package:

  orc could not be found because dependency LZ4Alt could not be found.

Call Stack (most recent call first):
  cmake_modules/ThirdpartyToolchain.cmake:316 (find_package)
  cmake_modules/ThirdpartyToolchain.cmake:4149 (resolve_dependency)
  CMakeLists.txt:542 (include)


-- Found orcAlt: $PREFIX/lib/liborc.dylib (found version "2.3.1")

CC @raulcd, since you recently touched the affected portions of cpp/cmake_modules/ThirdpartyToolchain.cmake in 275b44b

Component(s)

C++

Activity

  1. changed the title [-][C++] newer AWS SDK not found in cross-compilation anymore.[/-] [+][C++] newer AWS SDK not found for osx-arm anymore[/+] on Nov 1, 2026
  2. changed the title [-][C++] newer AWS SDK not found for osx-arm anymore[/-] [+][C++] AWS SDK not found for osx-arm[/+] on Nov 1, 2026
  3. h-vetinari commented on Nov 1, 2026

    @h-vetinari
    ContributorAuthor

    I've rebased conda-forge/arrow-cpp-feedstock#2007; the failure is now easily observable there

  4. h-vetinari commented on Nov 4, 2026

    @h-vetinari
    ContributorAuthor

    CC @raulcd @kou The ThirdParty CMake code here is a maze. Please help fix this, it's making feedstock maintenance a real burden (because every migrator wants to switch to native builds for osx-arm64, now that sufficient agents are generally available)

  5. raulcd commented on Nov 5, 2026

    @raulcd
    Member

    @h-vetinari it seems like homebrew is messing up with some dependencies on that job. I've created a draft PR adding the following commit on top of your PR and CI was successful for the native OSX arm64.

    $ git log -1 -p
    commit a27c32f257e97c8a22e516d77884a7a04648e5f1 (HEAD -> test-aws-arm, origin/test-aws-arm)
    Author: Raúl Cumplido <raulcd@apache.org>
    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 --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.

    I think both fixes should be applied independently.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions