Closed casouri closed 3 years ago
I am not able to support catfs on OS X because I don't have an apple laptop. I skimmed over the compiler errors and most of them seem to be trivially fixable. Happy to guide you through it if you'd like to submit a PR
Please do! However, I'm still learning so I can't promise anything.
the best way is to try and then ask specific questions here
I have a MacOS developer rig and am happy to work on getting catfs working on Mac. I have no experience with rust, but am able to reproduce the above errors exactly.
The first issues seem to be lib related; are these functions platform-specific, or is the Library failing to get loaded on macOS? Maybe there’s a missing dev package (crate?) on macOS.
How would you like to proceed? Thanks in advance for catfs (and goofys) and your time.
Some of these are from the libc crate and I am not sure if it's ported to OS X. Some of them are from internal libc wrapper that I wrote myself. I don't think there's a general solution here.
Thanks for your response. The libc crate is definitely ported to MacOS (see here) -- which is included in Cargo.toml
as a dependency and being imported in libc.rs
.
Some of the functions do appear in the MacOS libc API (eg. fdopendir
) while others do not (eg. pipe2
, splice
, posix_fallocate
). I can take a stab at substituting functions where the signatures match, but in cases where they don't (eg. pipe2
), the wrapper will have to be modified.
Unfortunately there's no comments in the code, so I'm not sure why certain thing are being done (eg. passing O_CLOEXEC
to pipe2
), etc. If you're willing to take a look and clarify once I have a PR that would be much appreciated.
After looking more closely, it appears that a number of crucial libc
functions aren't available on MacOS. It might be possible to "fake" some of the functionality within the rlibc.rs
wrapper by someone who is familiar with how filesystem-level calls work -- unfortunately, that's beyond me.
I guess catfs isn't likely to work with MacOS anytime soon. 😢
what functions specifically are not available?
My apologies for the delay -- I haven't abandoned the issue. Missing functions are:
pipe2
(though pipe
is available)splice
AT_EMPTY_PATH
utimensat
(though utime
and utimes
are available)posix_fallocate
The rest of the error in this trace look like casting issues, though this mismatch might be a known issue.
Is catfs supposted to run on macOS?
Errors below occured when I try to install it with cargo.