[Bf-committers] Building with OpenVDB and OSL: a Boost case

Kévin Dietrich kevin.dietrich at mailoo.org
Mon Jun 15 04:09:09 CEST 2015


 

Hi all, 

I mail here because it can affect anyone who builds Blender, not just
the Cycles freaks ;) 

As a reminder, OpenVDB is making use of, and relies on libraries making
use of, C++ built-in run-time type information (RTTI). On the other
hand, LLVM (used by OSL) has a home brew version and does not want to
hear about the built-in one by default. 

The most straightforward way to address this is by building LLVM with
RTTI enabled, and build OSL accordingly. 

But that's maybe not a possibility (because of a lot of reasons), so
RTTI usage in VDB will need to be taken care of. By compiling Cycles
with both VDB and OSL it appears that most RTTI symbols that give issues
are in everyone's favorite library: Boost (I have version 1.54 here).
There's also one in TBB, but it can be avoided by disabling the use
exceptions there. 

Although patching OpenVDB so it compiles fine with RTTI disabled is a
no-brainer (~10 changes), we will need to upgrade boost to at least
version 1.57. Which should also comprise the fix for the Windows compile
issue raised by Antony. 

I've just installed it, and as far as I can tell, it seems to work fine
(_YMMV_). I've forked the openvdb repository, so to test things out you
can get my changes from there (https://github.com/diekev/openvdb [1]) in
the 'cycles_fixes' branch (it will also contain fixes for implicit float
conversions happening in the library, which make Cycles grumpy). So if
we go with boost 1.57, or above, and everything goes fine on all
platforms, I'll make a pull request. 

That's it from me for the moment,
Cheers,
Kévin. 
 

Links:
------
[1] https://github.com/diekev/openvdb


More information about the Bf-committers mailing list