Which Linux distribution to use for building a deb?

Hello friends,

I usually use Ubuntu to build my custom Blender version. But i run into problems with nearly every point update since a pretty while. Especially with producing a compatible version that runs also at other distributions. From Ubuntu 20.04 to 20.10 they introduced a newer glibc for example. And Debian users couldn’t use it then.

Meanwhile we are long at Ubuntu version 21. And i tried to update Cuda at my 20.04 before a few moments. Just to find out that this doesn’t work anymore since the official Ubuntu repository for it is now deprecated. It simply doesn’t install Cuda. And so i would be stuck in either the current old Cuda version. Or i would need to migrate to Ubuntu 21. With the usual result that the deb just runs at Ubuntu 21 again then. And not at other Linux distributions that are a bit more conservative with their packages …

And so i search for a substitute.

I know that the Blender buidbot still compiles at an old version of Centos. But Centos has migrated to a rolling release. And i am not sure if i don’t run into the same trouble again with this rolling release. Since this means to have always the newest packages.

So what are your recommendations? Which Linux distribution is best suited to create Blender debs at that runs also at other Linux distributions?

Kind regards

To build portable versions that work in other distros and/or in the same distro when it updates libraries, it is recommended that you use precompiled libraries according to the instructions in Blender manual (Download Libraries step):

Libraries are downloaded (about 3.5GB) in the “lib” folder. If you followed Blender’s manual instructions for downloading blender sources, you should not move the “lib” folder to another location because otherwise when building blender it will not attempt to use precompiled libraries. “make update” will update libraries too when appropriate.

To match the options to how buildbots builds are built you can run from the “build_linux” folder (you write your correct path ):
cmake . -C '/WHERE_YOU_HAVE_BLENDER_SOURCES/blender/build_files/buildbot/config/blender_linux.cmake'

And to make sure that system libraries in /usr are not used:
cmake . -DCMAKE_IGNORE_PATH=/usr

Anyway when I build also from cmake-gui I disable any string beginning with “WITH_SYSTEM” like “WITH_SYSTEM_GLES”, “WITH_SYSTEM_GLEW”, etc. And enable “WITH_STATIC_LIBS”, “LLVM_STATIC” and “WITH_OPENMP_STATIC”

CUDA and OptiX are not included in the libraries, you still need to have the CUDA Toolkit installed and you should point to the “include” folder where you downloaded OptiX 7.3.


Yes i know, thanks. I know how to build, i build since years. As told, currently at Ubuntu 20.04. HIP, Optix and Cuda included.

It’s about the recommended Linux distribution since Ubuntu is not the best distribution for this purpose. When i build a deb at Ubuntu 21 then it will most probably not start at a Debian for example since the glibc version is too new :slight_smile:

There is no Linux distribution where you can both upgrade to the latest version and get builds compatible with older distributions.

It may be best to use a virtual machine with an older distribution.

Many thanks Brecht :slight_smile: