Run-Time EGL Error: "Failed to Open Swrast" (Nix) -


1 context

i have private repo builds via nix (in case matters, repo haskell + stack project). in particular, repo has low-level graphics dependencies, including (at top level):

buildinputs = pkgs; [ mesa                            xorg.pixman                            wayland-protocols                            wayland                            xorg.libx11                            dbus                            weston                           ]; 

and system i'm building repo on arch linux machine (with nix installed outside package manager).

2 problem

the program compiles fine, when launch soul-crushing run-time error:

loading module '/nix/store/98ipsxd20n5nw71q1kjpb5kyr55ysx7y-weston-2.0.0/lib/libweston-2/x11-backend.so' loading module '/nix/store/98ipsxd20n5nw71q1kjpb5kyr55ysx7y-weston-2.0.0/lib/libweston-2/gl-renderer.so' egl client extensions: egl_ext_client_extensions egl_ext_platform_base                egl_khr_client_get_all_proc_addresses egl_khr_debug                egl_ext_platform_wayland egl_ext_platform_x11                egl_mesa_platform_gbm libegl warning: dri2: failed authenticate libegl warning: dri2: failed open swrast (search paths /run/opengl-driver/lib/dri) failed initialize display egl error state: egl_not_initialized (0x3001) socket: wayland-0  program-name: user error (failed compiling shader shader {shaderid = 0}) 

3 inelegant solution

the issue it's searching in /run/opengl-driver/lib/dri, nixos specific path. in fact -- when build , launch program on secondary nixos system, compiles , runs fine.

a horrendous hack fix issue on non-nixos systems run:

sudo ln -s /nix/store/*-mesa-noglu-*-drivers /run/opengl-driver 

question: there more elegant, nixish solution problem?

sorry, open problem @ time of writing.

https://github.com/nixos/nixpkgs/issues/9415


Comments

Popular posts from this blog

ios - MKAnnotationView layer is not of expected type: MKLayer -

ZeroMQ on Windows, with Qt Creator -

unity3d - Unity SceneManager.LoadScene quits application -