kvark / vange-rs

Rusty Vangers clone
https://vange.rs
Apache License 2.0
438 stars 21 forks source link

Compilation errors #20

Closed lpenguin closed 6 years ago

lpenguin commented 6 years ago

Hi! Wanted to try your prototype, but faced compilation errors OS: MacOS X 10.11.6 Rust: rustc 1.22.1

Errors:

cargo run --release --bin road
    Updating registry `https://github.com/rust-lang/crates.io-index`

 Downloading gfx_window_glutin v0.16.0
 Downloading serde v1.0.4
 Downloading cgmath v0.13.1
 Downloading byteorder v1.0.0
 Downloading time v0.1.37
 Downloading toml v0.4.1
 Downloading env_logger v0.4.2
 Downloading gfx v0.16.0
 Downloading serde_derive v1.0.4
 Downloading log v0.3.7
 Downloading glutin v0.8.0
 Downloading rust-ini v0.10.0
 Downloading getopts v0.2.14
 Downloading progressive v0.1.0
 Downloading gfx_device_gl v0.14.0
 Downloading gfx_core v0.7.1
 Downloading gfx_gl v0.3.1
 Downloading derivative v1.0.0
 Downloading bitflags v0.8.2
 Downloading draw_state v0.7.0
 Downloading syn v0.10.8
 Downloading quote v0.3.15
 Downloading itertools v0.5.10
 Downloading unicode-xid v0.0.4
 Downloading either v1.1.0
 Downloading gl_generator v0.5.2
 Downloading khronos_api v1.0.0
 Downloading xml-rs v0.3.6
 Downloading bitflags v0.7.0
 Downloading winit v0.6.4
 Downloading shared_library v0.1.5
 Downloading libc v0.2.22
 Downloading lazy_static v0.2.8
 Downloading rand v0.3.15
 Downloading num-traits v0.1.37
 Downloading approx v0.1.1
 Downloading regex v0.2.1
 Downloading aho-corasick v0.6.3
 Downloading utf8-ranges v1.0.0
 Downloading regex-syntax v0.4.0
 Downloading thread_local v0.3.3
 Downloading memchr v1.0.1
 Downloading unreachable v0.1.1
 Downloading void v1.0.2
 Downloading serde_derive_internals v0.15.0
 Downloading syn v0.11.11
 Downloading synom v0.11.3
 Downloading core-graphics v0.3.2
 Downloading core-foundation v0.2.3
 Downloading objc v0.2.2
 Downloading cgl v0.1.5
 Downloading cocoa v0.3.3
 Downloading cgl v0.2.1
 Downloading cocoa v0.5.2
 Downloading core-graphics v0.4.2
 Downloading core-foundation-sys v0.2.3
 Downloading gleam v0.4.5
 Downloading pkg-config v0.3.9
 Downloading malloc_buf v0.0.6
 Downloading block v0.1.6
 Downloading serde v0.8.23
 Downloading serde v0.7.15
 Downloading gleam v0.2.32
 Downloading bitflags v0.3.3
 Downloading thread-id v3.0.0
   Compiling quote v0.3.15
   Compiling pkg-config v0.3.9
   Compiling libc v0.2.22
   Compiling byteorder v1.0.0
   Compiling core-foundation-sys v0.2.3
   Compiling progressive v0.1.0
   Compiling getopts v0.2.14
   Compiling serde v0.7.15
   Compiling khronos_api v1.0.0
   Compiling regex-syntax v0.4.0
   Compiling log v0.3.7
   Compiling utf8-ranges v1.0.0
   Compiling lazy_static v0.2.8
   Compiling void v1.0.2
   Compiling unicode-xid v0.0.4
   Compiling block v0.1.6
   Compiling num-traits v0.1.37
   Compiling approx v0.1.1
   Compiling bitflags v0.3.3
   Compiling bitflags v0.7.0
   Compiling bitflags v0.8.2
   Compiling serde v1.0.4
   Compiling either v1.1.0
   Compiling serde v0.8.23
   Compiling splay v0.1.0 (file:///Users/nikita/Sources/rust/vange-rs/lib/splay)
   Compiling thread-id v3.0.0
   Compiling malloc_buf v0.0.6
   Compiling rand v0.3.15
   Compiling time v0.1.37
   Compiling memchr v1.0.1
   Compiling rust-ini v0.10.0
   Compiling unreachable v0.1.1
   Compiling shared_library v0.1.5
   Compiling synom v0.11.3
   Compiling syn v0.10.8
   Compiling xml-rs v0.3.6
   Compiling draw_state v0.7.0
   Compiling itertools v0.5.10
   Compiling objc v0.2.2
   Compiling cgmath v0.13.1
   Compiling aho-corasick v0.6.3
   Compiling thread_local v0.3.3
   Compiling syn v0.11.11
   Compiling toml v0.4.1
   Compiling core-foundation v0.2.3
   Compiling regex v0.2.1
   Compiling gl_generator v0.5.2
   Compiling core-graphics v0.4.2
   Compiling core-graphics v0.3.2
error: type `color_space::__CGColorSpace` is private
  --> /Users/nikita/.cargo/registry/src/github.com-1ecc6299db9ec823/core-graphics-0.3.2/src/context.rs:91:48
   |
91 |                                                space.as_concrete_TypeRef(),
   |                                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: type `color_space::__CGColorSpace` is private
  --> /Users/nikita/.cargo/registry/src/github.com-1ecc6299db9ec823/core-graphics-0.3.2/src/context.rs:86:26
   |
86 |             let result = CGBitmapContextCreate(ptr::null_mut(),
   |                          ^^^^^^^^^^^^^^^^^^^^^

error: type `color_space::__CGColorSpace` is private
   --> /Users/nikita/.cargo/registry/src/github.com-1ecc6299db9ec823/core-graphics-0.3.2/src/context.rs:149:37
    |
149 |                              space: CGColorSpaceRef,
    |                                     ^^^^^^^^^^^^^^^

error: type `data_provider::__CGDataProvider` is private
   --> /Users/nikita/.cargo/registry/src/github.com-1ecc6299db9ec823/core-graphics-0.3.2/src/font.rs:106:57
    |
106 |             let font_ref = CGFontCreateWithDataProvider(provider.as_concrete_TypeRef());
    |                                                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: type `data_provider::__CGDataProvider` is private
   --> /Users/nikita/.cargo/registry/src/github.com-1ecc6299db9ec823/core-graphics-0.3.2/src/font.rs:106:28
    |
106 |             let font_ref = CGFontCreateWithDataProvider(provider.as_concrete_TypeRef());
    |                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: type `data_provider::__CGDataProvider` is private
   --> /Users/nikita/.cargo/registry/src/github.com-1ecc6299db9ec823/core-graphics-0.3.2/src/font.rs:137:47
    |
137 |     fn CGFontCreateWithDataProvider(provider: CGDataProviderRef) -> CGFontRef;
    |                                               ^^^^^^^^^^^^^^^^^

error: type `private::ffi::CGSRegionObject` is private
  --> /Users/nikita/.cargo/registry/src/github.com-1ecc6299db9ec823/core-graphics-0.3.2/src/private.rs:19:13
   |
19 |     region: ffi::CGSRegionRef,
   |             ^^^^^^^^^^^^^^^^^

error: type `private::ffi::CGSRegionObject` is private
  --> /Users/nikita/.cargo/registry/src/github.com-1ecc6299db9ec823/core-graphics-0.3.2/src/private.rs:25:35
   |
25 |             ffi::CGSRegionRelease(self.region)
   |                                   ^^^^^^^^^^^

error: type `private::ffi::CGSRegionObject` is private
  --> /Users/nikita/.cargo/registry/src/github.com-1ecc6299db9ec823/core-graphics-0.3.2/src/private.rs:25:13
   |
25 |             ffi::CGSRegionRelease(self.region)
   |             ^^^^^^^^^^^^^^^^^^^^^

error: type `private::ffi::CGSRegionObject` is private
  --> /Users/nikita/.cargo/registry/src/github.com-1ecc6299db9ec823/core-graphics-0.3.2/src/private.rs:34:30
   |
34 |             let mut region = ptr::null_mut();
   |                              ^^^^^^^^^^^^^^^

error: type `private::ffi::CGSRegionObject` is private
  --> /Users/nikita/.cargo/registry/src/github.com-1ecc6299db9ec823/core-graphics-0.3.2/src/private.rs:35:53
   |
35 |             assert!(ffi::CGSNewRegionWithRect(rect, &mut region) == 0);
   |                                                     ^^^^^^^^^^^

error: type `private::ffi::CGSRegionObject` is private
  --> /Users/nikita/.cargo/registry/src/github.com-1ecc6299db9ec823/core-graphics-0.3.2/src/private.rs:35:21
   |
35 |             assert!(ffi::CGSNewRegionWithRect(rect, &mut region) == 0);
   |                     ^^^^^^^^^^^^^^^^^^^^^^^^^

error: type `private::ffi::CGSRegionObject` is private
  --> /Users/nikita/.cargo/registry/src/github.com-1ecc6299db9ec823/core-graphics-0.3.2/src/private.rs:37:25
   |
37 |                 region: region,
   |                         ^^^^^^

error: type `private::ffi::CGSRegionObject` is private
  --> /Users/nikita/.cargo/registry/src/github.com-1ecc6299db9ec823/core-graphics-0.3.2/src/private.rs:45:30
   |
45 |             let mut region = ptr::null_mut();
   |                              ^^^^^^^^^^^^^^^

error: type `private::ffi::CGSRegionObject` is private
  --> /Users/nikita/.cargo/registry/src/github.com-1ecc6299db9ec823/core-graphics-0.3.2/src/private.rs:48:51
   |
48 |                                                   &mut region) == 0);
   |                                                   ^^^^^^^^^^^

