Closed scowalt closed 2 years ago
Hi @scowalt, thanks for the report. I can reproduce. We'll take a look at this.
Filed internally as 139348.
Sweet thanks!
For anyone else hit by this, I was able to work around the issue by turning off warnings for deprecation with -DCMAKE_C_FLAGS=-Wno-deprecated
Hi @scowalt, this has been resolved in 2.4.1, and thanks again for reporting the issue.
When you get a chance, please confirm that the new release works for you.
Weirdly, this introduced a new error for me:
/var/folders/l7/4zs8693n1fq5f517cmv4kv9m0000gn/T/tmp.ufGuF0kf/c-client-sdk/src/ldutil.c:205:37: error: 'kIOMainPortDefault' is only available on macOS 12.0 or newer [-Werror,-Wunguarded-availability-new]
entry = IORegistryEntryFromPath(kIOMainPortDefault, "IOService:/");
^~~~~~~~~~~~~~~~~~
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.1.sdk/System/Library/Frameworks/IOKit.framework/Headers/IOKitLib.h:102:19: note: 'kIOMainPortDefault' has been marked as being introduced in macOS 12.0 here, but the deployment target is macOS 11.0.0
const mach_port_t kIOMainPortDefault
^
/var/folders/l7/4zs8693n1fq5f517cmv4kv9m0000gn/T/tmp.ufGuF0kf/c-client-sdk/src/ldutil.c:205:37: note: enclose 'kIOMainPortDefault' in a __builtin_available check to silence this warning
entry = IORegistryEntryFromPath(kIOMainPortDefault, "IOService:/");
^~~~~~~~~~~~~~~~~~
1 error generated.
make[2]: *** [CMakeFiles/ldclientapi.dir/src/ldutil.c.o] Error 1
make[1]: *** [CMakeFiles/ldclientapi.dir/all] Error 2
I think it's because, even though my macOS version is 12, I'm specifying macOS version 11 as my build target. (This is something new that I wasn't doing when I originally filed this issue)
I'm specifying my build target with:
set(CMAKE_OSX_DEPLOYMENT_TARGET "11" CACHE STRING "Minimum OS X deployment version" FORCE)
@scowalt can you try find-and-replacing (here) MAC_OS_X_VERSION_MAX_ALLOWED
with MAC_OS_X_VERSION_MIN_REQUIRED
and let me know if that solves:
Thanks.
That fix appears to have works for both my original use case and the updated use case!
Resolved by 2.4.2.
Library version: 2.4.0
When compiling on macOS Monterey (Version 12.1), I get the following error: