oakes / SolidOak

An IDE for Rust
https://sekao.net/solidoak/
The Unlicense
893 stars 60 forks source link

SolidOak cann't be compiled with niglhtly. #66

Closed o01eg closed 7 years ago

o01eg commented 7 years ago

When I trying to build SolidOak with nightly version I got compilation error:

error[E0591]: `extern "C" fn(&std::cell::RefCell<std::boxed::Box<std::ops::FnMut() -> source::Continue + 'static>>) -> i32 {source::trampoline}` is zero-sized and can't be transmuted to `std::option::Option<unsafe extern "C" fn(*mut libc::c_void) -> i32>`
  --> /tmp/portage/dev-util/SolidOak-9999/homedir/.cargo/registry/src/github.com-1ecc6299db9ec823/glib-0.0.7/src/source.rs:52:70
   |
52 |         glib_ffi::g_idle_add_full(glib_ffi::G_PRIORITY_DEFAULT_IDLE, transmute(trampoline),
   |                                                                      ^^^^^^^^^
   |
note: cast with `as` to a pointer instead
  --> /tmp/portage/dev-util/SolidOak-9999/homedir/.cargo/registry/src/github.com-1ecc6299db9ec823/glib-0.0.7/src/source.rs:52:70
   |
52 |         glib_ffi::g_idle_add_full(glib_ffi::G_PRIORITY_DEFAULT_IDLE, transmute(trampoline),
   |                                                                      ^^^^^^^^^

error[E0591]: `extern "C" fn(&std::cell::RefCell<std::boxed::Box<std::ops::FnMut() -> source::Continue + 'static>>) -> i32 {source::trampoline}` is zero-sized and can't be transmuted to `std::option::Option<unsafe extern "C" fn(*mut libc::c_void) -> i32>`
  --> /tmp/portage/dev-util/SolidOak-9999/homedir/.cargo/registry/src/github.com-1ecc6299db9ec823/glib-0.0.7/src/source.rs:60:78
   |
60 |         glib_ffi::g_timeout_add_full(glib_ffi::G_PRIORITY_DEFAULT, interval, transmute(trampoline),
   |                                                                              ^^^^^^^^^
   |
note: cast with `as` to a pointer instead
  --> /tmp/portage/dev-util/SolidOak-9999/homedir/.cargo/registry/src/github.com-1ecc6299db9ec823/glib-0.0.7/src/source.rs:60:78
   |
60 |         glib_ffi::g_timeout_add_full(glib_ffi::G_PRIORITY_DEFAULT, interval, transmute(trampoline),
   |                                                                              ^^^^^^^^^

error[E0591]: `extern "C" fn(&std::cell::RefCell<std::boxed::Box<std::ops::FnMut() -> source::Continue + 'static>>) -> i32 {source::trampoline}` is zero-sized and can't be transmuted to `std::option::Option<unsafe extern "C" fn(*mut libc::c_void) -> i32>`
  --> /tmp/portage/dev-util/SolidOak-9999/homedir/.cargo/registry/src/github.com-1ecc6299db9ec823/glib-0.0.7/src/source.rs:69:13
   |
69 |             transmute(trampoline), into_raw(func), Some(destroy_closure))
   |             ^^^^^^^^^
   |
note: cast with `as` to a pointer instead
  --> /tmp/portage/dev-util/SolidOak-9999/homedir/.cargo/registry/src/github.com-1ecc6299db9ec823/glib-0.0.7/src/source.rs:69:13
   |
69 |             transmute(trampoline), into_raw(func), Some(destroy_closure))
   |             ^^^^^^^^^

error: aborting due to 3 previous errors

error: Could not compile `glib`.

Caused by:
  process didn't exit successfully: `rustc --crate-name glib /tmp/portage/dev-util/SolidOak-9999/homedir/.cargo/registry/src/github.com-1ecc6299db9ec823/glib-0.0.7/src/lib.rs --crate-type lib --emit=dep-info,link -C opt-level=3 -C metadata=f78bd29dbb2abf6f -C extra-filename=-f78bd29dbb2abf6f --out-dir /tmp/portage/dev-util/SolidOak-9999/work/SolidOak-9999/target/release/deps -L dependency=/tmp/portage/dev-util/SolidOak-9999/work/SolidOak-9999/target/release/deps --extern glib_sys=/tmp/portage/dev-util/SolidOak-9999/work/SolidOak-9999/target/release/deps/libglib_sys-2b53c1d2944f8dba.rlib --extern gio_sys=/tmp/portage/dev-util/SolidOak-9999/work/SolidOak-9999/target/release/deps/libgio_sys-33e2893e75c51075.rlib --extern libc=/tmp/portage/dev-util/SolidOak-9999/work/SolidOak-9999/target/release/deps/liblibc-c2668eb07a902d7f.rlib --extern gobject_sys=/tmp/portage/dev-util/SolidOak-9999/work/SolidOak-9999/target/release/deps/libgobject_sys-4e3267daa88612e7.rlib --cap-lints allow -L native=/usr/lib64 -L native=/usr/lib64 -L native=/usr/lib64` (exit code: 101)
Build failed, waiting for other jobs to finish...

It caused by actually old version of glib crate 0.0.7 while latest is 0.1.2 which builds successfully. Version: rustc 1.17.0-dev (8c4f2c64c 2017-03-22)

oakes commented 7 years ago

I just finished a big refactor which updates glib.