Build fails with Command Line Tools only — Xcode.app should not be required
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 72/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Quiet
- Domain
- build-system
Research direction
Start in build_backend.py, especially _build_c_bindings() and the Xcode checks described around lines 71-131; compare them with the swift build invocation around lines 74-81. Verify the build with Command Line Tools only using pip install and pip install -e ., and confirm that the macOS and Swift requirements still fail appropriately while the supported build succeeds.
Written by the indexing model from the issue text.
Description
Summary
pip install (and pip install -e .) fails on systems that have Command Line Tools installed but not the full Xcode.app. The build backend explicitly rejects Command Line Tools and requires xcodebuild, but the actual build only uses swift build via Swift Package Manager — which works fine with just Command Line Tools.
Environment
- macOS 26.3 (Tahoe), Apple M3 Max
- Swift 6.2.3 (from Command Line Tools)
xcode-select -p→/Library/Developer/CommandLineTools- Xcode.app not installed
Error
Running pip install -e . produces:
SwiftToolingError: The active developer directory is set to Command Line Tools
(/Library/Developer/CommandLineTools), but a full Xcode installation is required.
Please install Xcode. Then open Xcode at least once to accept the license agreement
and install the Swift SDKs.
Root Cause
In build_backend.py, _build_c_bindings() performs three checks that require Xcode.app:
xcode-select -ppath check — rejects if path containsCommandLineToolsxcodebuildexistence check —xcodebuildbinary exists in PATH but fails with:"tool 'xcodebuild' requires Xcode, but active developer directory is a command line tools instance"xcodebuild -versionparse — requires Xcode version >= 26.0
However, the actual compilation (lines 74-81) only uses:
subprocess.run(["swift", "build", "-c", swift_build_config], ...)
This is a pure Swift Package Manager build — it does not invoke xcodebuild at all. The Swift toolchain from Command Line Tools is sufficient.
Workaround
Removing the Xcode checks from build_backend.py (lines 71-131 in the original) allows the build to succeed:
# Replace the xcode-select + xcodebuild checks with just:
# (swift is already checked above)
After this change, pip install -e . completes successfully and the SDK works correctly (text generation, streaming, guided generation, tool calling all verified).
Suggested Fix
Either:
- Remove the Xcode.app requirement entirely, since
swift builddoesn't need it - Make it a warning instead of an error, so users with Command Line Tools can still proceed
- Check for Swift SDK availability directly (e.g.,
swift sdk listor check for the macOS SDK) rather than using Xcode.app as a proxy
The macOS version check and swift executable check should remain — those are genuine requirements.
- Dominant language
- Python
- Stars
- 1.2k
- Forks
- 74
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from apple/python-apple-fm-sdk
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
apple/python-apple-fm-sdk#16 ·
-
apple/python-apple-fm-sdk#5 · 1 comment · 1 assignee ·
All issues in apple/python-apple-fm-sdk
Similar issues
-
triage/confirmed
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
agentscope-ai/agentscope#2775 ·
-
comp/desktop P3 type/bug
Difficulty 1/5 Under an hour Newbie friendliness 92/100
NousResearch/hermes-agent#118866 ·
-
bug
Difficulty 1/5 Under an hour Newbie friendliness 90/100
apache/cloudstack#14222 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100