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

Some libc mismatch leads to expected *mut libc::types::common::c95::c_void, found *mut libc::c_void #657

Closed
winding-lines opened this issue Nov 9, 2015 · 1 comment

Comments

@winding-lines
Copy link

I am getting the following errors when trying to compile on OS X 10.11.1. It seems that there are some libc mismatches between the dependencies. Some of the errors go away when upgrading glutin itself to libc 0.2, however there is at least one dependency (gl_common) for which I cannot find the source code.

Any thoughts on how to move forward?

cargo build
    Updating registry `https://github.com/rust-lang/crates.io-index`
   Compiling core-foundation-sys v0.2.0
   Compiling libc v0.1.12
   Compiling khronos_api v0.0.8
   Compiling bitflags v0.3.2
   Compiling lazy_static v0.1.15
   Compiling libc v0.2.1
   Compiling xml-rs v0.1.26
   Compiling gl_common v0.1.0
   Compiling log v0.3.3
   Compiling shared_library v0.1.0
   Compiling malloc_buf v0.0.6
   Compiling objc v0.1.8
   Compiling core-foundation v0.2.0
   Compiling core-graphics v0.2.0
   Compiling cocoa v0.1.5
   Compiling gl_generator v0.1.0
   Compiling glutin v0.4.1 (file:///Users/user/oss/PistonDevelopers/glutin)
   Compiling gleam v0.1.16
   Compiling cgl v0.1.1
src/api/cocoa/mod.rs:146:18: 146:62 error: the trait `objc::encode::Encode` is not implemented for the type `*mut libc::types::common::c95::c_void` [E0277]
src/api/cocoa/mod.rs:146             decl.add_ivar::<*mut libc::c_void>("glutinState");
                                          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/api/cocoa/mod.rs:146:18: 146:62 help: run `rustc --explain E0277` to see a detailed explanation
src/api/cocoa/mod.rs:163:31: 163:86 error: the trait `objc::encode::Encode` is not implemented for the type `*mut libc::types::common::c95::c_void` [E0277]
src/api/cocoa/mod.rs:163             (&mut **delegate).set_ivar("glutinState", state_ptr as *mut libc::c_void);
                                                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/api/cocoa/mod.rs:163:31: 163:86 help: run `rustc --explain E0277` to see a detailed explanation
src/api/cocoa/mod.rs:84:54: 84:77 error: the trait `objc::encode::Encode` is not implemented for the type `*mut libc::types::common::c95::c_void` [E0277]
src/api/cocoa/mod.rs:84                 let state: *mut libc::c_void = *this.get_ivar("glutinState");
                                                                             ^~~~~~~~~~~~~~~~~~~~~~~
src/api/cocoa/mod.rs:84:54: 84:77 help: run `rustc --explain E0277` to see a detailed explanation
src/api/cocoa/mod.rs:93:54: 93:77 error: the trait `objc::encode::Encode` is not implemented for the type `*mut libc::types::common::c95::c_void` [E0277]
src/api/cocoa/mod.rs:93                 let state: *mut libc::c_void = *this.get_ivar("glutinState");
                                                                             ^~~~~~~~~~~~~~~~~~~~~~~
src/api/cocoa/mod.rs:93:54: 93:77 help: run `rustc --explain E0277` to see a detailed explanation
src/api/cocoa/mod.rs:112:54: 112:77 error: the trait `objc::encode::Encode` is not implemented for the type `*mut libc::types::common::c95::c_void` [E0277]
src/api/cocoa/mod.rs:112                 let state: *mut libc::c_void = *this.get_ivar("glutinState");
                                                                              ^~~~~~~~~~~~~~~~~~~~~~~
src/api/cocoa/mod.rs:112:54: 112:77 help: run `rustc --explain E0277` to see a detailed explanation
src/api/cocoa/mod.rs:120:54: 120:77 error: the trait `objc::encode::Encode` is not implemented for the type `*mut libc::types::common::c95::c_void` [E0277]
src/api/cocoa/mod.rs:120                 let state: *mut libc::c_void = *this.get_ivar("glutinState");
                                                                              ^~~~~~~~~~~~~~~~~~~~~~~
src/api/cocoa/mod.rs:120:54: 120:77 help: run `rustc --explain E0277` to see a detailed explanation
src/api/cocoa/mod.rs:313:33: 313:36 error: mismatched types:
 expected `*mut libc::types::common::c95::c_void`,
    found `*mut libc::c_void`
(expected enum `libc::types::common::c95::c_void`,
    found enum `libc::c_void`) [E0308]
src/api/cocoa/mod.rs:313                 CGLSetParameter(obj, kCGLCPSurfaceOpacity, &mut opacity);
                                                         ^~~
src/api/cocoa/mod.rs:313:33: 313:36 help: run `rustc --explain E0308` to see a detailed explanation
src/api/cocoa/mod.rs:561:31: 561:50 error: mismatched types:
 expected `*mut libc::types::common::c95::c_void`,
    found `*mut libc::c_void`
(expected enum `libc::types::common::c95::c_void`,
    found enum `libc::c_void`) [E0308]
src/api/cocoa/mod.rs:561                     CGLEnable(cxt.CGLContextObj(), kCGLCECrashOnRemovedFunctions);
                                                       ^~~~~~~~~~~~~~~~~~~
src/api/cocoa/mod.rs:526:17: 566:18 note: in this expansion of if let expansion
src/api/cocoa/mod.rs:521:13: 569:14 note: in this expansion of if let expansion
src/api/cocoa/mod.rs:561:31: 561:50 help: run `rustc --explain E0308` to see a detailed explanation
error: aborting due to 8 previous errors
Could not compile `glutin`.

To learn more, run the command again with --verbose.
@tomaka
Copy link
Contributor

tomaka commented Nov 9, 2015

Thanks for the report.
Closing as duplicate of #654

@tomaka tomaka closed this as completed Nov 9, 2015
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