nushell: nu-0.59.1 build failure
Describe the bug
nu-0.59.1 from commit 9db356e174288e74f7b5374d679b72907731eb70 fails to build on NetBSD.
First attempt to build fails since NetBSD libc doesn’t support trash-support
I’ve disabled this feature at build time and have the following features enabled, “plugin”, “which”, “zip-support”.
But, I’m hitting the following build error,
Compiling nu-command v0.59.1 (/usr/pkgsrc/wip/nushell/work/nushell-9db356e174288e74f7b5374d679b72907731eb70/crates/nu-command)
error[E0425]: cannot find function `collect_proc` in crate `nu_system`
--> crates/nu-command/src/system/ps.rs:74:28
|
74 | for proc in nu_system::collect_proc(Duration::from_millis(100), false) {
| ^^^^^^^^^^^^ not found in `nu_system`
For more information about this error, try `rustc --explain E0425`.
error: could not compile `nu-command` due to previous error
*** Error code 101
Stop.
How to reproduce
Build nu from git-HEAD
Expected behavior
Build finishes successfully.
Screenshots
No response
Configuration
No response
Additional context
OS: NetBSD-current (9.99.94) Rust: 1.59.0
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 47 (31 by maintainers)
Updated, http://mail-index.netbsd.org/pkgsrc-changes/2022/09/06/msg260136.html
The first thing that comes to mind for me is to lay out a barebones implementation of ProcessInfo, where we can make use of a handy macro that Rust provides called
todo!(). This satisfies the compiler’s needs to a certain degree, so that it doesn’t scream back saying the method doesn’t exist. We’ll do this for every function, until we can begin the real work and actually implement the functionalities thatProcessInfoexposes.I’ll begin by setting up my NetBSD environment, after which I’ll fork the repository and make a draft PR.
@0323pin We plan on releasing 0.68.0 on Sept 6
This was unexpected … yes, looking at the changes, it should have fixed it. I’ll try a build when I find the time and report back. Let’s keep this open until then. Thanks for reaching out.
@fdncred Thanks.
@0323pin if you look at this function, you can see what each platform (Mac, linux, windows) is returning by looking at the cols.push() lines. https://github.com/nushell/nushell/blob/8a9cc33aacf978d95617f79252025a7204d0109d/crates/nu-command/src/system/ps.rs#L69-L149
I could help you achieve that, but I’ll have to setup a new NetBSD environment from scratch, which could take me a while due to my terrible internet connection. Would you like me to do that?
It looks like the easiest solution from here may be to change
run_ps()to something like this below, where it checks to see if the process_info is empty, which it should be if it’s coming from other.rs. At least it’s something to play around with.others.rsneeds to be here/crates/nu-system/src/others.rsand thelib.rsthat needs changing is/crates/nu-system/src/lib.rs