Cmake: Sets minimum macOS SDK and XCode to 26.1. #13406
Cmake: Sets minimum macOS SDK and XCode to 26.1. #13406danrossi wants to merge 1 commit intoobsproject:masterfrom
Conversation
…ac build environment.
|
The checks is still happening. However with an XCode Universal 26.1. A Universal build can be made on arm64. I am not sure what XCode the x86 has. OBS builds a universal build. So any XCode 26.1 and above that doesn't say Apple Silicon is the Universal XCode. It needs to be manually installed via this site or Xcodes. As the Apple Store was only offering 16.1. |
|
We don't officially support x86 anymore anyway, so no need to worry about what's going on there (if anything). |
Usual caveat here that ultimately these decisions rest with project maintainers, but, that said, I don't think I see any reason to set the minimum required version to compile anywhere beyond the minimum version that actually builds and runs successfully (in this case, Xcode 16.3). The last PR that you closed (#13384) may have even been a more appropriate fix, since a single syntactical trailing comma in a parameter list is the only thing preventing the project from compiling under Swift 6.0 / Xcode 16.1. It's certainly good practice to proactively use the latest toolchains when they become available, to get ahead of any issues that may exist with them, and also to take advantage of things like performance improvements, but requiring them for all developers is a different matter. Swift 6.0, C++17 and the macOS 15 SDK are all very real requirements for OBS, and very real failures happen if you attempt to use any prior version of those toolchains or standards. I'm not sure it makes sense to set the minimum required SDK version any higher than these required versions if there is no known failure that happens on lower versions, or defects observed in the build. |
|
The mac builds are done with the Universal XCode 26.1. So if there is no issues running with macOS 14 I thought it's best to just update the requirements in the build system. I had to upgrade to macOS 15 to build properly under XCode 16.3 so can't check in macOS 14 now. Did you want me to fix the trailing comma again or keep this PR. I was not sure what to do. |
|
On your previous PR, I advised:
That still applies; I am not sure why you closed it. Now that this PR exists as well, I suppose I might change it to require Xcode 16.3 (macOS 15.4 SDK). Then it would represent a separate and distinct resolution for the original issue. And again, it could be that neither resolution is appropriate and the project will decide something else entirely is correct. These sorts of chores/changes are often better left in the hands of actual maintainers for that reason; it's not usually easy or reasonable for someone newer to a project to know all of the variables that factor into its final choice for something like an SDK or OS requirement. |
Description
There is a build issue in macOS with errors if the Xcode and Swift version is too old. This cmake config change sets the minimum macOS SDK and XCode version to 26.1. To match the CI mac build environment. XCode 16.3 builds but best to match the CI build system. This requires macOS 15.6 and above.
I am unable to find the docs for building the source.
Motivation and Context
Related: #13384
This fixes a build error when using macOS 14 and Xcode 16.1.
How Has This Been Tested?
Types of changes
Bug fix (non-breaking change which fixes an issue)
Checklist: