screenpipe icon indicating copy to clipboard operation
screenpipe copied to clipboard

[bug] clean install of macos results in build error

Open ethanlee16 opened this issue 1 year ago • 3 comments

describe the bug Clean install of macOS does not compile successfully.

to reproduce

  1. Follow the directions at https://docs.screenpi.pe/docs/getting-started#macos-installation to build screenpipe from source.
  2. Observe that cargo build --release --features metal results 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

ethanlee16 avatar Nov 26 '24 00:11 ethanlee16

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"

ethanlee16 avatar Nov 26 '24 00:11 ethanlee16

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

ethanlee16 avatar Nov 26 '24 08:11 ethanlee16

/tip $50 @ethanlee16

thank you for saving me time, fixed

louis030195 avatar Nov 26 '24 19:11 louis030195

@ethanlee16: You just got a $50 tip! 👉 Complete your Algora onboarding to collect your payment.

algora-pbc[bot] avatar Nov 26 '24 19:11 algora-pbc[bot]

🎉🎈 @ethanlee16 has been awarded $50! 🎈🎊

algora-pbc[bot] avatar Nov 27 '24 17:11 algora-pbc[bot]