Open
Description
Version
2.7.1
Short overview
Failed to build because libnut-core/src/macos/screengrab.m:24:24: error: 'CGDisplayCreateImageForRect' is unavailable: obsoleted in macOS 15.0 - Please use ScreenCaptureKit instead.
Detailed error description
➜ libnut-core git:(develop) ✗ npm run build:release
> [email protected] build:release
> cmake-js rebuild --CDCMAKE_OSX_ARCHITECTURES="arm64;x86_64"
info TOOL Using Unix Makefiles generator.
info CMD CLEAN
info RUN [
info RUN 'cmake',
info RUN '-E',
info RUN 'remove_directory',
info RUN './tmp/nutjs/libnut-core/build'
info RUN ]
info CMD CONFIGURE
info RUN [
info RUN 'cmake',
info RUN './tmp/nutjs/libnut-core',
info RUN '--no-warn-unused-cli',
info RUN '-G',
info RUN 'Unix Makefiles',
info RUN '-DCMAKE_JS_VERSION=7.3.0',
info RUN '-DCMAKE_BUILD_TYPE=Release',
info RUN '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=./tmp/nutjs/libnut-core/build/Release',
info RUN '-DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded$<$<CONFIG:Debug>:Debug>',
info RUN '-DCMAKE_JS_INC=./.cmake-js/node-x64/v22.0.0/include/node',
info RUN '-DCMAKE_JS_SRC=',
info RUN '-DNODE_RUNTIME=node',
info RUN '-DNODE_RUNTIMEVERSION=22.0.0',
info RUN '-DNODE_ARCH=x64',
info RUN '-DCMAKE_OSX_ARCHITECTURES=x86_64',
info RUN '-DCMAKE_OSX_ARCHITECTURES=arm64;x86_64',
info RUN '-DCMAKE_JS_LIB=',
info RUN '-DCMAKE_CXX_FLAGS=-D_DARWIN_USE_64_BIT_INODE=1 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DBUILDING_NODE_EXTENSION',
info RUN '-DCMAKE_SHARED_LINKER_FLAGS=-undefined dynamic_lookup'
info RUN ]
Not searching for unused variables given on the command line.
-- The C compiler identification is AppleClang 16.0.0.16000026
-- The CXX compiler identification is AppleClang 16.0.0.16000026
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- macOS build
-- No MSVC compiler in use
-- Includes: ./.cmake-js/node-x64/v22.0.0/include/node
-- Libs: -framework ApplicationServices;-framework Cocoa
-- Configuring done (2.1s)
-- Generating done (0.0s)
-- Build files have been written to: ./tmp/nutjs/libnut-core/build
info CMD BUILD
info RUN [
info RUN 'cmake',
info RUN '--build',
info RUN './tmp/nutjs/libnut-core/build',
info RUN '--config',
info RUN 'Release'
info RUN ]
[ 8%] Building CXX object CMakeFiles/libnut.dir/src/main.cc.o
[ 16%] Building C object CMakeFiles/libnut.dir/src/deadbeef_rand.c.o
[ 25%] Building C object CMakeFiles/libnut.dir/src/MMBitmap.c.o
[ 33%] Building C object CMakeFiles/libnut.dir/src/macos/keycode.c.o
[ 41%] Building C object CMakeFiles/libnut.dir/src/macos/keypress.c.o
./tmp/nutjs/libnut-core/src/macos/keypress.c:19:10: warning: 'IOMasterPort' is deprecated: first deprecated in macOS 12.0 [-Wdeprecated-declarations]
19 | kr = IOMasterPort(bootstrap_port, &masterPort);
| ^~~~~~~~~~~~
| kIOMainPortDefault
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.2.sdk/System/Library/Frameworks/IOKit.framework/Headers/IOKitLib.h:143:1: note: 'IOMasterPort' has been explicitly marked deprecated here
143 | IOMasterPort( mach_port_t bootstrapPort,
| ^
./tmp/nutjs/libnut-core/src/macos/keypress.c:46:10: warning: 'IOHIDPostEvent' is deprecated: first deprecated in macOS 11.0 - Use CGSEventTap for posting HID events, IOHIDUserDevice for simulating HID device, IOPMAssertionDeclareUserActivity for reporting user activity [-Wdeprecated-declarations]
46 | kr = IOHIDPostEvent(_getAuxiliaryKeyDriver(), NX_SYSDEFINED, loc, &event,
| ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.2.sdk/System/Library/Frameworks/IOKit.framework/Headers/hidsystem/IOHIDLib.h:62:1: note: 'IOHIDPostEvent' has been explicitly marked deprecated here
62 | IOHIDPostEvent( io_connect_t connect,
| ^
./tmp/nutjs/libnut-core/src/macos/keypress.c:128:50: warning: incompatible pointer types passing 'unsigned short (*)[2]' to parameter of type 'const UniChar * _Nullable' (aka 'const unsigned short *') [-Wincompatible-pointer-types]
128 | CGEventKeyboardSetUnicodeString(keyEvent, 2, &surrogates);
| ^~~~~~~~~~~
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.2.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGEvent.h:206:59: note: passing argument to parameter 'unicodeString' here
206 | UniCharCount stringLength, const UniChar * __nullable unicodeString)
| ^
./tmp/nutjs/libnut-core/src/macos/keypress.c:130:50: warning: incompatible pointer types passing 'unsigned long *' to parameter of type 'const UniChar * _Nullable' (aka 'const unsigned short *') [-Wincompatible-pointer-types]
130 | CGEventKeyboardSetUnicodeString(keyEvent, 1, &ch);
| ^~~
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.2.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGEvent.h:206:59: note: passing argument to parameter 'unicodeString' here
206 | UniCharCount stringLength, const UniChar * __nullable unicodeString)
| ^
4 warnings generated.
./tmp/nutjs/libnut-core/src/macos/keypress.c:19:10: warning: 'IOMasterPort' is deprecated: first deprecated in macOS 12.0 [-Wdeprecated-declarations]
19 | kr = IOMasterPort(bootstrap_port, &masterPort);
| ^~~~~~~~~~~~
| kIOMainPortDefault
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.2.sdk/System/Library/Frameworks/IOKit.framework/Headers/IOKitLib.h:143:1: note: 'IOMasterPort' has been explicitly marked deprecated here
143 | IOMasterPort( mach_port_t bootstrapPort,
| ^
./tmp/nutjs/libnut-core/src/macos/keypress.c:46:10: warning: 'IOHIDPostEvent' is deprecated: first deprecated in macOS 11.0 - Use CGSEventTap for posting HID events, IOHIDUserDevice for simulating HID device, IOPMAssertionDeclareUserActivity for reporting user activity [-Wdeprecated-declarations]
46 | kr = IOHIDPostEvent(_getAuxiliaryKeyDriver(), NX_SYSDEFINED, loc, &event,
| ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.2.sdk/System/Library/Frameworks/IOKit.framework/Headers/hidsystem/IOHIDLib.h:62:1: note: 'IOHIDPostEvent' has been explicitly marked deprecated here
62 | IOHIDPostEvent( io_connect_t connect,
| ^
./tmp/nutjs/libnut-core/src/macos/keypress.c:128:50: warning: incompatible pointer types passing 'unsigned short (*)[2]' to parameter of type 'const UniChar * _Nullable' (aka 'const unsigned short *') [-Wincompatible-pointer-types]
128 | CGEventKeyboardSetUnicodeString(keyEvent, 2, &surrogates);
| ^~~~~~~~~~~
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.2.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGEvent.h:206:59: note: passing argument to parameter 'unicodeString' here
206 | UniCharCount stringLength, const UniChar * __nullable unicodeString)
| ^
./tmp/nutjs/libnut-core/src/macos/keypress.c:130:50: warning: incompatible pointer types passing 'unsigned long *' to parameter of type 'const UniChar * _Nullable' (aka 'const unsigned short *') [-Wincompatible-pointer-types]
130 | CGEventKeyboardSetUnicodeString(keyEvent, 1, &ch);
| ^~~
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.2.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGEvent.h:206:59: note: passing argument to parameter 'unicodeString' here
206 | UniCharCount stringLength, const UniChar * __nullable unicodeString)
| ^
4 warnings generated.
[ 50%] Building C object CMakeFiles/libnut.dir/src/macos/mouse.c.o
[ 58%] Building CXX object CMakeFiles/libnut.dir/src/macos/mouse_utils.mm.o
[ 66%] Building C object CMakeFiles/libnut.dir/src/macos/screen.c.o
[ 75%] Building C object CMakeFiles/libnut.dir/src/macos/screengrab.m.o
./tmp/nutjs/libnut-core/src/macos/screengrab.m:24:24: error: 'CGDisplayCreateImageForRect' is unavailable: obsoleted in macOS 15.0 - Please use ScreenCaptureKit instead.
24 | CGImageRef image = CGDisplayCreateImageForRect(displayID,
| ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.2.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGDirectDisplay.h:391:33: note: 'CGDisplayCreateImageForRect' has been explicitly marked unavailable here
391 | CG_EXTERN CGImageRef __nullable CGDisplayCreateImageForRect(
| ^
1 error generated.
make[2]: *** [CMakeFiles/libnut.dir/src/macos/screengrab.m.o] Error 1
make[1]: *** [CMakeFiles/libnut.dir/all] Error 2
make: *** [all] Error 2
ERR! OMG Process terminated: 2
Steps to reproduce error
npm install
npm run build:release
Additional content
Please provide any (mandatory) additional data to reproduce the error (Dockerfiles etc.)
I'm currently using MacOS 15.1.1, there is an update for 15.2. I don't think it will fix anything but I will update and report back.
Metadata
Metadata
Assignees
Labels
No labels