How to build old blender 2.83

Hi, I need a very old blender version (4 years old) to use this plugin GitHub - eliemichel/MapsModelsImporter: A Blender add-on to import models from google maps. I tried overwriting the package version but building such an old package obviously failed. Using the flake at also didn’t help as it specifies the no longer supported edition field which makes the build fail. (see "error: flake ... has an unsupported attribute 'edition'" - #3 by akavel) Is there another way to build such an old package?

Kind regards,

It helps to use

{pkgs ? import <nixpkgs> {}}: let 
  xyz = import (fetchTarball {};
 in pkgs.mkShell {
    buildInputs = [xyz.blender];

as a default.nix, but then still I get X11 glXChooseVisual() failed, verify working openGL system! because my system is using a newer openGL version.

Yes, OpenGL programs tend to cause these issues. I tried two things so far:

  1. Locally clone Nixpkgs and checkout the old commit that contained the desired Blender version, copy the whole derivation to some new location, then check out the current version of Nixpkgs. Then add this new derivation to all-packages.nix (I called it “blender283”). The reason is that there probably were not only changes to the source, but also to the derivation itself that might make it impossible to just use the current derivation with older sources. I immediately hit the issue that ffmpeg_3 is no longer available, but switching this to ffmpeg_4 made the build start. I later saw failures, probably due to incompatible changes in updates of some of the used libraries. One might be able to get this to run, carefully getting libraries from the old Nixpkgs whenever there was an incompatible change but keep x11 libraries current. But honestly, Blender is so big with compile times that I didn’t want to put in this effort for a forum post. But maybe something you can pursue if you want to run this old version often.

  2. A shortcut if you only need this briefly was to build a NixOS VM image that contained Blender 2.83 using the very old Nixpkgs version. I had to replace the call to qemu-kvm (which would also refer to a very old qemu-version) with QEMU from my current machine in the resulting run-nixos-vm script, but this was surprisingly painless. So if you only need this very rarely and performance is not so important, this might be a viable course of action.

Looking at the latest release of the package, it expects Blender 4.1? Are you sure you really need such an old version?

As per @jtojnar’s sentiment, I don’t see why the plugin wouldn’t work with a newer Blender. That said, the flake bug concerns nothing more than flakes. Something like the following should work:

NIXPKGS_ALLOW_UNFREE=1 nix build -f '<nixpkgs>' -I nixpkgs= blender

EDIT: Sorry, I missed the fetchTarball comment

get X11 glXChooseVisual() failed, verify working openGL system!

Try checking the output of LD_DEBUG=libs blender.
Do you have hardware.opengl.enable set? Does /run/opengl-driver/lib exist?..

The most obvious issue you’d run into trying to use software from such an old revision is libc/libstdc++ compatibility (blender might pre-load an old libc, the driver expects a newer one). Since you already have an mkShell, you could just set an LD_PRELOAD there if you discover that that was the issue

It is often very useful to have old versions of Blender available because Python plugins tend to break often and many niche plugins are never really updated.

For this reason I actually do have some code for using old versions of Blender, though 1. please be advised there are likely unpatched security issues 2. I can’t guarantee these will continue to build and work in the future, or that they work 100%. Still, I do actually have a working build of 2.83 so here it is. GitHub - jchv/nix-blender-legacy: Old versions of Blender in newer versions of NixOS/Nixpkgs.

Another viable approach would probably be to use another distribution method like Flatpak.

1 Like

Thank you very much for your efforts! It already is way too much effort for some random stranger on the internet :joy: Really appreciate it though! :>

The installation page of that maps plugin still references 2.83, but as @jtojnar pointed out, the last official release targets v.4.1 so I will just use that and create an issue on the repository. Thanks to all of you who tried to help me here :slight_smile:

This post was flagged by the community and is temporarily hidden.