dk / Prima

prima.eu.org
Other
111 stars 27 forks source link

installation failed on macOS 15.2 (m1 chip) #128

Closed dong4138 closed 2 weeks ago

dong4138 commented 1 month ago

hi, I upgraded my MacBook M1 to version 15.2, and the command "cpanm Prima" failed. The log is as follows:

/include/webp -I/opt/homebrew/opt/webp/include -I/opt/homebrew/Cellar/libxpm/3.5.17/include -Wno-compound-token-split-by-macro -fno-common -DPERL_DARWIN -mmacosx-version-min=15.2 -DNO_THREAD_SAFE_QUERYLOCALE -DNO_POSIX_2008_LOCALE -fno-strict-aliasing -pipe -fstack-protector-strong -Wno-error=implicit-function-declaration -O3 -Wall -DVERSION=\"1.75\" -DXS_VERSION=\"1.75\" "-I/Users/yan4138/perl5/perlbrew/perls/perl-5.40.0/lib/5.40.0/darwin-2level/CORE" unix/cocoa.c -o unix/cocoa.o unix/cocoa.c:57:16: error: 'CGWindowListCreateImage' is unavailable: obsoleted in macOS 15.0 - Please use ScreenCaptureKit instead. 57 | if (!( cimg = CGWindowListCreateImage( | ^ /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGWindow.h:271:33: note: 'CGWindowListCreateImage' has been explicitly marked unavailable here 271 | CG_EXTERN CGImageRef __nullable CGWindowListCreateImage(CGRect screenBounds, | ^ 1 error generated. make: *** [unix/cocoa.o] Error 1 -> FAIL Installing Prima failed. See /Users/yan4138/.cpanm/work/1736049342.46499/build.log for details. Retry with --force to force install

dk commented 1 month ago

Thanks for the report,will take a look later. Meanwhile if you need a dirty workaround just delete unix/cocoa.c and rerun perl Makefile.PL

dk commented 3 weeks ago

Could you possibly try out if this latest change works on your Mac?