Skip to content

Document macOS Xcode/SDK toolchain mismatch during CMake configure #6

Closed

Description

@DanNoby

Area

Other

What happened, and what did you expect?

Commit: [adf5632]
macOS version: [e.g. 27.0.1]
Mac: [MacBook Air M2]
Displays: [built-in Retina and external display]
Input: [trackpad & mouse]
Keyboard layout: [e.g. U.S.]
Tools: [clang-1700.0.13.5, cmake version 4.4.5,
Python 3.12.16 , cargo 1.100.0-nightly (495c385d0 2026-09-16)]

Build: OK
ctest: 17/17 passed

Checklist (section 5): All tests have been done. Works as expected!

Build issue encountered:

  • What I did: Ran the documented CMake command using the default /usr/bin/cc.

  • Expected: CMake configuration to succeed.

  • Happened: Configuration failed during the compiler test with:

    ld: tapi error: malformed file
    error: unknown architecture arm64e.x1-macos

    The system reported AppleClang 17 while using MacOSX27.0.sdk.

Workaround:

  • Selected the complete Xcode developer toolchain:

    sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer

  • Deleted the existing CMake build directory:

    rm -rf build

  • Reconfigured and rebuilt the project.

Result:

  • Build succeeded.
  • All 17 tests passed.
  • No BUI source changes were required.

Suggestion:
The macOS prerequisites currently mention Xcode Command Line Tools. Consider documenting that an older Command Line Tools compiler/linker can fail with a newer macOS SDK, and recommending the full Xcode toolchain plus deleting build/ before reconfiguring.

Minimal code to reproduce

cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DBUI_BUILD_EXAMPLES=ON \
  -DPython3_EXECUTABLE="$(which python3.12)"

Environment

  • macOS on Apple Silicon (arm64) - AppleClang 17.0.0.17000013 - CMake installed via Homebrew (/opt/homebrew/bin/cmake) - Python 3.12 - Command Line Tools SDK: MacOSX27.0.sdk - BUI repository main - Initial configure failed with the default /usr/bin/cc; selecting /Applications/Xcode.app/Contents/Developer made the build and all 17 tests pass EOF GraphQL: Resource not accessible by integration (createIssue) <shellId: 14 completed with exit code 1>

Activity

  1. added
    bug
    on Nov 6, 2026
  2. ppmpreetham commented on Nov 6, 2026

    @ppmpreetham
    Owner

    Thanks for the log.
    The duplicate Objective-C class warning came from buipy and _buiimgui each linking the whole kit, Cocoa host included.
    On main, Dear ImGui is now built into buipy, so there is only one copy of the kit and no separate _buiimgui binary.

    When you can, rebuild from main on your Mac and run ctest -R buipy_imgui -V.

    Please tell us whether the objc: Class BUIKitView is implemented in both lines are gone, and whether the new macOS-only class check (test_cocoa_classes_come_from_buipy) runs and passes.

    ls build/bindings/python should show only buipy*.so.

  3. DanNoby commented on Nov 6, 2026

    @DanNoby
    Author

    Attached the log. All tests have passed
    log.txt

  4. ppmpreetham commented on Nov 7, 2026

    @ppmpreetham
    Owner

    Looking into this!

  5. ppmpreetham commented on Nov 8, 2026

    @ppmpreetham
    Owner

    The Objective-C bug was fixed from the logs.
    Thank you very much!

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions