Summary
builder/unix.py checks out SDL release-2.30.2 during unix/macOS builds:
cmd_ = ['cd lib/SDL && git checkout release-2.30.2']
SDL 2.30.2 no longer compiles on macOS with current Xcode Command Line Tools (the macOS 26 SDK toolchain):
src/video/cocoa/SDL_cocoawindow.m:938:14: error: receiver type 'SDLOpenGLContext'
for instance message is a forward declaration
[context movedToNewScreen];
Cause
The SDL build here uses SDL_OPENGL=OFF. With OpenGL off, SDLOpenGLContext's @interface (guarded by SDL_VIDEO_OPENGL_CGL in SDL_cocoaopengl.h) is never compiled — only the @class forward declaration in SDL_cocoawindow.h — while windowDidChangeScreen: messages the class unguarded. Older clang emitted a warning for messaging a forward-declared class; the current CLT promotes it to a hard error. So macOS builds work until the developer updates Command Line Tools, then break.
Fix
Upstream SDL fixed this on the SDL2 maintenance line in libsdl-org/SDL@0b6eff41 ("Fixed building on macOS with OpenGL disabled"), first shipped in 2.32.0; the 2.30.x branch never received the backport. Bumping the builder's checkout to a 2.32.x tag fixes it, e.g.:
cmd_ = [
'cd lib/SDL && git checkout release-2.32.8 2>/dev/null '
'|| (git fetch --tags && git checkout release-2.32.8)'
]
(The fetch fallback covers existing clones that predate the tag.)
Verified on macOS with the 26.5 SDK: 2.30.2 fails with the error above; 2.32.8 compiles cleanly and the resulting binary runs normally. Happy to open a PR if useful.
🤖 Generated with Claude Code
Summary
builder/unix.pychecks out SDLrelease-2.30.2during unix/macOS builds:SDL 2.30.2 no longer compiles on macOS with current Xcode Command Line Tools (the macOS 26 SDK toolchain):
Cause
The SDL build here uses
SDL_OPENGL=OFF. With OpenGL off,SDLOpenGLContext's@interface(guarded bySDL_VIDEO_OPENGL_CGLinSDL_cocoaopengl.h) is never compiled — only the@classforward declaration inSDL_cocoawindow.h— whilewindowDidChangeScreen:messages the class unguarded. Older clang emitted a warning for messaging a forward-declared class; the current CLT promotes it to a hard error. So macOS builds work until the developer updates Command Line Tools, then break.Fix
Upstream SDL fixed this on the SDL2 maintenance line in libsdl-org/SDL@0b6eff41 ("Fixed building on macOS with OpenGL disabled"), first shipped in 2.32.0; the 2.30.x branch never received the backport. Bumping the builder's checkout to a 2.32.x tag fixes it, e.g.:
(The fetch fallback covers existing clones that predate the tag.)
Verified on macOS with the 26.5 SDK: 2.30.2 fails with the error above; 2.32.8 compiles cleanly and the resulting binary runs normally. Happy to open a PR if useful.
🤖 Generated with Claude Code