coder543/dataplotlib

Build failing? Problem with gfx_device_gl?

Opened this issue · 2 comments

I was trying to experiment with your awesome-seeming library, but unfortunately wasn't able to install it... Any ideas? I'm running OSX High Sierra, and just updated the Rust compiler. Example error message:

josh@schism:~/josh/Research/projects/cars$ cargo test dataplotlib
   Compiling core-graphics v0.3.2
   Compiling image v0.10.4
   Compiling cgl v0.1.5
   Compiling gfx_device_gl v0.11.2
error: type `color_space::__CGColorSpace` is private
  --> /Users/josh/.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/josh/.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/josh/.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/josh/.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/josh/.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/josh/.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/josh/.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/josh/.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/josh/.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/josh/.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/josh/.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/josh/.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/josh/.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/josh/.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/josh/.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/josh/.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/josh/.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/josh/.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/josh/.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

That is strange. core-graphics would probably be a Mac-only dependency of SDL2, so maybe you could try using updating the SDL2 dependency, if there is a newer version out there.

In general, though, only Windows and Linux are supported by dataplotlib right now. Mac seemingly can't handle the graphics window being created and controlled by a thread other than the main thread, even though it works fine on every other system I've tested.

Thanks for the info! I'll update this issue if I figure something out...