Open flibitijibibo opened 3 months ago
It's getting bumped for 3.0, though I'm not sure what the new requirements are. It's at least 11.3.
FWIW, for older toolchains I just disable the camera and dialog subsystems, and the rest of SDL builds fine.
I updated the build requirements in 571a4b4b3, we require at least Xcode 12.2 and the macOS 11.0 SDK.
I'm not sure how we set SDK requirements in CMake? @madebr, do you know? Is that even a thing?
Also, our deployment targets are:
IPHONEOS_DEPLOYMENT_TARGET = 9.0
MACOSX_DEPLOYMENT_TARGET = 10.11
TVOS_DEPLOYMENT_TARGET = 9.0
XROS_DEPLOYMENT_TARGET = 1.0
Aside from XROS, these are all well below the minimum officially supported targets for the latest version of Xcode, but they still work well so far.
I'm not sure how we set SDK requirements in CMake? @madebr, do you know? Is that even a thing?
There is CMAKE_OSX_DEPLOYMENT_TARGET
. It's meant to be set by the user.
When adding message(STATUS "CMAKE_OSX_DEPLOYMENT_TARGET: ${CMAKE_OSX_DEPLOYMENT_TARGET}")
at the bottom of the cmake script,
does it print usable version information?
The minimum SDK is different from the deployment target. The current macOS code requires the 11.0 SDK, but the deployment target is 10.11.
From this ios toolchain, I got this.
#!/bin/sh
SDK_NAMES="iphoneos iphonesimulator appletvos appletvsimulator watchos watchsimulator xros xrsimulator macosx"
for SDK_NAME in ${SDK_NAMES}; do
CMAKE_OSX_SYSROOT_INT=$(xcodebuild -version -sdk "${SDK_NAME}" Path)
SDK_VERSION=$(xcodebuild -sdk "${CMAKE_OSX_SYSROOT_INT}" -version SDKVersion)
echo "SDK_NAME=${SDK_NAME} CMAKE_OSX_SYSROOT_INT=${CMAKE_OSX_SYSROOT_INT} SDK_VERSION=${SDK_VERSION}"
done
What does it output on macos?
What does it output on macos?
SDK_NAME=iphoneos CMAKE_OSX_SYSROOT_INT=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.5.sdk SDK_VERSION=17.5 SDK_NAME=iphonesimulator CMAKE_OSX_SYSROOT_INT=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator17.5.sdk SDK_VERSION=17.5 SDK_NAME=appletvos CMAKE_OSX_SYSROOT_INT=/Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS17.5.sdk SDK_VERSION=17.5 SDK_NAME=appletvsimulator CMAKE_OSX_SYSROOT_INT=/Applications/Xcode.app/Contents/Developer/Platforms/AppleTVSimulator.platform/Developer/SDKs/AppleTVSimulator17.5.sdk SDK_VERSION=17.5 SDK_NAME=watchos CMAKE_OSX_SYSROOT_INT=/Applications/Xcode.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS10.5.sdk SDK_VERSION=10.5 SDK_NAME=watchsimulator CMAKE_OSX_SYSROOT_INT=/Applications/Xcode.app/Contents/Developer/Platforms/WatchSimulator.platform/Developer/SDKs/WatchSimulator10.5.sdk SDK_VERSION=10.5 SDK_NAME=xros CMAKE_OSX_SYSROOT_INT=/Applications/Xcode.app/Contents/Developer/Platforms/XROS.platform/Developer/SDKs/XROS1.2.sdk SDK_VERSION=1.2 SDK_NAME=xrsimulator CMAKE_OSX_SYSROOT_INT=/Applications/Xcode.app/Contents/Developer/Platforms/XRSimulator.platform/Developer/SDKs/XRSimulator1.2.sdk SDK_VERSION=1.2 SDK_NAME=macosx CMAKE_OSX_SYSROOT_INT=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk SDK_VERSION=14.5
Does the SDK check need to be at the cmake level? SDL already does this, which should probably be updated: https://github.com/libsdl-org/SDL/blob/main/src/video/cocoa/SDL_cocoawindow.m#L25-L27
Actually, I build SDL3 with an older SDK and disable the camera and dialog subsystems, so I'd prefer not to hard-code the requirement. Maybe we just leave it alone for now?
I do the same thing, but that becomes a problem if SDL at a high level promises X/Y/Z but the people actually building it can only provide X/Y. That's kind of the reason I'm dropping macOS on my end despite organizing Metal support for GPU; I've been able to help Apple devs work on and support GPU for 11+ but I genuinely cannot build SDL3 here anymore, and advertising Mac support from my end while not being able to build such a major component would be really weird... disabling subsystems at the end user level makes sense but upstream doing it feels really sketchy IMO.
Yeah, to be clear, I don't disable them for public builds or development, only for another project where I have to build with a lower SDK and I'm not using those subsystems.
Is there a reason you're not able to upgrade your Xcode version?
There are a few reasons but the big one is that my MacBook was EOL'd after 10.15, so I can't even run 11.0 let alone build for it - hypothetically I could buy another Mac but I'm trying to avoid that as best as I can 😅
That's a good reason. :)
There's a bunch of changes that Apple has made in 11.0+, so if you're going to do Apple platform support you really need to have a device that can run that. You have chosen... correctly. :)
Was building SDL3 against Mojave and ran into some errors - the camera one I think just needs a minimum SDK version requirement in the CMake project...
... but this one in the dialog subsystem I'm not sure about:
Are we keeping the minimum SDK at 10.11, or will it get bumped for 3.0?