PistonDevelopers / conrod

An easy-to-use, 2D GUI library written entirely in Rust.
Other
3.35k stars 297 forks source link

Can't start example #547

Closed vi closed 8 years ago

vi commented 9 years ago
$ target/debug/examples/all_widgets
thread '<main>' panicked at 'called `Result::unwrap()` on an `Err` value: XNotSupported', ../src/libcore/result.rs:732

Probably system (non-Rust) dependencies needs to be specified in the Readme.

sjmackenzie commented 9 years ago

I have this issue too.

I presume conrod doesn't work on X and only supports Wayland?

The below is my default.nix file (I'm on NixOS), could someone please tell me what deps are missing.

   with import <nixpkgs> {};
   {
     conrodEnv = myEnvFun {
       name = "conrod";
       buildInputs = [ stdenv rustcMaster cargo xwayland freetype weston wayland ];

     };
   }
mitchmindtree commented 9 years ago

Hmmm do any of the glutin examples work for you? The all_widgets example uses a glutin window backend, so it should be compatible with whatever glutin is.

Otherwise, conrod should be compatible with a couple of other window backends (sdl2 or glfw) which might work for you?

Otherwise, the only non-rust dependency that I know of is freetype which I think is linked in the README.

Sorry about the trouble! It's hard to keep track of what is and isn't supported when everything is changing so often and I only have osx to test on.

sjmackenzie commented 9 years ago

Ah okay,

i'm getting this error with glutin :

[nix-shell:~/dev/fractalide/rust/glutin]$ cargo run --example window
     Running `target/debug/examples/window`
thread '<main>' panicked at 'called `Result::unwrap()` on an `Err` value: NoBackendAvailable(LibraryOpenError(OpenError { kind: Library, detail: "\"libX11.so: cannot open shared object file: No such file or directory\", \"libX11.so.6: cannot open shared object file: No such file or directory\"" }))', src/libcore/result.rs:736
An unknown error occurred

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

this is my default.nix now:

   with import <nixpkgs> {};
   {
     glutinEnv = myEnvFun {
       name = "glutin";
       buildInputs = [ stdenv rustcMaster cargo cairo glib xwayland freetype weston wayland glfw SDL2 x11 libcaca xorg.libX11];

     };
   }

I'll send this upstream. Cheers!

mitchmindtree commented 8 years ago

Closing as it seems like this was solved upstream

sjmackenzie commented 8 years ago

Yes! We're actually starting now on integrating conrod as our front end! Great work an your behemoth of a PR btw.

mitchmindtree commented 8 years ago

Oh wow, that's awesome to hear! Thanks a lot, and be sure to let us know if you have any issues, would be happy to help where we can :+1:

sjmackenzie commented 8 years ago

I'm curious: why not target https://www.khronos.org/vulkan/

Thanks for the offer to help!

mitchmindtree commented 8 years ago

@sjmackenzie conrod itself is agnostic over its window and graphics backends for portability, so there shouldn't be anything stopping anyone from implementing a vulkan backend. Speaking of which, I'm sure it's just a matter of time until we see a Vulkan backend for Graphics - it looks like the rust-gamedev IRC is already hard at work on vulkan bindings heh :)