Skip to the text
KDOS
Menu
kdos.dev KDOS from Scratch KDOS 0.2 · 4dd4a10 · 2026-11-30 Contents Index

196.5. openvdb-13.0.0

OpenVDB and NanoVDB: sparse volumes — Blender's smoke, fire and volume objects

Version 13.0.0, release 2
Shelf 3d — 3D modelling, animation, voxel and mesh tools and libraries, and scientific visualisation
Phase 42_graphics (Graphics Stack), 21 of 189 in build order
Licence Apache-2.0
Homepage https://www.openvdb.org/
Build time 34.7 SBU
Installed size 74.1 MiB in 265 files
Recipe ports/core/3d/openvdb/kpkgbuild

About

OpenVDB is the sparse volume format and library for smoke, fire, clouds and other volumetric data, and NanoVDB is its compact read-only form for renderers. Blender reads and writes volumes through OpenVDB, and its Cycles renderer compiles against the NanoVDB headers; OpenImageIO and PrusaSlicer link the library too. The package carries the core library, the vdb_print tool, the NanoVDB headers and the Python module.

Sources

Dependencies

Depends on: cmake, ninja, onetbb, c-blosc, zlib, python3, python3-nanobind.

Required by (3): blender, openimageio, prusaslicer.

Optional, off in KDOS

These switches in build.sh turn off a feature whose library is a port here. The recipe may turn each off on purpose, or because the library was not yet a port when the recipe was written; this list cannot tell which.

Patches

build.sh applies these; kpkg applies nothing by itself.

Installation

From the repository root, inside the build container, this is the line kdosbuild runs for the port:

script/chroot/exec.sh bash -c 'source script/phases/42_graphics/phase.env && kpkg install openvdb'

What kpkg does

kpkg runs these steps, in this order, as root inside the chroot. The port directory is /ports/core/3d/openvdb.

1. Verify every declared source. Each file a sha256 = line names, found in the port directory or in /var/cache/kpkg/sources, must hash to its line; a mismatch stops the build before anything is unpacked.

cd /ports/core/3d/openvdb
echo '4d6a91df5f347017496fe8d22c3dbb7c4b5d7289499d4eb4d53dd2c75bb454e1  openvdb-13.0.0.tar.gz' | sha256sum -c -

2. Unpack. The work directory is emptied and the first source is unpacked into $SRC with its top directory stripped; any later tarball lands unstripped beside it in $SRC_ROOT, and a file that is not a tarball is copied into $SRC.

SRC_ROOT=/var/cache/kpkg/work/openvdb
SRC=$SRC_ROOT/openvdb-13.0.0
PKG=$SRC_ROOT/pkg
rm -rf "$SRC_ROOT"
mkdir -p "$SRC" "$PKG"
tar --no-same-permissions --warning=no-unknown-keyword -xf openvdb-13.0.0.tar.gz -C "$SRC" --strip-components=1

Every config.guess and config.sub older than automake’s is then replaced with automake’s, so a configure script recognises the musl target.

3. Build. build.sh is sourced in a subshell under set -e, from $SRC, with name, version, release and the five paths PKGNAME, PORT_SRC, SRC_ROOT, SRC and PKG set as shell variables. Its body, verbatim:

patch -p1 -i "$PORT_SRC/tbb-version.patch"

_nanobind=$(python3 -m nanobind --cmake_dir)
mkdir build && cd build
cmake .. -G Ninja -DCMAKE_POLICY_VERSION_MINIMUM=3.5 \
	-DCMAKE_BUILD_TYPE=Release \
	-DCMAKE_INSTALL_PREFIX=/usr \
	-DCMAKE_INSTALL_LIBDIR=lib \
	-DOPENVDB_ENABLE_RPATH=OFF \
	-DOPENVDB_BUILD_CORE=ON \
	-DOPENVDB_CORE_SHARED=ON \
	-DOPENVDB_CORE_STATIC=OFF \
	-DOPENVDB_BUILD_BINARIES=ON \
	-DOPENVDB_BUILD_PYTHON_MODULE=ON \
	-Dnanobind_DIR="$_nanobind" \
	-DPython_EXECUTABLE=/usr/bin/python3 \
	-DOPENVDB_BUILD_UNITTESTS=OFF \
	-DOPENVDB_BUILD_DOCS=OFF \
	-DOPENVDB_BUILD_AX=OFF \
	-DOPENVDB_BUILD_NANOVDB=ON \
	-DOPENVDB_USE_DELAYED_LOADING=OFF \
	-DOPENVDB_ENABLE_UNINSTALL=OFF \
	-DUSE_NANOVDB=ON \
	-DUSE_BLOSC=ON \
	-DUSE_ZLIB=ON \
	-DUSE_TBB=ON \
	-DUSE_EXR=OFF \
	-DUSE_PNG=OFF \
	-DUSE_LOG4CPLUS=OFF \
	-DUSE_CCACHE=OFF \
	-DCONCURRENT_MALLOC=Tbbmalloc \
	-DNANOVDB_BUILD_TOOLS=OFF \
	-DNANOVDB_USE_CUDA=OFF \
	-DNANOVDB_USE_OPENVDB=OFF \
	-DNANOVDB_ALLOW_FETCHCONTENT=OFF
ninja
DESTDIR=$PKG ninja install
test -e "$PKG"/usr/lib/python3*/site-packages/openvdb*.so

The switches, and why each is set:

The common switches of each build system are explained in the Flag glossary.

4. Package. kpkg removes libtool archives, the info directory index, mimeinfo.cache and every fonts.dir from $PKG, copies the source’s licence files into /usr/share/licenses/openvdb, prunes what the image does not ship, lints the tree and rolls it reproducibly:

tar --sort=name --format=gnu --numeric-owner --owner=0 --group=0 \
    --mtime=@$SOURCE_DATE_EPOCH \
    --use-compress-program='xz -9 -T0 --block-size=32MiB --no-adjust' \
    -cf openvdb-13.0.0-2.tar.xz -C "$PKG" .

5. Adopt. kpkgadd installs the package’s files over the root, refusing a path another package owns, records the file list in /var/lib/kpkg/db/openvdb, and runs the triggers its paths call for.

Contents

Installed programs: vdb_print.

Installed libraries: libopenvdb.so.

Installed directories: /usr/include/nanovdb, /usr/include/openvdb, /usr/lib/cmake/OpenVDB, /usr/share/licenses/openvdb.

Notes

The version follows the one Blender pins. Cycles compiles against the NanoVDB headers, whose API moves between minor releases, so a bump of either port checks the other.