[Nix-dev] dlopen and mesa-likes

Mateusz Kowalczyk fuuzetsu at fuuzetsu.co.uk
Fri Aug 8 23:30:12 CEST 2014


On 08/08/2014 11:22 PM, Luca Bruno wrote:
> Use /run/opengl-driver. It only works in nixos, and after all, it only
> makes sense with nixos because of drivers.
> 

Unfortunately /run/opengl-driver/lib contains neither libEGL.so nor
libGLESv2.so. Do you know how to proceed? Does this means that there is
just no support for these things from nVidia and I need another driver?

FTR using exactly
/nix/store/g1zgabwcbckwlsg2fiss1y3c1a6gas1v-nvidia-x11-340.24-3.12.26

Out of interest, is there a solution which would work both on NixOS and
on setups with just nixpkgs?

> On Fri, Aug 8, 2014 at 11:18 PM, Mateusz Kowalczyk <fuuzetsu at fuuzetsu.co.uk>
> wrote:
> 
>> Hi,
>>
>> I have some software here that I'm trying to package. At first it all
>> went smooth but then it didn't run. It was narrowed down to the use of
>> dlopen in the source files. So currently I have something like this.
>>
>>   preConfigure = ''
>>     sed -i "s at libX11.so@${libX11}/lib/libX11.so at g" src/backend/x11.c
>>     sed -i "s at libX11-xcb.so@${libX11}/lib/libX11-xcb.so at g"
>> src/backend/x11.c
>>     sed -i "s at libxcb.so@${libxcb}/lib/libxcb.so at g" src/backend/x11.c
>>     #sed -i "s at libEGL.so@${mesa}/lib/libEGL.so at g" src/context/egl.c
>>     #sed -i "s at libGLESv2.so@${mesa}/lib/libGLESv2.so at g" src/render/gles2.c
>>   '';
>>
>> Now, the upstream should probably provide configure flags for these
>> things and I spoke with the developer already but my problem is
>> elsewhere: you'll notice I commented out the last 2 lines. The reason is
>> that I'm running nVidia binary blob and I have no idea how to handle it
>> from here. Even if there were flags for each of these things to specify
>> the path ourselves, what would I pass it? How do I get the path of
>> <whatever-user-is-running>/lib/libEGL.so to substitute in? What is the
>> correct solution? Even if I wanted a hacky-works-for-me solution for
>> now, what would I specify as a dependency if I'm running the blob? There
>> is something called nvidia_x11 but that's scoped under the kernel
>> modules in all-packages.nix and I can't refer to it and again, that
>> would only work for me and not someone running other driver.
>>
>> There is one other thread about dlopen on NixOS but it does not talk
>> about this specific issue. The NixOS manual has a mention of dlopen in
>> OpenGL context but mesa is used there: it's only for sake of example there.
>>
>> Thanks
>>
>> --
>> Mateusz K.
>> _______________________________________________
>> nix-dev mailing list
>> nix-dev at lists.science.uu.nl
>> http://lists.science.uu.nl/mailman/listinfo/nix-dev
>>
> 
> 
> 


-- 
Mateusz K.


More information about the nix-dev mailing list