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

Unable to build on macOS #476

Open
edfloreshz opened this issue Dec 10, 2024 · 4 comments
Open

Unable to build on macOS #476

edfloreshz opened this issue Dec 10, 2024 · 4 comments

Comments

@edfloreshz
Copy link

Building COSMIC apps on macOS is not possible because of this.

Log

error[E0432]: unresolved imports `rustix::pipe::pipe_with`, `rustix::pipe::PipeFlags`
   --> /Users/eduardo/.cargo/registry/src/index.crates.io-6f17d22bba15001f/smithay-client-toolkit-0.19.2/src/data_device_manager/data_offer.rs:439:24
    |
439 |     use rustix::pipe::{pipe_with, PipeFlags};
    |                        ^^^^^^^^^  ^^^^^^^^^ no `PipeFlags` in `pipe`
    |                        |
    |                        no `pipe_with` in `pipe`
    |
note: found an item that was configured out
   --> /Users/eduardo/.cargo/registry/src/index.crates.io-6f17d22bba15001f/rustix-0.38.41/src/pipe.rs:108:8
    |
108 | pub fn pipe_with(flags: PipeFlags) -> io::Result<(OwnedFd, OwnedFd)> {
    |        ^^^^^^^^^
note: the item is gated here
   --> /Users/eduardo/.cargo/registry/src/index.crates.io-6f17d22bba15001f/rustix-0.38.41/src/pipe.rs:99:1
    |
99  | / #[cfg(not(any(
100 | |     apple,
101 | |     target_os = "aix",
102 | |     target_os = "espidf",
103 | |     target_os = "haiku",
104 | |     target_os = "nto"
105 | | )))]
    | |____^
note: found an item that was configured out
   --> /Users/eduardo/.cargo/registry/src/index.crates.io-6f17d22bba15001f/rustix-0.38.41/src/pipe.rs:25:31
    |
25  | pub use backend::pipe::types::PipeFlags;
    |                               ^^^^^^^^^
note: the item is gated here
   --> /Users/eduardo/.cargo/registry/src/index.crates.io-6f17d22bba15001f/rustix-0.38.41/src/pipe.rs:24:1
    |
24  | #[cfg(not(apple))]
    | ^^^^^^^^^^^^^^^^^^

error[E0432]: unresolved imports `rustix::pipe::pipe_with`, `rustix::pipe::PipeFlags`
   --> /Users/eduardo/.cargo/registry/src/index.crates.io-6f17d22bba15001f/smithay-client-toolkit-0.19.2/src/primary_selection/offer.rs:39:28
    |
39  |         use rustix::pipe::{pipe_with, PipeFlags};
    |                            ^^^^^^^^^  ^^^^^^^^^ no `PipeFlags` in `pipe`
    |                            |
    |                            no `pipe_with` in `pipe`
    |
note: found an item that was configured out
   --> /Users/eduardo/.cargo/registry/src/index.crates.io-6f17d22bba15001f/rustix-0.38.41/src/pipe.rs:108:8
    |
108 | pub fn pipe_with(flags: PipeFlags) -> io::Result<(OwnedFd, OwnedFd)> {
    |        ^^^^^^^^^
note: the item is gated here
   --> /Users/eduardo/.cargo/registry/src/index.crates.io-6f17d22bba15001f/rustix-0.38.41/src/pipe.rs:99:1
    |
99  | / #[cfg(not(any(
100 | |     apple,
101 | |     target_os = "aix",
102 | |     target_os = "espidf",
103 | |     target_os = "haiku",
104 | |     target_os = "nto"
105 | | )))]
    | |____^
note: found an item that was configured out
   --> /Users/eduardo/.cargo/registry/src/index.crates.io-6f17d22bba15001f/rustix-0.38.41/src/pipe.rs:25:31
    |
25  | pub use backend::pipe::types::PipeFlags;
    |                               ^^^^^^^^^
note: the item is gated here
   --> /Users/eduardo/.cargo/registry/src/index.crates.io-6f17d22bba15001f/rustix-0.38.41/src/pipe.rs:24:1
    |
24  | #[cfg(not(apple))]
    | ^^^^^^^^^^^^^^^^^^
For more information about this error, try `rustc --explain E0432`.
error: could not compile `smithay-client-toolkit` (lib) due to 2 previous errors
@tronical
Copy link
Contributor

I think smithay-client-toolkit can't be a dependency for Cosmic apps on macOS. I think that needs to be fixed on whatever crate lists smithay-client-toolkit as a dependency to not do that on macOS.

@edfloreshz
Copy link
Author

This is the dependency tree, reduced for legibility.

├── libcosmic v0.1.0 (https://github.com/pop-os/libcosmic.git#0ef3cced)
│   ├── cosmic-client-toolkit v0.1.0 (https://github.com/pop-os/cosmic-protocols?rev=c8d3a1c#c8d3a1c3)
│   │   ├── smithay-client-toolkit v0.19.2

@tronical
Copy link
Contributor

Indeed, in that case if libcosmic were to enable cosmic apps on macOS, it is the crate that needs to be changed to not depend on wayland crates like these. For example in places like these.

@ids1024
Copy link
Member

ids1024 commented Dec 10, 2024

Yeah. Technically it would be possible to port smithay-client-toolkit to run on macOS (I've run wayland-rs on macOS), but you'd expect software not to pull in Wayland dependencies on macOS.

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

3 participants