QT Problems on macOS 15
Mark E Anderson
mark at macports.org
Wed Sep 4 18:46:16 UTC 2024
It's deprecated as of 14, and they're removing it if you JUST build for MacOS Deployment Target 15. If you set the deployment target to <15, you're good, otherwise you get this error:
*error: 'CGDisplayCreateImageForRect' is unavailable: obsoleted in macOS 15.0 - Please use ScreenCaptureKit instead.*
Caused by this in the SDK when compiling for deployment target 15.0:
*@available(macOS, introduced: 10.6, deprecated: 14.4, obsoleted: 15.0, message: "Please use ScreenCaptureKit instead.")*
There are other bugs all over, none I've brought up here, since most of them are Apple bugs, or are hard to tell if they are or not. But this one is a deliberate removal, so as soon as people install macOS 15 and try to compile with the latest SDK, anything with these APIs will error. I assume in some cases upstream will fix, but I wanted to put it out there that reports for these will be coming.
I'll create a proper ticket after release. Hell, I'll do one now, if people are ok with that, thanks to the relaxed NDA, but old habits die hard.
I'll take a look at these bugs you mention and file radars or whatever. If anyone is seeing bugs on a non-dev beta - I can file bugs if you reach out, I'm listed on the wiki as running the macOS 15 dev beta.
—Mark
P.S. - building qt-base with macos_deployment_target 14.0 does indeed fix things so, Thanks Ryan, because that worked great for me!
On Sun, Aug 25, 2024, at 10:57 PM, Fred Wright wrote:
>
> On Thu, 15 Aug 2024, Mark E Anderson wrote:
>
> > Just a heads up, `CGDisplayCreateImageForRect` is no longer supported in the macOS 15 SDK.
>
> I don't know what SDK you're looking at, but I see that definition in the
> macOS 15 SDK here, in both the beta 4 and beta 6 versions of XCode 16.
>
> If that were really true, it's a bug that would need to be fixed before it
> comes out of beta, since Apple encourages, and in some cases requires,
> builds to use the SDK for the next later OS version than the one being
> targeted. So the SDK for OS N+1 damn well better include all the
> definitions for OS N.
>
> There are at least two bugs that *do* exist in the macOS 15 SDK, at least
> as of beta 6:
>
> 1) It still thinks it's a 14.0 SDK:
> -------------------------------------------------------------------------
> /*
> * if max OS not specified, assume larger of (10.15, min)
> */
> #ifndef MAC_OS_X_VERSION_MAX_ALLOWED
> #if MAC_OS_X_VERSION_MIN_REQUIRED > MAC_OS_VERSION_14_0
> #define MAC_OS_X_VERSION_MAX_ALLOWED MAC_OS_X_VERSION_MIN_REQUIRED
> #else
> #define MAC_OS_X_VERSION_MAX_ALLOWED MAC_OS_VERSION_14_0
> #endif
> #endif
> -------------------------------------------------------------------------
> Note that the comment is even more outdated than the code. :-)
>
> 2) There are new functions for half-precision floats in 15.x, and their
> prototypes are *unconditionally* included in math.h. That means that
> building anything that uses math.h with a compiler that doesn't provide
> the _Float16 type gets fatal errors. Availability attributes don't help
> with this, since the declarations themselves are illegal without the type.
> Usually, things of this form have conditionals related to compiler
> capabilities, but that's currently missing here, and the usual "define it
> as empty" approach doesn't work with types.
>
> Anyone with a paid developer account should feel free to file bugs about
> those. Those of us who don't pay Apple for the privilege of telling them
> what they're doing wrong don't have that option.
>
> On Fri, 16 Aug 2024, Mark E Anderson wrote:
>
> > I do! I'll look into that. Yeah, I don't even have the 14 SDK on this machine since Xcode 15 won't run.
>
> You don't need to *run* a version of Xcode just to extract an SDK from it.
> Though in some cases you may trip over issues with the installer and/or
> unarchiver.
>
> Fred Wright
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macports.org/pipermail/macports-dev/attachments/20240904/ee4e9e43/attachment.htm>
More information about the macports-dev
mailing list