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

Build fails with stable-i686-apple-darwin #803

Closed
yupferris opened this issue Jul 28, 2016 · 3 comments
Closed

Build fails with stable-i686-apple-darwin #803

yupferris opened this issue Jul 28, 2016 · 3 comments

Comments

@yupferris
Copy link

On i686, build fails with the following output:

$ cargo run --example window
    Updating registry `https://github.com/rust-lang/crates.io-index`
 Downloading shared_library v0.1.5
 Downloading serde v0.7.15
   Compiling log v0.3.6
   Compiling libc v0.2.14
   Compiling lazy_static v0.2.1
   Compiling bitflags v0.7.0
   Compiling core-foundation-sys v0.2.2
   Compiling serde v0.7.15
   Compiling bitflags v0.3.3
   Compiling khronos_api v1.0.0
   Compiling xml-rs v0.3.4
   Compiling malloc_buf v0.0.6
   Compiling shared_library v0.1.5
   Compiling objc v0.2.1
   Compiling core-foundation v0.2.2
   Compiling gl_generator v0.5.2
   Compiling glutin v0.6.1 (file:///Users/yupferris/dev/projects/glutin)
   Compiling gleam v0.2.20
   Compiling core-graphics v0.3.2
   Compiling cocoa v0.3.3
   Compiling cgl v0.1.5
src/api/cocoa/mod.rs:226:17: 226:83 error: mismatched types [E0308]
src/api/cocoa/mod.rs:226                 appkit::NSAnyEventMask.bits() | appkit::NSEventMaskPressure.bits(),
                                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/api/cocoa/mod.rs:226:17: 226:83 help: run `rustc --explain E0308` to see a detailed explanation
src/api/cocoa/mod.rs:226:17: 226:83 note: expected type `u32`
src/api/cocoa/mod.rs:226:17: 226:83 note:    found type `u64`
src/api/cocoa/mod.rs:255:17: 255:83 error: mismatched types [E0308]
src/api/cocoa/mod.rs:255                 appkit::NSAnyEventMask.bits() | appkit::NSEventMaskPressure.bits(),
                                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/api/cocoa/mod.rs:255:17: 255:83 help: run `rustc --explain E0308` to see a detailed explanation
src/api/cocoa/mod.rs:255:17: 255:83 note: expected type `u32`
src/api/cocoa/mod.rs:255:17: 255:83 note:    found type `u64`
src/api/cocoa/mod.rs:448:38: 448:78 error: mismatched types [E0308]
src/api/cocoa/mod.rs:448                     window.setLevel_(appkit::NSMainMenuWindowLevel as i64 + 1);
                                                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/api/cocoa/mod.rs:448:38: 448:78 help: run `rustc --explain E0308` to see a detailed explanation
src/api/cocoa/mod.rs:448:38: 448:78 note: expected type `i32`
src/api/cocoa/mod.rs:448:38: 448:78 note:    found type `i64`
src/api/cocoa/mod.rs:917:62: 917:77 error: mismatched types [E0308]
src/api/cocoa/mod.rs:917             Some(Event::TouchpadPressure(nsevent.pressure(), nsevent.stage()))
                                                                                      ^~~~~~~~~~~~~~~
src/api/cocoa/mod.rs:917:62: 917:77 help: run `rustc --explain E0308` to see a detailed explanation
src/api/cocoa/mod.rs:917:62: 917:77 note: expected type `i64`
src/api/cocoa/mod.rs:917:62: 917:77 note:    found type `i32`
error: aborting due to 4 previous errors
error: Could not compile `glutin`.

To learn more, run the command again with --verbose.

Looks like it might be as trivial as changing some u64's to usize's to fix.

@yupferris
Copy link
Author

Ah, might be a problem with the cocoa package. Will continue digging.

@yupferris
Copy link
Author

As a quickfix, I tried some trivial casts at all of these locations (... as _) to fix up the types, but it was unable to bring up a window, and eventually crashed. My test project is spitting out tons of GL_INVALID_FRAMEBUFFER_OPERATION errors, but I doubt the specific error type is relevant here. Might be something deeper that needs to be done rather than just fixing up the types here.

@tomaka
Copy link
Contributor

tomaka commented Nov 3, 2016

Closing for rust-windowing/winit#78

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

No branches or pull requests

2 participants