infra: Install Xcode/Metal developer tools for .metallib compilation #60

Closed
opened 2026-05-21 01:12:49 +02:00 by sleepy · 0 comments
Owner

The metal and metallib command-line tools are required to compile .metal sources into .metallib at build time, but are not available on this machine.

Current Behavior

  • zig build creates an empty sleepy-llm.metallib (0 bytes)
  • Runtime fails with LibraryLoadFailed when trying to load the empty metallib

Required Tools

  • xcrun metal — compile .metal.air
  • xcrun metallib — link .air.metallib

Installation

Full Xcode from App Store or xcode-select --install (if it includes Metal tools)

Workaround

None — Metal kernels are required for GPU inference.

Verification

After installation:

xcrun -f metal  # should return path
xcrun -f metallib  # should return path
rm -rf zig-out .zig-cache
zig build --release=fast
ls -la zig-out/bin/sleepy-llm.metallib  # should be >0 bytes
The `metal` and `metallib` command-line tools are required to compile `.metal` sources into `.metallib` at build time, but are not available on this machine. ## Current Behavior - `zig build` creates an empty `sleepy-llm.metallib` (0 bytes) - Runtime fails with `LibraryLoadFailed` when trying to load the empty metallib ## Required Tools - `xcrun metal` — compile `.metal` → `.air` - `xcrun metallib` — link `.air` → `.metallib` ## Installation Full Xcode from App Store or `xcode-select --install` (if it includes Metal tools) ## Workaround None — Metal kernels are required for GPU inference. ## Verification After installation: ```bash xcrun -f metal # should return path xcrun -f metallib # should return path rm -rf zig-out .zig-cache zig build --release=fast ls -la zig-out/bin/sleepy-llm.metallib # should be >0 bytes ```
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
sleepy/sleepy-llm#60
No description provided.