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

Fails to build on MacOS #567

Open
connorskees opened this issue Jun 17, 2024 · 2 comments
Open

Fails to build on MacOS #567

connorskees opened this issue Jun 17, 2024 · 2 comments

Comments

@connorskees
Copy link

git clone https://github.com/servo/pathfinder
cargo b
full error
error[E0308]: mismatched types
   --> /Users/connorskees/.cargo/registry/src/index.crates.io-6f17d22bba15001f/winit-0.19.3/src/platform/macos/view.rs:209:9
    |
205 | extern fn has_marked_text(this: &Object, _sel: Sel) -> BOOL {
    |                                                        ---- expected `bool` because of return type
...
209 |         (marked_text.length() > 0) as i8
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `bool`, found `i8`

error[E0308]: mismatched types
   --> /Users/connorskees/.cargo/registry/src/index.crates.io-6f17d22bba15001f/winit-0.19.3/src/platform/macos/window.rs:102:26
    |
102 |             is_zoomed != 0
    |             ---------    ^ expected `bool`, found integer
    |             |
    |             expected because this is `bool`

error[E0308]: mismatched types
   --> /Users/connorskees/.cargo/registry/src/index.crates.io-6f17d22bba15001f/winit-0.19.3/src/platform/macos/window.rs:174:57
    |
174 |                 self.window.setFrame_display_(new_rect, 0);
    |                             -----------------           ^ expected `bool`, found integer
    |                             |
    |                             arguments to this method are incorrect
    |
note: method defined here
   --> /Users/connorskees/.cargo/registry/src/index.crates.io-6f17d22bba15001f/cocoa-0.18.5/src/appkit.rs:932:15
    |
932 |     unsafe fn setFrame_display_(self, windowFrame: NSRect, display: BOOL);
    |               ^^^^^^^^^^^^^^^^^

error[E0308]: mismatched types
    --> /Users/connorskees/.cargo/registry/src/index.crates.io-6f17d22bba15001f/winit-0.19.3/src/platform/macos/window.rs:1290:48
     |
1290 |         window.setFrame_display_(current_rect, 0)
     |                -----------------               ^ expected `bool`, found integer
     |                |
     |                arguments to this method are incorrect
     |
note: method defined here
    --> /Users/connorskees/.cargo/registry/src/index.crates.io-6f17d22bba15001f/cocoa-0.18.5/src/appkit.rs:932:15
     |
932  |     unsafe fn setFrame_display_(self, windowFrame: NSRect, display: BOOL);
     |               ^^^^^^^^^^^^^^^^^

error[E0308]: mismatched types
    --> /Users/connorskees/.cargo/registry/src/index.crates.io-6f17d22bba15001f/winit-0.19.3/src/platform/macos/window.rs:1297:48
     |
1297 |         window.setFrame_display_(current_rect, 0)
     |                -----------------               ^ expected `bool`, found integer
     |                |
     |                arguments to this method are incorrect
     |
note: method defined here
    --> /Users/connorskees/.cargo/registry/src/index.crates.io-6f17d22bba15001f/cocoa-0.18.5/src/appkit.rs:932:15
     |
932  |     unsafe fn setFrame_display_(self, windowFrame: NSRect, display: BOOL);
     |               ^^^^^^^^^^^^^^^^^

error[E0308]: mismatched types
    --> /Users/connorskees/.cargo/registry/src/index.crates.io-6f17d22bba15001f/winit-0.19.3/src/platform/macos/window.rs:1314:48
     |
1314 |         window.setFrame_display_(current_rect, 0)
     |                -----------------               ^ expected `bool`, found integer
     |                |
     |                arguments to this method are incorrect
     |
note: method defined here
    --> /Users/connorskees/.cargo/registry/src/index.crates.io-6f17d22bba15001f/cocoa-0.18.5/src/appkit.rs:932:15
     |
932  |     unsafe fn setFrame_display_(self, windowFrame: NSRect, display: BOOL);
     |               ^^^^^^^^^^^^^^^^^

error[E0308]: mismatched types
    --> /Users/connorskees/.cargo/registry/src/index.crates.io-6f17d22bba15001f/winit-0.19.3/src/platform/macos/window.rs:1321:48
     |
1321 |         window.setFrame_display_(current_rect, 0)
     |                -----------------               ^ expected `bool`, found integer
     |                |
     |                arguments to this method are incorrect
     |
note: method defined here
    --> /Users/connorskees/.cargo/registry/src/index.crates.io-6f17d22bba15001f/cocoa-0.18.5/src/appkit.rs:932:15
     |
932  |     unsafe fn setFrame_display_(self, windowFrame: NSRect, display: BOOL);
     |               ^^^^^^^^^^^^^^^^^

   Compiling usvg v0.9.1
   Compiling exr v1.72.0
   Compiling indexmap v2.2.3
For more information about this error, try `rustc --explain E0308`.
error: could not compile `winit` (lib) due to 7 previous errors

Seems to be caused by winit. I tried playing around with dependency version numbers for a while, but was unable to get it to compile.

@sagudev
Copy link
Member

sagudev commented Jul 20, 2024

I see the same problem in #569.

@Ahineya
Copy link

Ahineya commented Aug 31, 2024

@connorskees Got the same error on Mac.

Commenting out these in Cargo.toml helped. Some dependency inside them is using old winit.

default-members = [
    "c",
    "canvas",
    "content",
#    "demo/common",
#    "demo/native",
#    "examples/canvas_glutin_minimal",
#    "examples/canvas_minimal",
#    "examples/canvas_moire",
#    "examples/canvas_text",
#    "examples/lottie_basic",
#    "examples/swf_basic",
    "geometry",
    "gl",
    "gpu",
    "lottie",
    "export",
    "renderer",
    "simd",
    "svg",
    "swf",
    "text",
    "ui",
    "utils/area-lut",
    "utils/gamma-lut",
    "utils/svg-to-skia",
    "utils/convert",
]

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