Skip to content

Fix macOS 26 build: SDK detection + zlib update#5

Merged
Raltyro merged 2 commits intoCodenameCrew:oldfrom
bob-jones-cs:fix/macos-26-sdk-and-zlib
Mar 2, 2026
Merged

Fix macOS 26 build: SDK detection + zlib update#5
Raltyro merged 2 commits intoCodenameCrew:oldfrom
bob-jones-cs:fix/macos-26-sdk-and-zlib

Conversation

@bob-jones-cs
Copy link

@bob-jones-cs bob-jones-cs commented Mar 2, 2026

Cherry-picks two fixes from master into the old branch, which are needed to build with the macOS 26 (Tahoe) SDK:

  1. ceb69140: Fixes issue in which SDK detection picks macosx26 over macosx26.2 because split_best[1] is null for single-component versions, making the > comparison always false. xcrun --sdk macosx26 then fails.

  2. 9004211e: zlib 1.2.13 zutil.h redefines fdopen to NULL, which conflicts with the macOS 26.2 SDK headers. Upgrading to 1.3.1 fixes this.

Tested locally, project builds cleanly after both cherry-picks.

joshtynjala and others added 2 commits March 1, 2026 21:37
My SDKs directory contains three entries:

MacOSX.sdk
MacOSX26.0.sdk
MacOSX26.sdk

The current SDK version detection in hxcpp is preferring MacOSX26.sdk over MacOSX26.0.sdk. This is causing MACOSX_VER to be set to 26. However, xcodebuild seems to want both major and minor parts of the version to be specified, so MACOSX_VER should be set to 26.0 instead.

This change checks if the current best's minor version is parsed as NaN when the major versions match, which results in a real float value for the minor version to be preferred.
- This commit fixes macOS 15.4 SDK compile problem
@ADA-Funni
Copy link

ADA-Funni commented Mar 2, 2026

Very nice!
Unfortunately I'm not a Mac user so I cannot test this, but so far your PR seems to be fine from how you've described it

@Raltyro
Copy link
Member

Raltyro commented Mar 2, 2026

Again thanks for your contribution, i may not have a mac computer to test this myself but as long you say you do and it works, then i'll be merging it, Although i recommend also opening up a pr to do this to FunkinCrew's hxcpp since it has been recently rebased with FunkinCrew's https://github.com/FunkinCrew/hxcpp

@Raltyro
Copy link
Member

Raltyro commented Mar 2, 2026

Well apparently one of the folk told me they already have these commits in FunkinCrew', so weird

@Raltyro Raltyro merged commit 719f377 into CodenameCrew:old Mar 2, 2026
47 of 120 checks passed
@bob-jones-cs bob-jones-cs deleted the fix/macos-26-sdk-and-zlib branch March 2, 2026 12:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants