# Getting an error, has anything regarding OpenGL in nixpkgs?

**URL:** https://discourse.nixos.org/t/getting-an-error-has-anything-regarding-opengl-in-nixpkgs/3641
**Category:** Uncategorized
**Created:** [August 7, 2019, 6:47am UTC](https://discourse.nixos.org/t/getting-an-error-has-anything-regarding-opengl-in-nixpkgs/3641 "2019-08-07T06:47:30Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![pimiddy](https://discourse.nixos.org/user_avatar/discourse.nixos.org/pimiddy/32/2308_2.png) [@pimiddy](https://discourse.nixos.org/u/pimiddy)
#### Post date: [August 7, 2019, 6:47am UTC](https://discourse.nixos.org/t/getting-an-error-has-anything-regarding-opengl-in-nixpkgs/3641/1 "2019-08-07T06:47:30Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![vcunat](https://discourse.nixos.org/user_avatar/discourse.nixos.org/vcunat/32/11_2.png) [@vcunat](https://discourse.nixos.org/u/vcunat)
#### Post date: [August 7, 2019, 10:21am UTC](https://discourse.nixos.org/t/getting-an-error-has-anything-regarding-opengl-in-nixpkgs/3641/2 "2019-08-07T10:21:38Z")

</div>

IIRC some older nixpkgs builds might stop finding GL libs without LD\_LIBRARY\_PATH. Relatively recent builds should be OK.

---

<div class="post-metadata">

### Author: ![matthewbauer](https://discourse.nixos.org/user_avatar/discourse.nixos.org/matthewbauer/32/31_2.png) [@matthewbauer](https://discourse.nixos.org/u/matthewbauer)
#### Post date: [August 8, 2019, 2:59pm UTC](https://discourse.nixos.org/t/getting-an-error-has-anything-regarding-opengl-in-nixpkgs/3641/3 "2019-08-08T14:59:09Z")

</div>

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:

> <https://github.com/NixOS/nixpkgs/blob/7803ff314c707ee11a6d8d1c9ac4cde70737d22e/nixos/modules/hardware/opengl.nix#L125>

---

<div class="post-metadata">

### Author: ![vcunat](https://discourse.nixos.org/user_avatar/discourse.nixos.org/vcunat/32/11_2.png) [@vcunat](https://discourse.nixos.org/u/vcunat)
#### Post date: [August 9, 2019, 1:53pm UTC](https://discourse.nixos.org/t/getting-an-error-has-anything-regarding-opengl-in-nixpkgs/3641/4 "2019-08-09T13:53:18Z")

</div>

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)

---

<div class="post-metadata">

### Author: ![worldofpeace](https://discourse.nixos.org/user_avatar/discourse.nixos.org/worldofpeace/32/245_2.png) [@worldofpeace](https://discourse.nixos.org/u/worldofpeace)
#### Post date: [September 15, 2019, 9:49pm UTC](https://discourse.nixos.org/t/getting-an-error-has-anything-regarding-opengl-in-nixpkgs/3641/5 "2019-09-15T21:49:32Z")

</div>

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

```auto
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.

---

<div class="post-metadata">

### Author: ![NilsIrl](https://discourse.nixos.org/user_avatar/discourse.nixos.org/nilsirl/32/2330_2.png) [@NilsIrl](https://discourse.nixos.org/u/NilsIrl)
#### Post date: [October 19, 2019, 4:04pm UTC](https://discourse.nixos.org/t/getting-an-error-has-anything-regarding-opengl-in-nixpkgs/3641/6 "2019-10-19T16:04:57Z")

</div>

I seem to have this problem on 19.09
