-
-
Notifications
You must be signed in to change notification settings - Fork 338
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
sysinfo broken on apple x86_64 with apple sdk 10 #915
Comments
it might be worth noting, i only get this error running let me know what other info would be helpful to have - i'm running macOS 12.6.2,
|
so the above error is when i was using the { pkgs ? import <nixpkgs> {} }:
pkgs.mkShell {
nativeBuildInputs = [
pkgs.darwin.IOKit
pkgs.libiconv
pkgs.darwin.apple_sdk_11_0.frameworks.CoreFoundation
];
} so then the question for @DavHau is why the nix config in the holochain repo doesn't have these pieces loaded correctly. but that applies more to holochain#1764 than this issue. also wrote this quick unit test to confirm that the specific macOS corefoundation constant causing the issue works within the above nix config - it does use sysinfo::DiskExt;
use sysinfo::SystemExt;
#[test]
fn test_get_available_volume_space() {
if sysinfo::System::IS_SUPPORTED {
let s = &mut sysinfo::System::new_all();
for disk in s.disks_mut() {
disk.refresh();
assert!(disk.available_space() > 0);
}
}
} |
Seems like it's an issue outside of sysinfo scope. Closing then. |
I would be greatly appreciated if sysinfo could support outdated macos. The "AvailableCapacityForImportantUsage" call is only available in macos 10.13. https://developer.apple.com/documentation/corefoundation/kcfurlvolumeavailablecapacityforimportantusagekey. I commented out the usage of kCFURLVolumeAvailableCapacityForImportantUsageKey in the "src/apple/disk.rs" and "src/apple/ffi.rs", then got my project compiled. In the "get_available_volume_space" function code, I see, in the comment, you prefer "AvailableCapacityForImportantUsage" over "AvailableCapacity". I guess there's a better way to fallback to use old "kCFURLVolumeAvailableCapacityKey" according to the macos version. |
PRs are welcome. But it'll also require a CI to ensure this breakage doesn't happen again too. |
Since this PR sysinfo is broken on macos x86_64 with apple sdk 10 (10.12 in my case):
Upgrading the apple sdk to version 11 fixes the problem.
The latest sysinfo release which still works with apple sdk 10 is
0.26.6
.The text was updated successfully, but these errors were encountered: