Compilation fails on Arch with OpenVDB

I am having trouble to compile blender using “make full”, unless I turn off OpenVDB in “blender_full.cmake”.

When I try do build with OpenVDB I get a ton of “error: undefined reference to 'openvdb::v6_0::io::[…]” messages.
This is how it starts:

[100%] Linking CXX executable …/…/bin/blender
…/…/lib/libbf_intern_openvdb.a( openvdb::v6_0::Grid<openvdb::v6_0::tree::Tree<openvdb::v6_0::tree::RootNode<openvdb::v6_0::tree::InternalNode<openvdb::v6_0::tree::InternalNode<openvdb::v6_0::tree::LeafNode<float, 3u>, 4u>, 5u> > > >::readTopology(std::istream&): error: undefined reference to ‘openvdb::v6_0::GridBase::saveFloatAsHalf() const’

Followed by this right at the end:

collect2: error: ld returned 1 exit status
make[3]: *** [source/creator/CMakeFiles/blender.dir/build.make:394: bin/blender] Error 1
make[2]: *** [CMakeFiles/Makefile2:7908: source/creator/CMakeFiles/blender.dir/all] Error 2
make[1]: *** [Makefile:163: all] Error 2
make: *** [GNUmakefile:273: all] Error 2

Any ideas what could be the cause of this?

I’m having a similar problem on Manjaro. I did a make clean and my build doesn’t work unless I delete openvdb with my package manager and use the --build-openvdb option in I’m using the make command provided by the script too. Maybe you could try that?

Building openvdb with fixes this issue for me, although it’s not a great solution (and I’m having a linking issue with blender after it’s built now too)

Thanks for chiming in. I also looked at your post. Possibly blender only compiles with openVDB version 5.1.0 at the moment. (?) I’ll try to downgrade and see what happens.

Yeah, I think that’s the issue, it looks like 5.1.0 is the version that is built in opt/lib/.

In case you run in to the other problem I was having, I fixed it by manually getting openshadinglanguage from the community repos.

I’m also using Manjaro. You need to enable WITH_OPENVDB_3_ABI_COMPATIBLE when building on any Arch based distro


Thank you Pablo! I just successfully built Blender with openVBD. :smile: script shows instructions to compile at the end when it finishes. I’m not sure if the script detects Arch, Manjaro distros and automatically adds this line WITH_OPENVDB_3_ABI_COMPATIBLE=ON in instructions at the end (Kubuntu user, can’t test). If it does not, it would be good if script add it in instructions at the end for those systems.