Anonymous user
How to give Nix software access to native libraries when running Nix package manager on a non-NixOS distribution: Difference between revisions
How to give Nix software access to native libraries when running Nix package manager on a non-NixOS distribution (view source)
Revision as of 14:47, 14 January 2018
, 14 January 2018no edit summary
imported>Pkillnine (added draft introduction and explanation) |
imported>Mic92 No edit summary |
||
Line 4: | Line 4: | ||
A commonly required native distribution library is a custom LibGL library packaged with Nvidia's proprietary GPU drivers which is required in order for 3D applications to work with these drivers. Example errors: | A commonly required native distribution library is a custom LibGL library packaged with Nvidia's proprietary GPU drivers which is required in order for 3D applications to work with these drivers. Example errors: | ||
<code>error while loading shared libraries: libGL.so.1: cannot open shared object file: No such file or directory</code> | |||
<syntaxHighlight> | |||
libGL error: unable to load driver: i965_dri.so | |||
libGL error: driver pointer missing | |||
libGL error: failed to load driver: i965 | |||
libGL error: unable to load driver: i965_dri.so | |||
libGL error: driver pointer missing | |||
libGL error: failed to load driver: i965 | |||
libGL error: unable to load driver: swrast_dri.so | |||
libGL error: failed to load driver: swrast [glfw error 65543]: | |||
GLX: Failed to create context: GLXBadFBConfig Failed to create a window a | |||
</syntaxHighlight> | |||
To solve this, we make a copy of these needed native system libraries, patch them to look for any libraries *they* need in the distribution's native libraries (I assume Nix software then learns to delegate library search locations to the libs), and finally we tell the Nix-packaged software to look for their needed libraries in this folder containing our native libraries (which have in turn been patched to look for their own dependencies in our native distribution's library path). | To solve this, we make a copy of these needed native system libraries, patch them to look for any libraries *they* need in the distribution's native libraries (I assume Nix software then learns to delegate library search locations to the libs), and finally we tell the Nix-packaged software to look for their needed libraries in this folder containing our native libraries (which have in turn been patched to look for their own dependencies in our native distribution's library path). |