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

libX11 not found. #642

Closed
sjmackenzie opened this issue Oct 22, 2015 · 4 comments
Closed

libX11 not found. #642

sjmackenzie opened this issue Oct 22, 2015 · 4 comments

Comments

@sjmackenzie
Copy link

Ah okay,

i'm getting this error with glutin :

[nix-shell:~/dev/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 (NixOS) now:

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

     };
   }

Cheers!

@tomaka tomaka added the A-x11 label Oct 22, 2015
@tomaka
Copy link
Contributor

tomaka commented Oct 22, 2015

Maybe @eddyb has an idea?

@sjmackenzie
Copy link
Author

@eddyb I read your IRC messages, a fellow nixer, would you mind if you copied your default.nix into this issue please. Thanks @tomaka.

@eddyb
Copy link

eddyb commented Oct 23, 2015

The file in question (currently) lives at https://github.com/eddyb/r3/blob/master/default.nix, and it contains:

let
   pkgs = import <nixpkgs> {};
in pkgs.stdenv.mkDerivation rec {
  name = "r3-env";
  buildInputs = [ pkgs.freetype ];
  LD_LIBRARY_PATH = with pkgs.xlibs; "${pkgs.mesa}/lib:${libX11}/lib:${libXcursor}/lib:${libXxf86vm}/lib:${libXi}/lib";
}

Just to get glutin working, only this would be necessary:

let
   pkgs = import <nixpkgs> {};
in pkgs.stdenv.mkDerivation rec {
  name = "glutin-env";
  LD_LIBRARY_PATH = with pkgs.xlibs; "${pkgs.mesa}/lib:${libX11}/lib:${libXcursor}/lib:${libXxf86vm}/lib:${libXi}/lib";
}

@sjmackenzie
Copy link
Author

Yes, worked like a charm, good man!

rsaarelm added a commit to rsaarelm/magog that referenced this issue Aug 6, 2018
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

3 participants