Skip to content

[bug] macos arm64 (macos-14) with py 3.13 is having ld require architecture x86_64 but configured to arm64 #18064

Closed
@pechersky

Description

@pechersky

Describe the bug

I have a Github workflow that builds rdkit wheels on linux and mac, x86 and arm64, and python versions 3.9 to 3.13. It runs on all fine except for macos-14 arm64 python 3.13.

The cibuildwheel run fails at the repair step, but already during the C++ build, one sees worrisome lines like

    [ 34%] Linking CXX shared library ../../lib/libRDKitRDBoost.dylib
    ld: warning: ignoring file '/Users/runner/work/rdkit-pypi/rdkit-pypi/build/temp.macosx-11.0-arm64-cpython-313/rdkit/build/Code/RDBoost/CMakeFiles/RDBoost.dir/Wrap.cpp.o': found architecture 'arm64', required architecture 'x86_64'
    ld: warning: ignoring file '/Users/runner/.conan2/p/b/boost297312143d5bd/p/lib/libboost_log_setup.dylib': found architecture 'arm64', required architecture 'x86_64'

I'm concerned that somehow, conan is supplying x86_64 libs instead of arm64. The conan detected profiles are

    Detected profile:
    [settings]
    arch=armv8
    build_type=Release
    compiler=apple-clang
    compiler.cppstd=gnu17
    compiler.libcxx=libc++
    compiler.version=15
    os=Macos
  
    WARN: This profile is a guess of your environment, please check it.
    WARN: Defaulted to cppstd='gnu17' for apple-clang.
    WARN: The output of this command is not guaranteed to be stable and can change in future Conan versions.
    WARN: Use your own profile files for stability.
    Saving detected profile to /Users/runner/.conan2/profiles/default
  
    ======== Input profiles ========
    Profile host:
    [settings]
    arch=armv8
    build_type=Release
    compiler=apple-clang
    compiler.cppstd=gnu17
    compiler.libcxx=libc++
    compiler.version=15
    os=Macos
  
    Profile build:
    [settings]
    arch=armv8
    build_type=Release
    compiler=apple-clang
    compiler.cppstd=gnu17
    compiler.libcxx=libc++
    compiler.version=15
    os=Macos

The cmake command is

    ['cmake -S . -B build -DCMAKE_TOOLCHAIN_FILE=/Users/runner/work/rdkit-pypi/rdkit-pypi/conan/conan_toolchain.cmake -DCMAKE_POLICY_DEFAULT_CMP0091=NEW -DBoost_LIB_VERSION=1_85 -DPython3_EXECUTABLE=/private/var/folders/qn/7t0vq3ts721cmgt0tgrtgzl80000gn/T/cibw-run-a83a2axg/cp313-macosx_arm64/build/venv/bin/python -DRDK_BUILD_INCHI_SUPPORT=ON -DRDK_BUILD_AVALON_SUPPORT=ON -DRDK_BUILD_PYTHON_WRAPPERS=ON -DRDK_BOOST_PYTHON3_NAME=python -DRDK_BUILD_YAEHMOP_SUPPORT=ON -DRDK_BUILD_XYZ2MOL_SUPPORT=ON -DRDK_INSTALL_INTREE=OFF -DRDK_BUILD_CAIRO_SUPPORT=ON -DRDK_BUILD_FREESASA_SUPPORT=ON -DBoost_NO_SYSTEM_PATHS=ON -DCMAKE_INSTALL_PREFIX=/Users/runner/work/rdkit-pypi/rdkit-pypi/build/temp.macosx-11.0-arm64-cpython-313/rdkit_install -DCMAKE_BUILD_TYPE=Release -DRDK_BUILD_CPP_TESTS=OFF -DCMAKE_C_FLAGS=-Wno-implicit-function-declaration -DCMAKE_CXX_FLAGS="-Wno-implicit-function-declaration -DCATCH_CONFIG_NO_CPP17_UNCAUGHT_EXCEPTIONS" -DRDK_OPTIMIZE_POPCNT=OFF -DFREETYPE_LIBRARY=/opt/homebrew/lib/libfreetype.dylib -DFREETYPE_INCLUDE_DIRS=/opt/homebrew/include -DCMAKE_OSX_ARCHITECTURES=arm64 -DCMAKE_OSX_DEPLOYMENT_TARGET=14.0 ', 'cmake --build build --config Release', 'cmake --install build']

The delocate failure is

  Traceback (most recent call last):
    File "/private/var/folders/qn/7t0vq3ts721cmgt0tgrtgzl80000gn/T/cibw-run-a83a2axg/cp313-macosx_arm64/build/venv/bin/delocate-wheel", line 8, in <module>
      sys.exit(main())
               ~~~~^^
    File "/private/var/folders/qn/7t0vq3ts721cmgt0tgrtgzl80000gn/T/cibw-run-a83a2axg/cp313-macosx_arm64/build/venv/lib/python3.13/site-packages/delocate/cmd/delocate_wheel.py", line 115, in main
      copied = delocate_wheel(
          wheel,
      ...<4 lines>...
          **delocate_values(args),
      )
    File "/private/var/folders/qn/7t0vq3ts721cmgt0tgrtgzl80000gn/T/cibw-run-a83a2axg/cp313-macosx_arm64/build/venv/lib/python3.13/site-packages/delocate/delocating.py", line 1094, in delocate_wheel
      raise DelocationError(
      ...<2 lines>...
      )
  delocate.libsana.DelocationError: Some missing architectures in wheel
  /usr/local/lib/libRDKitRDBoost.1.dylib needs arch x86_64 missing from /Users/runner/.conan2/p/b/boost297312143d5bd/p/lib/libboost_atomic.dylib
  /usr/local/lib/libRDKitRDBoost.1.dylib needs arch x86_64 missing from /Users/runner/.conan2/p/b/boost297312143d5bd/p/lib/libboost_charconv.dylib
  /usr/local/lib/libRDKitRDBoost.1.dylib needs arch x86_64 missing from /Users/runner/.conan2/p/b/boost297312143d5bd/p/lib/libboost_chrono.dylib
[...]

CI logs:
logs_36596700182.zip

Related issues:
pypa/cibuildwheel#2345
matthew-brett/delocate#250

How to reproduce it

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions