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

ch6/ch6-particles fails with missing libX11.so.6 #113

Open
t-taylor opened this issue Sep 12, 2023 · 1 comment
Open

ch6/ch6-particles fails with missing libX11.so.6 #113

t-taylor opened this issue Sep 12, 2023 · 1 comment

Comments

@t-taylor
Copy link

After executing cargo run I get the following error:

thread 'main' panicked at 'Failed to initialize any backend! Wayland status: NoWaylandLib X11 status: LibraryOpenError(OpenError { kind: Library, detail: "opening library failed (libX11.so.6: cannot open shared object file: No such file or directory); opening library failed (libX11.so: cannot open shared object file: No such file or directory)" })', /home/tom/.cargo/registry/src/index.crates.io-6f17d22bba15001f/winit-0.28.6/src/platform_impl/linux/mod.rs:757:9
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

As well as the first set of benchmark statements.

running on nixos with hyprland wayland window manager.

@t-taylor
Copy link
Author

The solution for me was to run in a nix-shell with the following shell.nix

{pkgs ? import <nixpkgs> {}}:
pkgs.mkShell {
  buildInputs = with pkgs; [cargo];
  shellHook = ''
    export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${
      with pkgs;
        lib.makeLibraryPath [
          libGL
          xorg.libX11
          xorg.libXi
          xorg.libXcursor
          xorg.libXrandr
        ]
    }"
  '';
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant