Compile blender/mantaflow for share linux builds (need help)

I’m trying to compile the mantaflow build with static libraries so I can share the build.

In Ubuntu trusty 14.04

These are the steps I’m doing

$ sudo apt-get install git build-essential
$ git clone

$ cd blender/build_files/build_environment/

$ sed -i "s/STATIC\=OFF/STATIC\=ON/g" 
$ sed -i "s/STATIC_HDF5\=OFF/STATIC_HDF5\=ON/g"

$ ./

$ cd ../../../
$ sudo apt-get install checkinstall
$ wget
$ tar zxvf cmake-3.11.1
$ cd cmake-3.11.1
$ ./configure
$ make
$ sudo checkinstall
$ cd ../

$ cd blender
$ git branch 
$ git checkout fluid-mantaflow
$ git branch 
$ vim CMakeLists.txt and add this:

$ cd ../
$ mkdir blenderBuild
$ cd blenderBuild

$ make
$ make install

the whole process works and ends up compiling mantaflow without problems. The problem is when I try to share the blenderBuild folder with someone else who uses linux, for example when they are told that the libpng library is missing.

Example error:
error while loading shared libraries: cannot open shared object file: No such file or directory

and when run: ldd blender: => not found

Any suggestions or help? Thank you.

Unfortunately we don’t have an officially support way to build a static Blender. A few edits to the build script are unlikely to work.

There is a system to build static libraries that we use for our Windows and macOS builds, but it hasn’t been tested on many Linux distributions. Basically you just run:

make deps && make

And if it finishes succesfully you should have static libraries in ../lib/linux_x86_64 and a Blender build using them. It’s likely to need some edits to work on Ubuntu 14.04 though.

That missing library is quite common on some versions of Ubuntu.
I’ve encountered the same problem with DJV View in the past.

You can get the .deb for it from here:
It’s an official Ubuntu repo, but as always use it at your own risk.

Installing it does the trick for me though when I get that error.

1 Like