Opening links in brave from discord is broken: (version `GLIBC_2.34' not found)

When clicking on a link in discord, nothing happens. When checking the journalctl log I find tons of errors like these spammed to the console:

Apr 21 16:36:57 DovDev discord.desktop[23511]: /nix/store/gla5ybqv0xgzrq6qkvvlsk89kcjw98j5-brave-1.37.113/opt/brave.com/brave/brave: /nix/store/g02b1lpbddhymmcjb923kf0l7s9nww58-glibc-2.33-123/lib/libc.so.6: version `GLIBC_2.34' not found (required by /nix/store/3ma88r781fvsjiakwyfh95mzy7k19jac-glib-2.72.0/lib/libglib-2.0.so.0)
Apr 21 16:36:57 DovDev discord.desktop[23511]: /nix/store/gla5ybqv0xgzrq6qkvvlsk89kcjw98j5-brave-1.37.113/opt/brave.com/brave/brave: /nix/store/g02b1lpbddhymmcjb923kf0l7s9nww58-glibc-2.33-123/lib/libc.so.6: version `GLIBC_2.34' not found (required by /nix/store/gp9zlsw9m06r5n5v0i304mkqc1n5kkxz-nspr-4.33/lib/libnspr4.so)
Apr 21 16:36:57 DovDev discord.desktop[23511]: /nix/store/gla5ybqv0xgzrq6qkvvlsk89kcjw98j5-brave-1.37.113/opt/brave.com/brave/brave: /nix/store/g02b1lpbddhymmcjb923kf0l7s9nww58-glibc-2.33-123/lib/libc.so.6: version `GLIBC_2.34' not found (required by /nix/store/kal2vyxj49n0sfmf635h304hp96d81ia-cups-2.4.1-lib/lib/libcups.so.2)
Apr 21 16:36:57 DovDev discord.desktop[23511]: /nix/store/gla5ybqv0xgzrq6qkvvlsk89kcjw98j5-brave-1.37.113/opt/brave.com/brave/brave: /nix/store/g02b1lpbddhymmcjb923kf0l7s9nww58-glibc-2.33-123/lib/libc.so.6: version `GLIBC_2.34' not found (required by /nix/store/3ma88r781fvsjiakwyfh95mzy7k19jac-glib-2.72.0/lib/libgio-2.0.so.0)
Apr 21 16:36:57 DovDev discord.desktop[23511]: /nix/store/gla5ybqv0xgzrq6qkvvlsk89kcjw98j5-brave-1.37.113/opt/brave.com/brave/brave: /nix/store/g02b1lpbddhymmcjb923kf0l7s9nww58-glibc-2.33-123/lib/libc.so.6: version `GLIBC_2.34' not found (required by /nix/store/iykihwcyn1vwi1h2lfbqawpl497xckhn-dbus-1.12.20-lib/lib/libdbus-1.so.3)
Apr 21 16:36:57 DovDev discord.desktop[23511]: /nix/store/gla5ybqv0xgzrq6qkvvlsk89kcjw98j5-brave-1.37.113/opt/brave.com/brave/brave: /nix/store/g02b1lpbddhymmcjb923kf0l7s9nww58-glibc-2.33-123/lib/libc.so.6: version `GLIBC_2.34' not found (required by /nix/store/0np4qysvv5v05w49bs3ii123gckd4n0b-libX11-1.7.2/lib/libX11.so.6)

I am on nixos-21.11 and my nix flake metadata output is:

Inputs:
├───emacs-overlay: github:nix-community/emacs-overlay/fef4e2e46ee8e42b68571cabc0bd73998e0d078f
├───home-manager: github:nix-community/home-manager/7244c6715cb8f741f3b3e1220a9279e97b2ed8f5
│   └───nixpkgs follows input 'nixpkgs'
├───nix-matlab: gitlab:doronbehar/nix-matlab/c4d76725db538b812bf01091adec87beaca93c15
│   ├───flake-compat: github:edolstra/flake-compat/b4a34015c698c7793d592d66adbab377907a2be8
│   └───nixpkgs: github:NixOS/nixpkgs/b06d35b406c2396dd1611dc8601138fa3d06ee60
├───nixos-hardware: github:NixOS/nixos-hardware/6b4ebea9093c997c5f275c820e679108de4871ab
├───nixpkgs: github:nixos/nixpkgs/9887f024766aa27704d1f89f623efd1d063da92a
├───sops-nix: github:Mic92/sops-nix/c2614c4fe61943b3d280ac1892fcebe6e8eaf8c8
│   └───nixpkgs: github:NixOS/nixpkgs/78cb77b29d37a9663e05b61abb4fa09465da4b70
└───unstable: github:nixos/nixpkgs/1ffba9f2f683063c2b14c9f4d12c55ad5f4ed887

Anyone have any ideas?

I’m assuming that some of the unstable packages were linked against glibc 2.34. This is a problem because glibc is only backwards compatible. So if your system is using glibc 2.33, then it can’t guarantee that it will work with a new version of glibc.

The solution, either:

  • Have your system use the latest glibc by default (would probably require to use nixos-unstable)
  • Set LD_PRELOAD to the latest glibc version, so that the most compatible version is the one that gets loaded into memory first.

Taking a step back though, you should need to pull discord from nixos-unstable, the backports should be getting followed up closely to the master PR. And in general the stable branches get more frequent updates as there’s less build pressure on the CI end-of-things.

Have your system use the latest glibc by default (would probably require to use nixos-unstable) - that sounds good. Is there a setting?

maybe I’ll just go back to an earlier version of the OS which works and wait till it gets better…

can’t roll back home manager due to glibc version. woe is me.
I cans see we have this packaged: glibc-2.34-115 but you can’t just use that as a package name alas.

UPDATE deleted glibcLocales that was in confguration.nix and I think it then upgraded itself nicely.