Use old pinned version of 3D software

Hello. I want to use blender 2.82. I found that the revision 528d35bec0cb976a06cc0e8487c6e5136400b16b does contain it, I can download it with nix-shell -p blender -I nixpkgs=https://github.com/NixOS/nixpkgs-channels/archive/528d35bec0cb976a06cc0e8487c6e5136400b16b.tar.gz , but when I try to run it, it return error with

/nix/store/lv06wbl6w86b5mf0dgds6kas1724715g-blender-2.82a/bin/blender: /nix/store/nwsn18fysga1n5s0bj4jp4wfwvlbx8b1-glibc-2.30/lib/libc.so.6: version `GLIBC_2.32' not found (required by /run/current-system/sw/lib/libpulse.so.0)
/nix/store/lv06wbl6w86b5mf0dgds6kas1724715g-blender-2.82a/bin/blender: /nix/store/nwsn18fysga1n5s0bj4jp4wfwvlbx8b1-glibc-2.30/lib/libc.so.6: version `GLIBC_2.32' not found (required by /nix/store/0l61klj6l9f3shxq2v2607c3pgx3bdd0-pulseaudio-13.0/lib/pulseaudio/libpulsecommon-13.0.so)
/nix/store/lv06wbl6w86b5mf0dgds6kas1724715g-blender-2.82a/bin/blender: /nix/store/nwsn18fysga1n5s0bj4jp4wfwvlbx8b1-glibc-2.30/lib/libc.so.6: version `GLIBC_2.32' not found (required by /run/current-system/sw/lib/libsystemd.so.0)
/nix/store/lv06wbl6w86b5mf0dgds6kas1724715g-blender-2.82a/bin/blender: /nix/store/nwsn18fysga1n5s0bj4jp4wfwvlbx8b1-glibc-2.30/lib/libc.so.6: version `GLIBC_2.32' not found (required by /nix/store/4pkjn2wwp81ycdikl1x64fnmg9jksszm-libasyncns-0.8/lib/libasyncns.so.0)

This seem to be because blender reference recent library that depend on GLIBC_2.32, but that this version can’t be loaded, as blender use 2.30. (not sure, as I don’t have a good knowledge in linux library). Does someone know how I can run it ? hello from the same revision does work.

what’s your

nix-info -m

I’ve tried this , it work alright in 20.03. Maybe some impurity in the libraries some where.

here is where it was bumped to 2.82, maybe try those?

there is a commit here for 20.09 that bumped it to 2.82

https://github.com/NixOS/nixpkgs/commit/8a2c2e48b40adab228a83ad673b9cb78cf6ad165

and this was cherry picked back into 20.03 here

https://github.com/NixOS/nixpkgs/pull/81036/commits/879ce0f9126a90e738d9c098a7bfbdfdf2a8334b

I tested here and it worked. I’m using NixOS-Unstable.

Okay, so here are the info (I’m using nixpkgs-unstable with flake):

 - system: `"x86_64-linux"`
 - host os: `Linux 5.8.17, NixOS, 21.03.20201030.3a12f85 (Okapi)`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 3.0pre20201020_e0ca98c`
 - channels(root): `"nixos-21.03pre251155.50957910fc3"`
 - channels(marius): `"home-manager, mariusnur, nur"`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos`

When I try 8a2c2e48b40adab228a83ad673b9cb78cf6ad165 (first commit with 2.82), It have the same error (

blender: /nix/store/8g1v3sf0xvf044sz1b4kcrg1i86z9bh7-glibc-2.30/lib/libc.so.6: version `GLIBC_2.32' not found (required by /run/current-system/sw/lib/libpulse.so.0)
blender: /nix/store/8g1v3sf0xvf044sz1b4kcrg1i86z9bh7-glibc-2.30/lib/libc.so.6: version `GLIBC_2.32' not found (required by /nix/store/0l61klj6l9f3shxq2v2607c3pgx3bdd0-pulseaudio-13.0/lib/pulseaudio/libpulsecommon-13.0.so)
blender: /nix/store/8g1v3sf0xvf044sz1b4kcrg1i86z9bh7-glibc-2.30/lib/libc.so.6: version `GLIBC_2.32' not found (required by /run/current-system/sw/lib/libsystemd.so.0)
blender: /nix/store/8g1v3sf0xvf044sz1b4kcrg1i86z9bh7-glibc-2.30/lib/libc.so.6: version `GLIBC_2.32' not found (required by /nix/store/4pkjn2wwp81ycdikl1x64fnmg9jksszm-libasyncns-0.8/lib/libasyncns.so.0)

I found that running it with pure shell actually does output a different error :

Read prefs: /home/marius/.config/blender/2.82/config/userpref.blend
libGL error: MESA-LOADER: failed to open radeonsi (search paths /run/opengl-driver/lib/dri)
libGL error: failed to load driver: radeonsi
libGL error: MESA-LOADER: failed to open radeonsi (search paths /run/opengl-driver/lib/dri)
libGL error: failed to load driver: radeonsi
libGL error: MESA-LOADER: failed to open swrast (search paths /run/opengl-driver/lib/dri)
libGL error: failed to load driver: swrast
Writing: /run/user/1001/blender.crash.txt
Segmentation fault (core dumped)

Maybe it’s driver related ? I use an integreted amd GPU.

Additionally, it lanch just fine with nvidia-offload blender on my nvidia GPU.

I have a similar comportement with blender 2.79 (glibc error with LD_LIBRARY_PATH standard, /build/blender-2.79b/intern/ghost/intern/GHOST_WindowX11.cpp:303: X11 glXChooseVisual() failed, verify working openGL system! with amd, and work with nvidia). That seem strange. Will spend some time searching why LD_LIBRARY_PATH is defined in the first time on nixos.

Also, this can’t run old version on amd is strange. blender 2.79 from blender-bin from nix-warez does actually work well once I update the lock file. The same goes for blender 2.82 if I change the src attribute of blender from the actual derivation. Will do a bisect for this.

did you get anywhere with this, this problem seems to be effecting a lot of AMD users right now :-(.

something has broken badly in either the drivers, openGL, libc or the gcc version to compile.

My best guess: the older version of Blender links against glibc 2.30, which get loaded. Blender also links against libGLX from libglvnd. We add the OpenGL run path to libGLX in libglvnd to be able to load the vendor OpenGL implementation (which is Mesa in the case of AMD GPUs):

This adds /run/opengl-driver/lib to the runpath. However, this contains the Mesa version of the current system, which is built against glibc 2.32 on your system. Then it fails with missing symbols (GLIBC_2.32) because the dynamic linker tries to resolve the vendor GLX symbols against the already-loaded glibc 2.30.

The reason that it works with NVIDIA drivers is that NVIDIA uses its own proprietary GL libraries, which are built against an old(er) glibc for compatibility across different distributions.

Possible workarounds are:

  • Build Blender 2.82 against the same nixpkgs version as your system was built from.
  • Get the Mesa mesa libraries from the same old nixpkgs revision and try to compel the libglvd mechanism to use these older libraries (perhaps it offers some way to override the libraries to be loaded).
  • Maybe it’s also possible to preload glibc 2.32 with LD_PRELOAD to force that glibc 2.32 is used.

General takeaway: mixing GL/Vulkan/OpenCL/… libraries/applications between nixpkgs versions generally doesn’t work because it relies on global state (/run/opengl-driver).

2 Likes

No, I didn’t continued working on this.

Thanks for an excellent description of the potential problems and work arounds… Life tough on the. cutting edge. or bleeding edge…or even ‘over the edge’…