error: type `private::ffi::CGSRegionObject` is private
  --> /Users/nikita/.cargo/registry/src/github.com-1ecc6299db9ec823/core-graphics-0.3.2/src/private.rs:46:21
   |
46 |             assert!(ffi::CGSNewRegionWithRectList(rects.as_ptr(),
   |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: type `private::ffi::CGSRegionObject` is private
  --> /Users/nikita/.cargo/registry/src/github.com-1ecc6299db9ec823/core-graphics-0.3.2/src/private.rs:50:25
   |
50 |                 region: region,
   |                         ^^^^^^

error: type `private::ffi::CGSRegionObject` is private
  --> /Users/nikita/.cargo/registry/src/github.com-1ecc6299db9ec823/core-graphics-0.3.2/src/private.rs:84:45
   |
84 |                                             region.region) == 0)
   |                                             ^^^^^^^^^^^^^

error: type `private::ffi::CGSRegionObject` is private
  --> /Users/nikita/.cargo/registry/src/github.com-1ecc6299db9ec823/core-graphics-0.3.2/src/private.rs:81:21
   |
81 |             assert!(ffi::CGSSetSurfaceShape(self.context_id,
   |                     ^^^^^^^^^^^^^^^^^^^^^^^

error: aborting due to 19 previous errors

error: Could not compile `core-graphics`.
warning: build failed, waiting for other jobs to finish...
error: build failed

Do i need some specific version of Rust? (I'm newbie in rust).

kvark commented 6 years ago

Thanks for filing the issue! It appears that we face a semver breaking change in core-graphics and/or Rust FFI here, unfortunately. I'll try out a build on OSX and fix it shortly.

kvark commented 6 years ago

Update to glutin-0.11 fixed it (75ce718ba275091cc2d3cd762fbf26d2a46a9e33). I also hooked up Travis CI for building Linux and OSX so that we can always be sure it builds at least ;) here is the last build, also can see the icon on README.