[bug] clean install of macos results in build error
describe the bug Clean install of macOS does not compile successfully.
to reproduce
- Follow the directions at https://docs.screenpi.pe/docs/getting-started#macos-installation to build screenpipe from source.
- Observe that
cargo build --release --features metalresults in a build failure with the following error:
error[E0599]: no method named `len` found for type `i8` in the current scope
--> /Users/ethan/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sysinfo-0.31.4/src/unix/apple/macos/process.rs:432:53
|
432 | Some(node.vip_path.len() * node.vip_path[0].len()),
| ^^^
|
help: there is a method `le` with a similar name, but with different arguments
--> /Users/ethan/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/cmp.rs:1196:5
|
1196 | fn le(&self, other: &Rhs) -> bool {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
expected behavior build command should succeed
system info
- os: macos 15.1.1 (24B91)
- screenpipe version: 0.1.98
additional context
This may have happened due to a recent update to libc types for macOS released a couple hours ago in 0.2.165: https://github.com/rust-lang/libc/pull/4062
I resolved this issue by setting libc to exactly 0.2.164 in screenpipe-vision:
screenpipe-vision/Cargo.toml
[target.'cfg(target_os = "macos")'.dependencies]
- libc = "0.2"
+ libc = "=0.2.164"
xcap = "0.0.13"
[target.'cfg(target_os = "linux")'.dependencies]
- libc = "0.2"
+ libc = "=0.2.164"
xcap = "0.0.14"
This is related to sysinfo 0.31.4 getting pulled in by xcap, and the sysinfo issue is being tracked here: https://github.com/GuillaumeGomez/sysinfo/issues/1392
/tip $50 @ethanlee16
thank you for saving me time, fixed
@ethanlee16: You just got a $50 tip! 👉 Complete your Algora onboarding to collect your payment.