Skip to content
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

Moving to systemstat #4076

Closed
0323pin opened this issue Jun 16, 2022 · 3 comments
Closed

Moving to systemstat #4076

0323pin opened this issue Jun 16, 2022 · 3 comments
Labels
🐛 bug Something isn't working as expected.

Comments

@0323pin
Copy link

0323pin commented Jun 16, 2022

Hi,
Moving to systemstat has issues with portability. Broken build on NetBSD as follows,

   Compiling systemstat v0.1.11
error[E0432]: unresolved import `self::platform::PlatformImpl`
  --> /usr/pkgsrc/wip/starship/work/vendor/systemstat-0.1.11/src/lib.rs:18:9
   |
18 | pub use self::platform::PlatformImpl as System;
   |         ^^^^^^^^^^^^^^^^------------^^^^^^^^^^
   |         |               |
   |         |               help: a similar name exists in the module: `Platform`
   |         no `PlatformImpl` in `platform`

error[E0412]: cannot find type `PlatformMemory` in this scope
   --> /usr/pkgsrc/wip/starship/work/vendor/systemstat-0.1.11/src/data.rs:289:26
    |
289 |     pub platform_memory: PlatformMemory,
    |                          ^^^^^^^^^^^^^^ not found in this scope

error[E0412]: cannot find type `PlatformSwap` in this scope
   --> /usr/pkgsrc/wip/starship/work/vendor/systemstat-0.1.11/src/data.rs:319:24
    |
319 |     pub platform_swap: PlatformSwap,
    |                        ^^^^^^^^^^^^ not found in this scope

Some errors have detailed explanations: E0412, E0432.
For more information about an error, try `rustc --explain E0412`.
error: could not compile `systemstat` due to 3 previous errors
*** Error code 101

Supported platforms (roughly ordered by completeness of support):

FreeBSD
Linux
OpenBSD
Windows
macOS
more coming soon

😞

@0323pin 0323pin added the 🐛 bug Something isn't working as expected. label Jun 16, 2022
@davidkna
Copy link
Member

I think memory/swap support for netbsd would be straightforward to implement in systemstat. Furthermore, unimplemented functions return an error in systemstat, so it should also be possible to add a dummy NetBSD implementation that could even re-use some of the implementations with other bsds.

@0323pin
Copy link
Author

0323pin commented Jun 17, 2022

@davidkna Thanks for your reply

I think memory/swap support for netbsd would be straightforward to implement in systemstat.

Yes, but I haven't done this before and writing it from scratch will take time.
I'll try requesting support with systemstat.

@0323pin
Copy link
Author

0323pin commented Jun 20, 2022

@davidkna Closing this now. A dummy implementation is now in place, should fix it once systemstat gets a new release.

@0323pin 0323pin closed this as completed Jun 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working as expected.
Projects
None yet
Development

No branches or pull requests

2 participants