Getting an error, has anything regarding OpenGL in nixpkgs?

Since updating yesterday, I cannot start my OpenGL application anymore. GL initialization seems to fail, although I cannot get an error message just yet, so I’m asking very generally: Has anything changed in regard to OpenGL library handling in nixpkgs? I’m noticing that LD_LIBRARY_PATH seems a bit smaller now.

1 Like

IIRC some older nixpkgs builds might stop finding GL libs without LD_LIBRARY_PATH. Relatively recent builds should be OK.

Hmmm… perhaps we got rid of the LD_LIBRARY_PATH paths a little bit too early. It will mean you can’t use pre-19.09 GL apps on NixOS 19.09. It’s not too hard to get into this situation if you utilize pinning in your projects. I would propose making hardware.opengl.setLdLibraryPath true for 19.09 and maybe planning to change the default to false for 20.03.

There is an option you can set manually:

I thought the nixpkgs had to be much older for GL to break, somewhere when we switched to linking against libglvnd stubs – and only the OS-level stuff like drivers needed the later work. (@ambrop72 might remember but apparently isn’t on this forum)

Just a heads up to users on unstable where this is still disabled, you can use the following:

hardware.opengl.setLdLibraryPath = true; 

to get the old behavior.

If you plan to use the upcoming 19.09 release the change has been reverted there, so the aforementioned should be unneeded.

2 Likes

I seem to have this problem on 19.09