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 https://git.blender.org/blender.git
$ cd blender/build_files/build_environment/
$ sed -i "s/STATIC\=OFF/STATIC\=ON/g" install_deps.sh
$ sed -i "s/STATIC_BOOST\=OFF/STATIC_BOOST\=ON/g" install_deps.sh
$ sed -i "s/STATIC_HDF5\=OFF/STATIC_HDF5\=ON/g" install_deps.sh
$ ./install_deps.sh
$ cd ../../../
$ sudo apt-get install checkinstall
$ wget https://cmake.org/files/v3.11/cmake-3.11.1.tar.gz
$ 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:
SET(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE)
SET(CMAKE_INSTALL_RPATH "$ORIGIN/lib")
$ cd ../
$ mkdir blenderBuild
$ cd blenderBuild
$ cmake -WITH_STATIC_LIBS=ON -DWITH_CXX11=ON -DGUI=OFF -DOPENMP=ON -DWITH_FFTW3=ON -DWITH_MOD_OCEANSIM=ON -DWITH_ALEMBIC=ON ../blender
$ 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: libpng12.so.0: cannot open shared object file: No such file or directory
and when run: ldd blender:
libpng12.so.0 => not found
Any suggestions or help? Thank you.