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

I think we should support Mac OS #16

Closed
Jzow opened this issue Sep 14, 2022 · 1 comment
Closed

I think we should support Mac OS #16

Jzow opened this issue Sep 14, 2022 · 1 comment

Comments

@Jzow
Copy link

Jzow commented Sep 14, 2022

When I fork local the following errors occur when compiling locally. The error log probably means that my cargo source cannot find the corresponding os

   Compiling procfs v0.12.0
error[E0433]: failed to resolve: could not find `linux` in `os`
  --> /Users/jameszow/.cargo/registry/src/github.com-1ecc6299db9ec823/procfs-0.12.0/src/process/mod.rs:66:14
   |
66 | use std::os::linux::fs::MetadataExt;
   |              ^^^^^ could not find `linux` in `os`

error[E0425]: cannot find function `stat64` in crate `libc`
   --> /Users/jameszow/.cargo/registry/src/github.com-1ecc6299db9ec823/procfs-0.12.0/src/process/namespaces.rs:25:31
    |
25  |             if unsafe { libc::stat64(cstr.as_ptr(), &mut stat) } != 0 {
    |                               ^^^^^^ help: a function with a similar name exists: `stat`
    |
   ::: /Users/jameszow/.cargo/registry/src/github.com-1ecc6299db9ec823/libc-0.2.126/src/unix/mod.rs:726:5
    |
726 |     pub fn stat(path: *const c_char, buf: *mut stat) -> ::c_int;
    |     ----------------------------------------------------------- similarly named function `stat` defined here

   Compiling http-body v0.1.0
error[E0599]: no method named `st_mode` found for struct `Metadata` in the current scope
   --> /Users/jameszow/.cargo/registry/src/github.com-1ecc6299db9ec823/procfs-0.12.0/src/process/mod.rs:701:23
    |
701 |             mode: (md.st_mode() as libc::mode_t) & libc::S_IRWXU,
    |                       ^^^^^^^ method not found in `Metadata`
    |
   ::: /Users/jameszow/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/src/rust/library/std/src/os/macos/fs.rs:34:8
    |
34  |     fn st_mode(&self) -> u32;
    |        ------- the method is available for `Metadata` here
    |
    = help: items from traits can only be used if the trait is in scope
help: the following trait is implemented but not in scope; perhaps add a `use` for it:
    |
55  | use std::os::macos::fs::MetadataExt;
    |

error[E0599]: no method named `st_uid` found for struct `Metadata` in the current scope
   --> /Users/jameszow/.cargo/registry/src/github.com-1ecc6299db9ec823/procfs-0.12.0/src/process/mod.rs:759:23
    |
759 |             owner: md.st_uid(),
    |                       ^^^^^^ method not found in `Metadata`
    |
   ::: /Users/jameszow/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/src/rust/library/std/src/os/macos/fs.rs:38:8
    |
38  |     fn st_uid(&self) -> u32;
    |        ------ the method is available for `Metadata` here
    |
    = help: items from traits can only be used if the trait is in scope
help: the following trait is implemented but not in scope; perhaps add a `use` for it:
    |
55  | use std::os::macos::fs::MetadataExt;
    |

error[E0599]: no method named `st_mode` found for struct `Metadata` in the current scope
   --> /Users/jameszow/.cargo/registry/src/github.com-1ecc6299db9ec823/procfs-0.12.0/src/process/mod.rs:994:31
    |
994 |                     mode: (md.st_mode() as libc::mode_t) & libc::S_IRWXU,
    |                               ^^^^^^^ method not found in `Metadata`
    |
   ::: /Users/jameszow/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/src/rust/library/std/src/os/macos/fs.rs:34:8
    |
34  |     fn st_mode(&self) -> u32;
    |        ------- the method is available for `Metadata` here
    |
    = help: items from traits can only be used if the trait is in scope
help: the following trait is implemented but not in scope; perhaps add a `use` for it:
    |
55  | use std::os::macos::fs::MetadataExt;
    |

Some errors have detailed explanations: E0425, E0433, E0599.
For more information about an error, try `rustc --explain E0425`.
error: could not compile `procfs` due to 5 previous errors
@xiaoquanju
Copy link
Collaborator

tat-agent 依赖了procfs,这个库目前不支持mac。tat-agent用来支持云上的虚拟机,mac暂时不能在云上运行。所以支持mac意义不大。 你可以开一个linux 虚拟机或者在云上买一台开发机。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants