Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Quartz module fails to build on macOS 15: CGWindowListCreateImageFromArray is unavailable #627

Closed
breun opened this issue Oct 20, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@breun
Copy link

breun commented Oct 20, 2024

Describe the bug

Why I try to build the PyObjC Quartz module on macOS 15, I get this error:

Modules/_coregraphics.m:243:17: error: 'CGWindowListCreateImageFromArray' is unavailable: obsoleted in macOS 15.0 - Please use ScreenCaptureKit instead.
  243 |                 CGWindowListCreateImageFromArray(screenBounds, windowArray, imageOption);
      |                 ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGWindow.h:280:33: note: 'CGWindowListCreateImageFromArray' has been explicitly marked unavailable here
  280 | CG_EXTERN CGImageRef __nullable CGWindowListCreateImageFromArray(
      |                                 ^

Platform information

  • Python 3.12
  • Installed from MacPorts (python312)
  • macOS 15.0.1

To Reproduce
Build the PyObjC Quartz module on macOS 15.

Expected behavior
I expect the build to succeed without errors.

@breun breun added the bug Something isn't working label Oct 20, 2024
@breun
Copy link
Author

breun commented Oct 20, 2024

I found a workaround for MacPorts by setting the deployment target to macOS 14: https://trac.macports.org/wiki/SequoiaProblems#ScreenCaptureKitRequirementwithmacOS15SDK

@ronaldoussoren
Copy link
Owner

Thanks for the report. I generally build with the Python.org installations of Python and hadn't seen this problem yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants