bb
bb copied to clipboard
Compiling on NetBSD
I'm trying to compile bb on NetBSD and I'm getting the following,
...
Compiling crossbeam v0.7.2
error[E0308]: mismatched types
--> src/main.rs:86:54
|
86 | libc::getpwuid_r(pw_uid, &mut pwent, buffer, 16384, &mut pwentp);
| ^^^^^^ expected `i8`, found array `[i8; 16384]`
|
= note: expected raw pointer `*mut i8`
found mutable reference `&mut [i8; 16384]`
error: aborting due to previous error
For more information about this error, try `rustc --explain E0308`.
error: could not compile `bb`.
To learn more, run the command again with --verbose.
*** Error code 101
Any clue? Thanks.
Hello, this is because bb is using linux's libc crate version without any target platform checks.
Even if this was patched, bb relies on procfs; I see here it might be available on NetBSD, I will try setting up a VM to check this out.
Thank you for your prompt reply.
The reason I even tried was that in main.rs I found
target_os = "macos",
target_os = "ios",
target_os = "freebsd",
target_os = "dragonfly",
target_os = "openbsd",
target_os = "netbsd"
Please let me know the outcome of your attempt. Thank you.