Blog : How to run blender 2.80 on ubuntu 14.04: the complete answer

Wednesday March 13, 2019


So you have that old and trusty (!) Ubuntu 14.04 box on which you want to run the latest and greatest Blender 2.80-beta. Download blender, untar, run the binary and...

./blender: error while loading shared libraries: libmvec.so.1: cannot open shared object file: No such file or directory

Great. Now what? If you're lucky the answer is on StackExchange but that one didn't work well for me because glibdc-2.24 didn't compile, complaining about warnings that were treated as errors. To fix those I found ap page un Russian and another one in Chinese that gave good tips. Here they are combined in all their glory, with added personal fixed for what those two pages didn't answer.

There's a few problems with the glibc source code, which TBH was written a little on the border of what is generally considered safe in C. Thus if you have a newer compiler it will throw warnings. Let's fix them. As per StackExchange, do this first:

----------8<----------
cd ~
wget https://ftp.gnu.org/gnu/libc/glibc-2.24.tar.gz
tar -xvzf ./glibc-2.24.tar.gz
cd glibc-2.24
mkdir _build
cd _build
../configure --enable-kernel=8.0 --prefix=/usr
---------->8----------

This will fail saying your kernel headers are no bueno:

----------8<----------
(...)
running configure fragment for sysdeps/unix/sysv/linux
checking installed Linux kernel header files... 3.2.0 or later
checking for kernel header at least 8.0... too old!
configure: error: *** The available kernel headers are older than the requested
*** compatible kernel version
---------->8----------

Just re-run ./configure, replacing the 8.0 (which would obviously not work, latest kernel is ~5 as of today) by the version mentioned just above, in this case 3.2.0. Then run make with -j in order to avoid waiting for hours:

----------8<----------
../configure --enable-kernel=3.2.0 --prefix=/usr
make -j 8
---------->8----------

This fails in a number of places that you can either discover successively or solve all at once using the following changes:

  • In glibc-2.24/sysdeps/ieee754/dbl-64/e_pow.c, add parentheses and !=0 around some conditions at the very end of the file (line 469~):
    ----------8<----------
    -      if (n << (k - 20))
    +      if ((n << (k - 20))!=0)
    	return 0;		/* if not integer */
    -      return (n << (k - 21)) ? -1 : 1;
    +      return ((n << (k - 21))!=0) ? -1 : 1;
        }
      if (n)
        return 0;			/*if  not integer */
      if (k == 20)
        return (m & 1) ? -1 : 1;
    -  if (m << (k + 12))
    +  if ((m << (k + 12))!=0)
        return 0;
    -  return (m << (k + 11)) ? -1 : 1;
    +  return ((m << (k + 11))!=0) ? -1 : 1;
    }
    ---------->8----------
    
  • In glibc-2.24/sunrpc/rpc_parse.c, change line 524:
    ----------8<----------
    -  char name[10];		/* argument name */
    +  char name[MAXLINESIZE];		/* argument name */
    ---------->8----------
    
  • Finally, in glibc-2.24/nis/nss_nisplus/nisplus-alias.c, remove some strings from the printed formats on line 300~:
    ----------8<----------
    -  char buf[strlen (name) + 9 + tablename_len];
    +  char buf[9 + tablename_len];
      int olderr = errno;
    
    -  snprintf (buf, sizeof (buf), "[name=%s],%s", name, tablename_val);
    +  snprintf (buf, sizeof (buf), "[name=],%s", tablename_val);
    ---------->8----------
    

That's all. Now the only thing that remains is to run blender, linking those libraries properly. To do so, use symlinks (or hard copy) in the lib/ directory of blender:

----------8<----------
cd blender-2.80/lib/
ln -s ~/glibc-2.24/_build/math/libm.so.6
ln -s ~/glibc-2.24/_build/mathvec/libmvec.so.1
---------->8----------

Then have the linker find the libraries when you launch blender. I use a shell script but there are other solutions. Here's my blender.sh:

----------8<----------
#!/bin/sh
export LD_LIBRARY_PATH=/opt/blender-2.80/lib/
exec /opt/blender-2.80/blender "$@"
---------->8----------

You will have to adapt it to point to your blender directory, but that's it! It Vorks™ !

2019-03-03 << >> 2019-04-07