Updating install_deps.sh with static libs

Hi devs,

I’ve recently taken a dive into install_deps.sh to produce a (more) portable build with static libraries.

I’ve opened a task with a couple minor fixes loosely related to these patches.

I don’t want to pollute phab with extra patches, so I will post the remainder here for discussion.

Simple patches:

More involved:

  • VDB - The issue is that building static VDB does not include blosc in the archive, and blender is not set up to link against blosc. I merely added the blosc libs to the VDB lib list and moved FindBlosc.cmake from build_files/build_environment/patches/cmake/modules to build_files/cmake/Modules.
    With the cmake portion applied, I have been able to build blender against both static and dynamic VDB. The only test I haven’t done is with dynamic blosc (with either dynamic or static VDB).

  • EXR is more controversial. It cannot be built as a static lib without a commit that was not included in 2.2.0 or 2.2.1 releases. My solution for now is to build from the official master branch. From what I can gather, master has largely remained close to 2.2.0 release, with some bug and security fixes applied (2.2.1 pushed security fixes). I enabled building from the given repo, pointed to the official repo and pointed the hash to the current head.

i’ll admit, given i’m on the windows platform side of things i’m not entirely up to date on the linux libs situation.

If you’re looking to build a complete set of static libs, wouldn’t the cmake based deps build we use for windows/mac me an easier start? (or maybe already able to produce the set of libs you need).

i know brecht added linux support to it, but i’m unsure if it’s building fully static libs or not.

I’ll take a look into that. I’ve only peeked into cmake files a few times before this, so I will learn what I can. install_deps is accessible to me because I’m familiar with bash and it isn’t required to work on multiple platforms; it’s only for linux. Thanks for pointing out the cmake system.

It has only been tested on Ubuntu, but running make deps && make is supposed to give you a static build. If you look at how this cmake based system works there’s a lot of build flags and patching going on to make it all work.

The only thing that’s not fully static is some Python modules (maybe only used by addons?).