Opened 3 days ago

Closed 11 hours ago

#70758 closed defect (fixed)

qt5-qtbase @5.15.15: error: 'CGDisplayCreateImageForRect' is unavailable: obsoleted in macOS 15.0 - Please use ScreenCaptureKit instead.

Reported by: piru (Harry Sintonen) Owned by:
Priority: Normal Milestone:
Component: ports Version: 2.10.1
Keywords: sequoia Cc: markemer (Mark Anderson), breiter (Brian Reiter)
Port: qt5-qtbase

Description

:info:build qcocoascreen.mm:607:67: error: 'CGDisplayCreateImageForRect' is unavailable: obsoleted in macOS 15.0 - Please use ScreenCaptureKit instead.
:info:build   607 |         QImage displayImage = qt_mac_toQImage(QCFType<CGImageRef>(CGDisplayCreateImageForRect(display, displayLocalGrabBounds.toCGRect())));
:info:build       |                                                                   ^
:info:build /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGDirectDisplay.h:391:33: note: 'CGDisplayCreateImageForRect' has been explicitly marked unavailable here
:info:build   391 | CG_EXTERN CGImageRef __nullable CGDisplayCreateImageForRect(
:info:build       |

Attachments (1)

main.log (4.0 MB) - added by mf2k (Frank Schima) 18 hours ago.

Change History (10)

comment:1 Changed 3 days ago by markemer (Mark Anderson)

This is the same bug as the qt6 port in Ticket 70709.

The solution is in this PR: PR-25748, at least for now.

The guys on QT6 say they build with a deployment version of 12, so we might want to consider that on any platform 12+

comment:2 Changed 3 days ago by markemer (Mark Anderson)

Cc: markemer added

comment:3 Changed 44 hours ago by breiter (Brian Reiter)

Cc: breiter added

comment:4 Changed 32 hours ago by markemer (Mark Anderson)

Resolution: fixed
Status: newclosed

comment:5 Changed 18 hours ago by mf2k (Frank Schima)

Resolution: fixed
Status: closedreopened

This is still broken for me. M2 mac on Sequoia 15.0.

Last edited 18 hours ago by mf2k (Frank Schima) (previous) (diff)

Changed 18 hours ago by mf2k (Frank Schima)

Attachment: main.log added

comment:6 Changed 17 hours ago by markemer (Mark Anderson)

This makes no sense to me in the log: :debug:patch MACOSX_DEPLOYMENT_TARGET='15.0'

Unless macports macos_deployment_target has a bug

Can you do a port clean --all qt6 and try again?

Also can make sure you're up to date and your portfile has the platform darwin 24 line in it?

Last edited 17 hours ago by markemer (Mark Anderson) (previous) (diff)

comment:7 Changed 15 hours ago by markemer (Mark Anderson)

I wonder if it's not getting picked up for some reason due to some other qt related port?

comment:8 Changed 11 hours ago by jmroot (Joshua Root)

It's because platform 24 is incorrect, it needs to be platform darwin 24. https://guide.macports.org/#reference.variants.platform

Last edited 11 hours ago by jmroot (Joshua Root) (previous) (diff)

comment:9 Changed 11 hours ago by markemer (Mark Anderson)

Resolution: fixed
Status: reopenedclosed

Realized the problem - during one of my many force pushes I screwed up the platform bit.

Fixed in 223b685

Note: See TracTickets for help on using tickets.