Compilation Error on macOS: Unresolved Imports for linux_clipboard in cli_clipboard
roadsidev opened this issue · 6 comments
When attempting to build the project with cargo build --release
on macOS, the compiler throws an error for unresolved imports related to linux_clipboard
in the cli_clipboard
module. This seems to be due to platform-specific code that is not compatible with macOS.
Error message:
error[E0432]: unresolved imports cli_clipboard::linux_clipboard
, cli_clipboard::x11_clipboard
...
Steps to Reproduce:
- Run
cargo build --release
on macOS.
Expected Behavior:
The project should compile without errors.
Actual Behavior:
Compilation fails due to the unresolved imports for Linux-specific clipboard functionality.
I have submitted a Pull Request that addresses this issue: #14
I have resolved this issue by implementing conditional compilation based on the target_os. Although I have little to no experience in Rust, I hope my pull request will serve as a starting point. I managed to build the project on Windows, Linux, and macOS without any errors or warnings.
What's odd is that installing nyaa with cargo install nyaa
works perfectly, but it fails when building from the source. I don't know what causes this issue.
Very strange issue. No clue why that's happening. I haven't tested nyaa on macOS at all, so seeing that only one thing has broken (so far) is somewhat relieving 😅
Very strange issue. No clue why that's happening. I haven't tested nyaa on macOS at all, so seeing that only one thing has broken (so far) is somewhat relieving 😅
It's working fine so far! I only started using it yesterday thanks to the Reddit post. If I find more issues, I'll be reporting and hopefully contribute to fix them
Huh yeah I get the same error too on the previous commit. Your fix does seem to have fixed it for me too, though.
It's likely some conditional compilation that is completely omitting x11_clipboard and linux_clipboard.
It's working fine so far! I only started using it yesterday thanks to the Reddit post. If I find more issues, I'll be reporting and hopefully contribute to fix them
Glad everything else is working so far. Feel free to make any contributions! :)
Going to go ahead and close this since everything is now working. Thanks again for contributing :)