Build System and Packaging#

This page of the Technical Guide explains how the ovclash build and packaging scripts work. Read it before you change a build wrapper, CMakeLists.txt, a script under scripts/ or the package layout. The Architecture glossary defines the implementation terms, such as ovstage, Packman, ovx headers, Carbonite, PhysX and SDK archive, and Concepts the consumer vocabulary, such as USD, OpenUSD, wheel and Kit.

Other pages own the related topics:

Topic

Page

Build commands, wrapper flags, build trees and environment variables

Building ovclash from a source checkout

Validation steps and their output

Test and validate

Packaging commands and artifact names

Packaging and publishing

What a consumer finds in the SDK archive and the wheel

What ships in the C/C++ quickstart and the Overview

The _build/ layout

Generated outputs

This page owns the directory layout of the install tree (SDK install tree), the build configurations (Build configurations and debug information) and code signing (Code signing).

Build system and backends#

ovclash builds one shared library, ovclash: ovclash.dll on Windows and libovclash.so on Linux. Each build tree builds it against exactly one backend:

Backend

Wrappers

OVCLASH_OVSTAGE_ONLY

Role

ovstage

build_ovstage.sh, build_ovstage.bat

ON

The product backend (ovstage backend)

OpenUSD

build_openusd.sh, build_openusd.bat

OFF

The unpublished parity reference (OpenUSD backend)

A wrapper selects only the backend and its trees. It passes the work to cmake -P scripts under scripts/.

Wrapper mode

Scripts that run

Default

scripts/build.cmake, then scripts/install.cmake

--no-install

scripts/build.cmake

--test

scripts/build.cmake, scripts/install.cmake, scripts/test_cpp.cmake

--validate

scripts/validate_all.cmake, which runs its own build and install steps

--clean, --generate

scripts/build.cmake only

--prepare-sentinel, --stage-inputs

scripts/prepare_sentinel.cmake, scripts/stage_portable_inputs.cmake

scripts/build.cmake works in this order:

  1. It lists any output roots of the previous layout that it finds. It never uses or deletes them.

  2. With CLEAN_BUILD, it removes the selected compile tree, the backend’s install and distribution trees, that tree’s validation evidence and the sample build tree.

  3. It fetches the Packman dependencies and stages the ovstage wheel (Dependency staging).

  4. It selects and checks the ovx include tree, the directory of the ovx headers (ovx include-tree checks).

  5. On Windows, it applies the toolchain that OVCLASH_WINDOWS_TOOLCHAIN selects. It puts MSVC, the Windows SDK and Ninja on the environment, or, for a portable MSVC, sets it up as a Visual Studio instance. A public source export defaults to the installed Visual Studio 2022 and Windows SDK, a development checkout to the packaged ones.

  6. For ovstage, it finds the ovstage runtime. In local ovstage mode it can build that runtime (Local ovstage source builds).

  7. It configures BUILD_DIR and builds it, or only BUILD_TARGET when one is set.

Build helpers#

ovclash owns every build helper it uses: the CMake modules under cmake/modules/ and the Linux argument parser scripts/parse_build_args.sh. It never imports another project’s build system. AGENTS.md (“Build-helper ownership”) lists the modules and the test that enforces the rule.

Driving the scripts directly#

You can run the cmake -P scripts one at a time. Three rules apply.

  • Name the backend and the generator. Without BUILD_DIR and INSTALL_DIR, scripts/build_common.cmake derives _build/compile/<backend>/<generator> and _build/install/<backend> from OVCLASH_OVSTAGE_ONLY and GENERATOR. Without OVCLASH_OVSTAGE_ONLY, or with OFF, a script targets the OpenUSD backend and its _build/compile/openusd/<generator> and _build/install/openusd trees; pass -DOVCLASH_OVSTAGE_ONLY=ON for ovstage. GENERATOR defaults to ninja in the scripts, although build.bat defaults to vs. Set GENERATOR=vs (a -D value or the environment) when you drive a Visual Studio tree.

  • Do not switch a tree’s generator. scripts/build.cmake stops with Generator changed (cached: ..., requested: ...). Clean the build first.

  • Build one target with scripts/build_target.cmake, not cmake --build. It first applies the selected Windows toolchain environment (ovclash_apply_windows_toolchain_env in scripts/windows_toolchain.cmake). A Visual Studio tree of a portable instance needs it on a host without Visual Studio, and a Ninja tree needs it to find the compiler’s headers and libraries. BUILD_DIR is required.

Under _build/, only the four trees _build/compile/{ovstage,openusd}/{vs,ninja} are accepted as BUILD_DIR. Any other BUILD_DIR must be outside _build/.

The scripts read these variables as -D definitions (scripts/build_common.cmake, scripts/build.cmake, scripts/build_target.cmake). Only GENERATOR also comes from the environment:

Variable

Values

Required

Default

Effect

OVCLASH_OVSTAGE_ONLY

A CMake boolean, such as ON or OFF

No

Unset: the OpenUSD backend

ON selects the ovstage backend and its default trees

GENERATOR

ninja, or vs on Windows

No

ninja

The generator, and the last component of the default BUILD_DIR

BUILD_TYPE

Release or Debug

No

Release

The configuration

BUILD_DIR

One of the four compile trees under _build/, or a directory outside _build/

Yes for scripts/build_target.cmake; no for the other scripts

_build/compile/<backend>/<generator>

The compile tree

INSTALL_DIR

A directory

No

_build/install/<backend>

The install tree

BUILD_TARGET

A CMake target name

No

Empty: every target

scripts/build.cmake builds only this target

TARGET

A CMake target name

No

Unset: every target

scripts/build_target.cmake builds only this target

CONFIG

Release or Debug

No

BUILD_TYPE

The configuration that scripts/build_target.cmake builds

Example: configure and build the Windows ovstage Visual Studio tree, then rebuild one target. Before you begin, run a wrapper build once, such as build_ovstage.bat --release, so that the packaged CMake exists under _build/deps/target-deps/cmake. From ovclash/:

_build\deps\target-deps\cmake\bin\cmake.exe -DBUILD_TYPE=Release -DOVCLASH_OVSTAGE_ONLY=ON -DGENERATOR=vs -P scripts/build.cmake
_build\deps\target-deps\cmake\bin\cmake.exe -DBUILD_DIR=_build/compile/ovstage/vs -DTARGET=test_cpp -DCONFIG=Release -P scripts/build_target.cmake

scripts/build.cmake ends with ovclash build completed successfully. and names the install step to run next. scripts/build_target.cmake prints Building target test_cpp in <build tree> (Release) and exits with 0 when the build succeeds; a failed build stops with Build failed (exit code: <n>), and a tree that was never configured with No configured build tree at <path> (CMakeCache.txt is missing).

Dependency staging#

The build stages its dependencies under _build/deps/:

Dependency

Location

Used by

Packman target packages: CMake, Python, OpenUSD, PhysX, Carbonite

_build/deps/target-deps

Both backends

Packman host tools: Ninja and, on Windows, vswhere

_build/deps/host-deps

Both backends

The pinned ovstage wheel, installed

_build/deps/pip-deps/ovstage

ovstage: the ovstage SDK (headers and link library), runtime and ovx headers. OpenUSD: the ovx/ headers only.

The downloaded ovstage wheel

_build/deps/downloads/ovstage

The staging step

A public source build on Windows uses the installed Visual Studio 2022 and Windows SDK; the public host manifest pins no compiler, Windows SDK or signing tool.

scripts/fetch_deps.cmake fetches the Packman packages that deps/ declares. A Windows Visual Studio tree fetches both Debug and Release packages. An ovstage build with the pinned wheel fetches only Release, because the published ovstage runtime is Release-only.

The build never takes a dependency from a sibling source checkout and never probes a HOME-relative directory. There are two exceptions: local ovstage mode, which you select explicitly, and the Linux USD_ROOT default at the end of How the ovstage wheel is staged.

How the ovstage wheel is staged#

  1. Reuse. The build reuses _build/deps/pip-deps/ovstage when it holds a complete package at OVSTAGE_VERSION, its .ovclash-source-wheel marker names an existing wheel, and that wheel still matches its SHA-256 pin. The stamp .ovclash-source-wheel-verified beside the marker records the wheel’s path, pinned digest, size and modification time; the build hashes the wheel again only when one of them changed. Otherwise it deletes the directory and stages again.

  2. Select a source. The first match wins. The variables come from the environment or a -D definition, and none is required; unset, the build uses source 5. Dependency overrides is their full reference.

    Order

    Source

    Values

    Condition

    1

    OVSTAGE_WHEEL_PATH

    The path of a wheel file

    Set. The file must exist.

    2

    A wheel in OVCLASH_PIP_OVERRIDE_DIR

    A directory

    The directory holds ovstage-<OVSTAGE_VERSION>-*.whl. With several, the one for this platform wins; several without it is an error.

    3

    A wheel in OVCLASH_PIP_SEED_DIR (legacy name)

    A directory

    The same rule.

    4

    OVSTAGE_PIP_REQUIREMENT

    A pip requirement or a wheel path

    Set.

    5

    ovstage==<OVSTAGE_VERSION> from the configured package index

    –

    Always.

  3. Download. The default source is the exact platform wheel, ovstage==<OVSTAGE_VERSION>, from the package index pip is configured to use: public PyPI unless PIP_INDEX_URL, PIP_EXTRA_INDEX_URL or a pip configuration file name another one. pip download fetches it:

    • noninteractively (--no-input): a credential, Poetry configuration or account is not required;

    • as the wheel of the build’s platform tag only (--only-binary=:all: --platform <tag>);

    • without pip’s own cache (--no-cache-dir), so the user’s pip cache gets no copy;

    • into the project-local cache _build/deps/downloads/ovstage/<wheel file name>. A later staging reuses a cached wheel that still matches its pin and discards one that does not.

    A failed download stops the build with Failed to materialize ovstage from <source kind>: <source> (pip exit code <n>), followed by the index that pip used. To build offline, or from an artifact the index does not serve, name the wheel through sources 1 to 4.

  4. Resolve. Every source ends as one file in _build/deps/downloads/ovstage/resolved/. A wheel is copied there; a pip requirement is resolved with pip download --no-input --no-deps. Exactly one ovstage-<OVSTAGE_VERSION>-*.whl must result, and it must match its committed SHA-256 pin in OVSTAGE_SHA256SUMS: a wheel with other bytes stops the build. Another OVSTAGE_VERSION has no committed pin, so its wheel is reported as unverified and the artifacts built from it are not publishable.

  5. Install. The Packman Python runs pip install --no-input --upgrade --target _build/deps/pip-deps/ovstage <wheel>.

  6. Check and mark. The build checks the layout and the version again. It then writes the resolved wheel path to _build/deps/pip-deps/ovstage/.ovclash-source-wheel and records the verified wheel in .ovclash-source-wheel-verified beside it, for the reuse check of step 1. SDK archive packaging and the SDK archive test read that wheel later.

build_ovstage.sh has one Linux-only default, in local ovstage mode only. When OVCLASH_OVSTAGE_USD_ROOT is unset and <OVCLASH_OVSTAGE_BUILD_DIR>/CMakeCache.txt exists, it takes USD_ROOT from that cache. In that mode OVCLASH_OVSTAGE_BUILD_DIR defaults to _build/ in an ovstage checkout beside the repository. Set OVCLASH_OVSTAGE_USD_ROOT to override it.

Changing the ovstage pin#

The OVSTAGE_VERSION file is the pin. Before you begin, check that the new ovstage version is published on public PyPI with its three platform wheels (win_amd64, manylinux_2_35_x86_64 and manylinux_2_35_aarch64), and that this host can reach PyPI. Run the commands from ovclash/.

First write the new version into the OVSTAGE_VERSION file. scripts/sync_ovstage_version.py then keeps the copies in python/pyproject.toml, README.md and the other documents its SYNCED_FILES lists in step:

python scripts/sync_ovstage_version.py --write   # rewrite the stale copies
python scripts/sync_ovstage_version.py --check   # exit 0 when every copy matches

Both print nothing on success. On a mismatch --check exits with 1 and names the stale files:

ovstage version is not synchronized:
  python/pyproject.toml

A malformed OVSTAGE_VERSION, or a file without exactly one pin or documented default, makes either mode print error: <reason> and exit with 2.

Then refresh the per-platform wheel pins in OVSTAGE_SHA256SUMS, which every build checks the downloaded wheel against. update reads them from the public PyPI release of the new version; check confirms, without the network, that the pins cover exactly the three platform wheels:

python scripts/ovstage_pins.py update
python scripts/ovstage_pins.py check

update prints Pinned the 3 ovstage==<version> wheels in OVSTAGE_SHA256SUMS, and check prints OVSTAGE_SHA256SUMS pins the 3 ovstage==<version> wheels; both exit with 0. A failure prints ovstage pin check failed: <reason> and exits with 1, for example when PyPI cannot be reached or the release lacks a platform wheel. Fix the cause and run update again.

OVSTAGE_SHA256SUMS is in sha256sum format. The build and scripts/ovstage_pins.py read it by one rule: a # comment starts in the first column, a blank line is skipped, any other line that does not have the form of a pin line (an indented comment, or trailing white space) is malformed, and a wheel pinned twice is refused. The build stops on a duplicate pin of any wheel, not only of the one it stages. A pin line has these fields:

Field

Type

Required

Default or values

Description

Digest

text

Yes

64 lowercase hexadecimal digits

The SHA-256 of the wheel

Separator

text

Yes

Two spaces, or a space and *

The sha256sum text-mode or binary-mode separator

Wheel file name

text

Yes

ovstage-<version>-py3-none-<platform tag>.whl

The pinned wheel

ovx include-tree checks#

The build validates the selected ovx include tree as a unit (scripts/ovx_package_validation.cmake). It never generates or copies a missing declaration.

Backend

The include tree must have

OpenUSD

ovx/string_types.h, or the legacy ovx/types.h

ovstage

The same, plus all three of ovx/path_dictionary/path_dictionary.h, path_dictionary_types.h and path_dictionary_utils.h. A tree with only the legacy ovx/types.h is rejected when the matching ovstage SDK ships ovx/string_types.h.

The test_ovx_package_coherence target checks these diagnostics against synthetic header trees. Linking in the C/C++ quickstart covers the consumer side.

CMake targets#

The C API sample executables are not part of ALL:

Target

Output name

ovclash.clash_api.capi.sample

ovclash_clash_api_capi

ovclash.clash_suite_api.capi.sample

ovclash_clash_suite_api_capi

ovclash.legacy_clash_detection.capi.sample

ovclash_legacy_clash_detection_capi

Most custom targets in this table run one cmake -P script of the same name. The --validate flow (scripts/validate_all.cmake) calls those scripts directly instead of going through the build graph. The last column says whether --validate runs a target.

Target

What it does

In --validate

install_sdk

Assembles the install tree (scripts/install_once.cmake, which runs scripts/install.cmake).

Yes, step 2

test_cpp

Runs the packaged native tests from the install tree.

Yes

test_c_compat

Builds and runs the pure-C compatibility smoke against the install tree.

Yes

test_c_compat_sdk_archive

Builds and runs the pure-C smoke against the extracted SDK archive.

Yes, after package_sdk

test_ovrtx_sample

Runs the one-shot smoke of the ovRTX clash sample app against the install tree. Rendering is required only when OVCLASH_TEST_OVRTX is set.

Yes

test_python_runtime

Runs the Python runtime and Suite tests against the install tree.

Yes

build_wheel

Builds the Python wheel (Python wheel).

Yes, before test_python_wheel

test_python_wheel

Checks the wheel contents and runs queries in a clean virtual environment.

Yes

test_python_sample_app

Runs the ovRTX clash sample app tests under tests/sample_app_tests/.

Only through OVCLASH_VALIDATE_EXTRA_TARGETS

test_samples

Runs the sample launchers and checks their results (Native Suite test build and sample gate).

Yes

test_no_clash_dependency

Fails when a build, script, sample, source or test file references the repository’s clash/ tree outside the generated source/usdclash view.

Yes

test_ovx_package_coherence

Checks the ovx include-tree diagnostics.

Yes

test_sentinel_checkers

Runs the Sentinel controller and checker tests.

Only through OVCLASH_VALIDATE_EXTRA_TARGETS

build_docs

Renders the documentation against the install tree and stages it as the install tree’s docs/html/.

Only through OVCLASH_VALIDATE_EXTRA_TARGETS

package_sdk

Builds the SDK archive (SDK install tree).

Before test_c_compat_sdk_archive

test_python_coverage

Reruns the Python runtime suite under coverage (Python coverage).

No

test_kpi_full_fixtures

Generates the full KPI reference fixtures, one task at a time.

No

validate_all

Aggregate build-graph target over the Yes rows.

Not applicable

sentinel_native_inputs

Part of ALL. Builds the Sentinel consumer ovclash_sentinel (capture, scenario and fp-scenario, output in the tree’s tests-sentinel/ directory) and the native helpers Sentinel reuses. See Build outputs and the native test runtime.

Built by step 1

setup_ovrtx_viewer, rtx_viewer

Windows only. Prepare and debug the ovRTX clash sample app (Visual Studio solutions and F5 debugging).

No

Three variables adjust a validation run. Each is read from a -D definition or the environment (scripts/validate_all.cmake, scripts/test_ovrtx_sample.cmake):

Variable

Values

Required

Default

Effect

OVCLASH_VALIDATE_EXTRA_TARGETS

Target names separated by ; or spaces

No

Unset

Appends the named opt-in targets after the standard list, in the given order. A name without a validation script stops the run; a target already in the run does not run twice.

OVCLASH_VALIDATE_EXCLUDE_TARGETS

Target names separated by ; or spaces

No

Unset

Drops the named targets, extras included. An unknown name only warns.

OVCLASH_TEST_OVRTX

A true CMake variable, or any non-empty environment value

No

Unset: test_ovrtx_sample does not render

Adds the render smoke to test_ovrtx_sample, which then needs a GPU and Vulkan

Details that matter when you change these targets:

  • test_c_compat_sdk_archive on ovstage recreates _build/deps/venv/sdk_archive on every run. It installs the archive’s requirements.txt there offline, from the staged wheel only (pip install --isolated --no-index --only-binary=:all:). It then checks the installed native files against the archive’s ovclash-runtime-closure.json with scripts/verify_runtime_closure.py --sdk-root <sdk> --ovstage-package-dir <package>. The consumer gets only that interpreter, so the exported CMake package must find ovstage itself.

  • On Linux, that consumer runs with LD_LIBRARY_PATH unset. A second leg links the same smoke through the SDK archive’s ovclash.pc with -Wl,--as-needed. It reads the file with pkg-config or pkgconf when the host has one and no path contains whitespace; otherwise the script expands the file itself. A direct scripts/test_c_compat.cmake run with an empty -DOVCLASH_C_COMPAT_PKG_CONFIG= forces the expansion.

  • Nested configure fixtures. Python runtime, ovRTX clash sample app and Sentinel checker validation put the driving CMake’s directory first on the child PATH, so nested configure steps find that CMake without a system install.

How validation counts tests#

Every executed test_* step of a validation run ends with Total tests run: N (Validation output shows it in context). Failed tests count too. The rules (scripts/validation_test_counts.cmake, _step_test_count in scripts/run_parallel.py):

  • A Python step counts the framework’s tests, skips included.

  • A native step counts the reported case totals, or the registry cases that started.

  • A standalone compatibility, payload, sample or control check counts once per check or invocation (ovclash_record_test_count).

  • Build and install prerequisites, and native groups that the driver skips, count zero.

  • The totals start again with every validation invocation.

Backend build composition#

The source lists are authoritative: only listed files compile.

  • CMakeLists.txt lists the ovclash sources (OVCLASH_SUITE_SOURCES, OVCLASH_WRAPPER_SOURCES).

  • scripts/usdclash_sources.cmake lists the shared engine inputs (OVCLASH_USDCLASH_OPENUSD_SOURCES, OVCLASH_USDCLASH_OVSTAGE_SOURCES and the headers).

Engine sources come from source/usdclash/, a build-created link view of the shared engine in the repository’s clash/ tree. Its interface and common headers are under source/usdclash/include/{omni,private,common}/. The local source/ directory stays on the include path for UsdPCH.h and the standalone helper headers.

OpenUSD

ovstage

Shared engine sources

The 12 files of OVCLASH_USDCLASH_OPENUSD_SOURCES, unchanged

Intersection.cpp only. It includes UsdPCH.h only under #if !OVCLASH_OVSTAGE_ONLY.

Backend sources

source/OpenUsdClashBackend.cpp and the wrapper files of OpenUSD backend files

The source/Ovstage* files of ovstage backend files

Backend-specific definitions

pxr=PXR_NS

OVCLASH_OVSTAGE_ONLY=1, SUPPORT_POINT_CLOUDS=0, and OVCLASH_OVSTAGE_CUDA_ENABLED=1 against a CUDA-enabled local ovstage

Links

Namespaced, Python-free OpenUSD (usd_links) and TBB

The ovstage loader ovstage-dynamic, or ovstage when the package has no loader, as in a local ovstage build

Precompiled header

source/UsdPCH.h, only for translation units that include it (ovclash_apply_usd_pch)

None

native_openusd_linked in ovclash_get_backend_info

1

0

Both backends compile:

  • the canonical forwarding layer, source/ovclash_capi_api.cpp and source/ClashApiCommon.cpp;

  • the Suite sources under source/suite/;

  • Carbonite globals, bootstrap and tasking: CarboniteGlobals.cpp, CarboniteBootstrap.cpp and Tasking.cpp. Carbonite and PhysX are linked statically.

Both define OVCLASH_STANDALONE. The exported ovclash::ovclash target passes it to consumers, because <ovclash/ovclash.h> declares its standalone-only entry points under that macro.

The published ovstage runtime is Release-only. An ovstage Debug build therefore links checked PhysX and, on Windows, a Release-compatible CRT (C runtime). Build configurations and debug information lists every combination.

OpenUSD backend files#

Within the shared engine, ClashDetectionCore.cpp runs collision, report extraction and the depth and report operations. The canonical ABI (application binary interface) reaches it through IClashDetection2 and StandaloneStageRegistry.

File

Role

source/OpenUsdClashBackend.cpp

The standalone adapter, built with OVCLASH_STANDALONE. Its async launch uses source/OwnedAsyncLaunch.h, which allocates the public owner before the native launch and publishes it only after the launch succeeds.

source/NativeClash.{h,cpp}

The private OpenUSD C++ wrapper.

source/StandaloneStageRegistry.{h,cpp}, source/StandaloneReportExtraction.h

The stage registry and report extraction. They keep the Standalone prefix because the shared engine includes their headers by exact name.

source/FixedTimeline.cpp

A fixed timeline: standalone ovclash has no Kit timeline.

source/DebugDrawStubs.cpp

A link stub for an engine helper that PointCloud.cpp calls but standalone ovclash does not compile. It returns an empty result.

ovstage backend files#

Files

Role

OvstageClashBackend.cpp, OvstageClashBackendQueries.cpp, OvstageClashBackendReports.cpp

The canonical entry points: context, settings, timeline and stage; pipeline runs and result queries; overlap reports. They share the C API guard helpers in OvstageClashBackendInternal.h.

OvstageClashGeometry.cpp, OvstageClashSelection.cpp, OvstageClashTransforms.cpp, OvstageClashCollision.cpp, OvstageClashBroadPhase.cpp, OvstageClashPipeline.cpp

The pipeline operations, declared in OvstageClashContext.h over the data types in OvstageClashTypes.h.

OvstageSceneReader.{h,cpp}

The OvstageSceneReader class: reader lifecycle, stage attachment, default-time selection population and geometry extraction.

OvstageSceneReaderClassification.cpp

Raw authored xformOp static/dynamic classification.

OvstageSceneReaderComposition.cpp

Validation and copy of an attached composition, its replay into engine populations, and their stage metadata check.

OvstageSceneReaderNumericPopulation.cpp, OvstageSceneReaderNumericPlan.cpp

Numeric transform population, the selected numeric plan and world-matrix reads. They share OvstageSceneReaderNumericMatrices.h.

OvstageSceneReaderQueries.cpp

ovstage instance lifecycle, population and query helpers.

OvstageSceneReaderGeometry.cpp

Mesh and point-cloud census and extraction.

OvstageSceneReaderGeometryInstancing.cpp

Prototype and instance roots, and instance-proxy expansion.

OvstageSceneReaderTransforms.cpp

Transform extraction, composition and instance-root validation.

OvstageSceneReaderInternal.h

Declarations shared by the scene-reader files.

UsdTextFallbacks.{h,cpp}, UsdaLineMasking.h

The USD text fallbacks.

ClashSourceMesh.h

The shared source-mesh geometry block.

ovstage runtime path explains how these files run a query. Backends lists the behavior differences between the backends.

Build configurations and debug information#

Debug is the CMake configuration of the code built in this repository. It says nothing about the prebuilt dependencies. There is no RelWithDebInfo variant. The ovclash library and the native test and sample targets use the requested configuration:

Platform

Release

Debug

Linux

Optimized (-O3), without -g

Unoptimized (-O0) with -g

Windows

Optimized, compiled with /Zi and linked with /DEBUG:FULL

Debug code generation with /Zi and /DEBUG:FULL

Dependency configurations#

The ovstage runtime is published as Release only. Builds that stage the pinned wheel never build ovstage.

Variant

OpenUSD and TBB

PhysX

Carbonite

ovstage runtime

Python

OpenUSD Release

Release packages, linked directly

Prebuilt static checked

Static, Release

Not linked; only its ovx headers are used

Configuration-neutral package

OpenUSD Debug

Debug packages, linked directly

Prebuilt static debug

Static, Debug

Not linked; only its ovx headers are used

Configuration-neutral package

ovstage Release

Release runtime closure of ovstage; not linked directly

Prebuilt static checked

Static, Release

Published Release runtime

Configuration-neutral package

ovstage Debug

Release runtime closure of ovstage; not linked directly

Prebuilt static checked

Static, Release

Published Release runtime

Configuration-neutral package

Every non-Debug build links PhysX checked on purpose:

  • checked is an optimized build (NDEBUG). It keeps PX_CHECKED assertions, API parameter validation and PVD (PhysX Visual Debugger), which PhysX release strips.

  • The pinned physxsdk Packman package ships only checked/ and debug/. The Omni PhysX runtime in ovphysx/ovruntime makes the same choice with the same pin. ovclash_link_physx_static_libs maps Debug to debug/ and every other configuration to checked/.

  • For the ovstage backend, CMakeLists.txt adds checked/ as a BEFORE link directory even in Debug, because the published ovstage runtime is Release-only.

Do not switch either link site to release/. The package has no such directory.

The ovstage Debug build is therefore a deliberate mixed-mode build. ovclash-owned code has Debug code generation and symbols, and its binary dependency closure stays Release-compatible. Building ovstage in the requested configuration is an explicit opt-in (Local ovstage source builds).

The Windows Debug runtime#

The Windows Debug CRT setup differs by backend:

  • The OpenUSD Debug build uses the Debug CRT (/MDd).

  • The ovstage Debug build gives ovclash.dll, ovclash.native.test and the scheduler test ovclash.parallel_for.test a Release-compatible ABI: /MD, NDEBUG instead of _DEBUG, and no iterator debugging. These targets keep the Debug optimization level and PDBs (program databases). Other helper executables use the Debug CRT.

Windows Debug validation never relies on a Debug CRT in System32. The native, Python and sample test steps stage the MSVC Debug CRT and the Windows SDK debug UCRT of the selected Windows toolchain under windows_debug_runtime/ in the validation directory. They put that directory ahead of System32 for their child processes. The C-consumer checks copy the same DLLs beside their executables in _build/c_compat_<leg>. These non-redistributable DLLs never enter _build/install/<backend>, a wheel or an SDK archive. The ovRTX test step stages them the same way.

Symbols and stripping#

Windows produces PDBs for ovclash-owned targets in both configurations. The install step copies the ovclash and ovclash.native.test PDBs into _build/install/<backend>. Release symbols exist only in the build and install trees:

  • package_sdk.cmake deletes every .pdb and .debug file from its staging copy before it archives a Release build. scripts/verify_release_artifact.py rejects a Release SDK archive that still holds one; only non-Release builds pass --allow-debug-sidecars. In every configuration it has already removed the native test programs with their .pdb or .debug files (The SDK archive, step 4), so a Debug SDK archive keeps only the library’s symbols, and --allow-debug-sidecars never admits a test program’s symbols.

  • Wheel staging removes every .pdb file, in both configurations.

  • On Linux, the Release install and wheel trees strip symbols and the .comment section from ovclash-owned ELF binaries. .comment names the compiler of every linked object, prebuilt static dependencies included, and such a dependency’s toolchain can record its source repository URL there. The trees also enforce the GLIBC 2.35 and GLIBCXX 3.4.30 ceilings. SKIP_GLIBC_CHECK waives only the ABI check, not the stripping.

  • verify_release_artifact.py re-checks the packed bytes. It rejects an ovclash-owned ELF binary that still has a .symtab or a .comment section. Dependency-owned binaries stay unchanged. Debug artifacts pass --allow-unstripped and keep ovclash-owned symbols.

  • The static Carbonite package ships no private PDBs. No symbol files are promised for the prebuilt OpenUSD, ovstage, Python or PhysX dependencies.

Builds without a GPU#

Build and validation need no GPU:

  • The one Warp test in the Python runtime suite binds its arrays with device="cpu".

  • ovclash compiles no CUDA code. The CUDA runtime copy in CMakeLists.txt applies only to a local build against a CUDA-enabled ovstage.

test_ovrtx_sample needs a GPU and Vulkan only when OVCLASH_TEST_OVRTX enables rendering. On a host without a GPU, leave that variable unset; OVCLASH_VALIDATE_EXCLUDE_TARGETS=test_ovrtx_sample drops the step entirely.

Code signing#

On Windows, scripts/install.cmake Authenticode-signs (Microsoft code signing) the install tree as its last step, before the wheel and the SDK archive are derived from it. Linux .so files are not signed: the signing tool signs only PE binaries (Windows executables and DLLs). Publishing never signs and does not verify Authenticode signatures.

OVCLASH_CODESIGN is read from -D or the environment; an empty value counts as unset:

Value

Effect

True (ON, 1)

Signing is required. A missing signing tool or credentials, or a host other than Windows, is fatal.

False (OFF, 0)

Signing is skipped.

Unset

Signs only on Windows when the Packman signing tool is staged and signing credentials are configured. Otherwise it reports SKIPPED with the reason, so ordinary local builds are unaffected.

When signing runs:

  • During --validate, the separately timed sign_sdk step runs right after install_sdk, before the tests, the wheel and the SDK archive. They therefore consume the same tree, signed when signing runs. A signing failure stops the later steps. A public source build has that step only when OVCLASH_CODESIGN is on; otherwise install_sdk signs as a standalone install does.

  • A standalone scripts/install.cmake call or a direct CMake install target signs as its final operation.

  • scripts/codesign.cmake signs an existing install tree again: cmake -DINSTALL_DIR=_build/install/ovstage -DOVCLASH_CODESIGN=ON -P scripts/codesign.cmake. It prints Code signing complete for ovclash SDK install and exits with 0. Its failures:

    • A missing tree stops it with Install directory not found at <path>.: run scripts/install.cmake first.

    • A missing signing tool stops it with Code signing is required for ovclash SDK install but repo_codesign is not staged at <path>.: stage the tool with cmake -DOVCLASH_OVSTAGE_ONLY=ON -P scripts/fetch_deps.cmake, then sign again.

    • Missing signing credentials stop it with a message that names them: configure them, then sign again.

    • A failing tool stops it with Code signing failed for ovclash SDK install (exit code: <n>) after the tool’s own output.

  • Nothing may rewrite a signed binary afterward.

What is signed follows the tree’s backend: the backend field of its ovclash-build-provenance.json, or OVCLASH_OVSTAGE_ONLY for a tree without one.

  • An OpenUSD tree is signed whole, because its SDK archive bundles the dependency closure.

  • An ovstage tree signs only the PE files that ovclash builds: ovclash.dll and the ovclash.<suite>.test.exe executables directly in bin/ or lib/. Signing works on copies in a <install>.codesign-staging folder beside the tree and copies them back.

  • The ovstage DLLs therefore stay byte-identical to the pinned wheel. The SDK archive’s ovclash-runtime-closure.json records those bytes, and KPI compares the installed runtime with them.

  • ovstage owns plugins/, the other files directly in bin/ or lib/, and their plugins/ and ovstage_usd_schemas/ subtrees. A PE file in an ovstage tree that neither ovclash nor ovstage owns stops signing, so it never ships unsigned.

  • Signing fails when the tool exits 0 but leaves a staged file byte-identical to its unsigned copy.

A public source export pins no signing tool. Its --validate has no sign_sdk step unless OVCLASH_CODESIGN is on, and an ordinary install skips signing. OVCLASH_CODESIGN=ON requires a signing tool staged under _build/deps/host-deps/repo_codesign and otherwise stops the build. The validation receipt records the signing mode of every run.

Visual Studio solutions and F5 debugging#

Windows wrapper builds generate and build a Visual Studio solution by default: _build/compile/openusd/vs/ovclash.sln or _build/compile/ovstage/vs/ovclash.sln. --generate only generates it.

  • Each solution has both Debug|x64 and Release|x64. The wrapper’s --debug or --release selects the configuration that a command-line build runs.

  • Generation stages the dependency packages of both configurations when the backend can use them (Dependency staging).

  • Both configurations emit PDBs for the ovclash targets.

  • For a portable MSVC tree (the packaged one, or a copied layout that no Visual Studio Installer lists), the build writes the toolset props it needs into that tree only when their content changes, through a temporary file and an atomic rename, so a configure that finds them current writes nothing. It never writes into an installation the Installer lists.

A Windows Ninja tree (--ninja) is configured with the resolved cl.exe as CMAKE_C_COMPILER and CMAKE_CXX_COMPILER, and with the selected Windows SDK’s rc.exe and mt.exe as CMAKE_RC_COMPILER and CMAKE_MT when that SDK has them. When its CMakeCache.txt records another one of these tools, for example after a Visual Studio update removed the toolset, OVCLASH_WINDOWS_TOOLCHAIN switched, or another Windows SDK was selected with the same compiler, the build prints Windows toolchain changed (CMAKE_<TOOL>: <old> -> <new>); configuring from scratch, removes CMakeCache.txt and CMakeFiles/ and configures again. No manual clean is needed.

A Visual Studio tree is configured with the generator instance (CMAKE_GENERATOR_INSTANCE). A portable instance also gets its toolset version (CMAKE_VS_PLATFORM_TOOLSET_VERSION) and the MSVC and Windows SDK include and library directories (CMAKE_VS_SDK_INCLUDE_DIRECTORIES, CMAKE_VS_SDK_LIBRARY_DIRECTORIES); a Visual Studio that the Installer lists gets the selected Windows SDK version as CMAKE_SYSTEM_VERSION instead. CMake keeps the cached directories that a later configure no longer passes, and reads the target Windows SDK only on a tree’s first configure. So when CMakeCache.txt records another value for one of these variables (an absent one counts as no value), or CMakeFiles/<CMake version>/CMakeSystem.cmake records another target system version (the host version when none is requested), for example after OVCLASH_WINDOWS_TOOLCHAIN switched, OVCLASH_VISUAL_STUDIO_ROOT named another installation or OVCLASH_WINDOWS_SDK_VERSION selected another Windows SDK, the build prints Windows toolchain changed (<variable>: <old> -> <new>); configuring from scratch. It removes CMakeCache.txt and CMakeFiles/ and configures again. To reset a Visual Studio tree by hand, delete the same two, or use --clean.

The configure writes a Directory.Build.targets into the root of a Visual Studio tree (cmake/Directory.Build.targets.in), which moves each project’s intermediate and output directories under the platform build directory. It leaves CMake’s own projects under CMakeFiles/ (compiler identification and try_compile) alone, because CMake looks for their output there. A tree that another CMake version configured is therefore configured again in place: the new version identifies the compilers again. Before such an identification (in a tree without CMakeFiles/<running CMake version>/), the build also removes the file that an earlier configure left, and the configure writes it again. A tree in which an earlier build already recorded a failed compiler identification for the running CMake version keeps that record; reset it with --clean.

The ovstage dependency tree that a local-ovstage build configures (OVCLASH_OVSTAGE_BUILD_DIR) gets the same toolchain arguments as the ovclash tree and the same reset, with either generator.

The solution carries debugger settings for these entry points. Press F5 on one of them:

Startup project

What F5 runs

ovclash.clash_api.capi.sample (the default) and ovclash.clash_suite_api.capi.sample

The sample with Example Dynamic Query over tests/data/time_sampled.usda: tolerance 0, start time 3, end time 20. No arguments are needed. The backend comes from the solution. The target depends on install_sdk, because its debugger PATH names the install tree. Reports go next to the executable.

ovclash.native.test

The packaged test from _build/install/<backend>/bin, with the OpenUSD plugin environment of the install tree. A Visual Studio build of this target also assembles the install tree after it links. If the install tree is still stale, build install_sdk or test_cpp first.

The sample arguments come from ovclash_get_visual_studio_sample_properties in cmake/OvClashVisualStudio.cmake. For ovclash.clash_api.capi.sample they are the following, where <checkout> is the ovclash/ directory of your checkout and <output dir> is the sample executable’s directory, <build tree>/<platform>/<configuration>:

--stage "<checkout>/tests/data/time_sampled.usda" --object-a /Root/STATION_TIME_SAMPLED --object-b /Root/Xform_Primitives --mode dynamic --tolerance 0 --start-time 3 --end-time 20 --query-name "Example Dynamic Query" --comment "A dynamic clash query over the animated platform from 3s to 20s." --json "<output dir>/dynamic_clash_api.json"

The Suite sample also writes dynamic_clash_suite_api.html and dynamic_clash_suite_api.ovclashdb.

The solution also has the rtx_viewer startup project, the ovRTX clash sample app.

rtx_viewer depends on install_sdk and setup_ovrtx_viewer. The build before F5 therefore prepares the install tree and the viewer virtual environment _build/deps/venv/ovrtx_viewer_<backend>. The native host rtx_viewer.exe (source/RtxViewerDebugEntrypoint.cpp):

  • embeds the packaged Python runtime and runs launch_ovrtx_viewer.py --skip-setup --in-process --wait-on-error in the same process;

  • writes viewer state and the ovRTX cache to _build/viewer/<backend>/<configuration>, as the script launchers do;

  • loads ovclash.dll from the build output directory, where its PDB is, and keeps the install tree on PATH for the runtime dependencies and OpenUSD plugins;

  • forces the Native Only debugger and sets _NT_SYMBOL_PATH to the build and install output directories.

--wait-on-error keeps the console open when Python fails during startup. The “Viewer environment” section of samples/ovrtx_clash_sample_app/README.md lists the viewer’s dependency pins and overrides.

Local ovstage source builds#

Building against a local ovstage checkout is opt-in. Packaging and publishing refuse such a build.

Setting

Meaning

Windows

Linux

Select the mode

Turns local ovstage mode on. Off by default.

build_ovstage.bat --build-local-ovstage, or OVCLASH_BUILD_LOCAL_OVSTAGE=ON

OVCLASH_BUILD_LOCAL_OVSTAGE=ON, as a variable or a -D option

OVCLASH_OVSTAGE_ROOT

The ovstage source checkout (a directory)

Defaults to an ovstage checkout beside the repository (build.bat). scripts/build.cmake rejects the staged _build/deps/pip-deps/ovstage/ovstage tree.

Defaults to an ovstage checkout beside the repository

OVCLASH_OVSTAGE_BUILD_DIR

The ovstage build tree (a directory)

Defaults to <OVCLASH_OVSTAGE_ROOT>/_build

Defaults to <OVCLASH_OVSTAGE_ROOT>/_build

OVCLASH_OVSTAGE_USD_ROOT

The OpenUSD root that ovstage builds against (a directory)

Defaults to the Packman OpenUSD payload _build/deps/target-deps/usd/release

Defaults to USD_ROOT from <build dir>/CMakeCache.txt when that file exists, else to the Packman OpenUSD payload of the build type

OVCLASH_OVSTAGE_ENABLE_CUDA

ON builds ovstage with CUDA storage (ON or OFF)

Defaults to OFF

Defaults to OFF

OVCLASH_AUTO_BUILD_DEPS

ON builds a missing ovstage runtime; OFF stops the build instead (ON or OFF)

Defaults to ON; --no-deps sets OFF

Defaults to ON; --no-deps sets OFF

Where it builds

–

The selected Windows toolchain

On the host

Dependency overrides is the full reference of these variables. None is required; the Windows and Linux columns give each default.

When the ovstage runtime is missing from the build directory, scripts/build.cmake configures and builds the top-level ovstage project with the packaged CMake and toolchain. To configure ovstage by hand, pass the same definitions. Before you begin, check out ovstage at <ovstage root>, and set <USD root> to the OpenUSD root that OVCLASH_OVSTAGE_USD_ROOT would select. The commands are for Linux. On Windows, let build_ovstage.bat --build-local-ovstage configure ovstage instead: it passes the toolchain and generator arguments of the ovclash tree, which a hand-run configure lacks:

cmake -S <ovstage root> -B <ovstage root>/_build \
    -DCMAKE_BUILD_TYPE=Release \
    -DOVSTAGE_ENABLE_CUDA=OFF \
    -DOVPOPULATION_BUILD_PYTHON_BRIDGE=OFF \
    -DUSD_ROOT=<USD root> \
    -Wno-dev
cmake --build <ovstage root>/_build --config Release --parallel
  • OVSTAGE_ENABLE_CUDA follows OVCLASH_OVSTAGE_ENABLE_CUDA, which defaults to OFF.

  • On Windows, the build also passes -DUSD_MS_LIB=<USD root>/lib/ov_25.11usd_ms.lib when that file exists. The monolithic namespaced OpenUSD payload needs it.

  • --no-deps or OVCLASH_AUTO_BUILD_DEPS=OFF stops the build instead of building ovstage.

Both commands exit with 0 on success. The next build_ovstage run in local ovstage mode then finds the runtime and prints Using ovstage dependency runtime: <directory>. When the runtime is still missing, it stops with ovstage runtime libraries were not found under <build dir>. Build ovstage first or enable OVCLASH_AUTO_BUILD_DEPS. A configure or build error of ovstage itself comes from the ovstage project; fix it in the ovstage checkout, then run both commands again.

A CUDA-enabled ovstage imports the CUDA runtime directly. The install step then reads the CUDA toolkit directories from the ovstage build’s CMakeCache.txt:

  • On Windows it installs cudart64_*.dll from CUDAToolkit_BIN_DIR into bin/.

  • On Linux it installs libcudart.so* into lib/. It searches CUDAToolkit_LIBRARY_DIR, then CUDAToolkit_BIN_DIR and the lib64 and lib directories beside it.

The build provenance of a local source build records "ovstage_source": "local". That is how wheel and SDK archive packaging recognize and refuse it.

Installed package layout#

A build installs into the SDK install tree, _build/install/<backend> by default. Packaging turns that tree into the SDK archive and the Python wheel, in _build/dist/<backend> by default.

SDK install tree#

scripts/install.cmake assembles the install tree. It validates the build provenance, runs cmake --install, then adds the dependency closure, licenses, documentation and skills, hardens ELF binaries and signs last.

Path

Contents

bin/

Windows: ovclash.dll, config.toml and, in an ovstage install tree, the ovstage and OpenUSD runtime DLLs with the ovstage plugin directories under bin/plugins/. Both platforms: the native test executable ovclash.native.test, which no SDK archive ships.

lib/

Linux: libovclash.so with its version chain, config.toml and, in an ovstage install tree, the ovstage and OpenUSD runtime libraries with the ovstage plugin directories under lib/plugins/. Windows: the import libraries. Both platforms: the CMake package under lib/cmake/ovclash (namespace ovclash::) and lib/pkgconfig/ovclash.pc.

pkgconfig/

A second ovclash.pc at the root location of OV Libraries V2, the Omniverse library guidelines

include/

Public headers

python/

The ovclash package, the ovclash_suite alias module and the omni.physxclashdetectioncore compatibility package

plugins/

The OpenUSD plugin registry and its resources under plugins/usd. The OpenUSD developer SDK archive also keeps its runtime dependency closure, including the OpenUSD plugin libraries, here.

samples/

Sample sources and the current platform’s launchers, samples/data/ with the stage fixtures, and ovclash_backend.txt (Backend markers)

docs/

docs/consumer/: the consumer documentation set at its source path, with the generated CHANGELOG.md; and docs/html/ when the producing build rendered the site

README.md, skills/

The SDK archive readme (from SDK_README.md) and the agent playbooks with their catalog skills/README.md

LICENSE.txt, ovclash-LICENSES.zip, ovstage-THIRD-PARTY-NOTICES.txt

The binary license and the third-party notices, including the OpenUSD v25.11 source-adaptation license on both backends. An ovstage install also carries the ovstage runtime’s notices as ovstage-THIRD-PARTY-NOTICES.txt; the zip holds a copy.

dependency_audit.txt

The dependency audit written by the install step

ovclash-build-provenance.json

The source and build identity (Build provenance)

include/ holds ovclash/*.h (including the generated version.h), ovclash_suite/*.h and exactly one producer-owned ovx header, ovx/dlpack/dlpack.h, because <ovclash/ovclash.h> includes it. ovx/string_types.h is not installed; a consumer takes it from the ovstage package (Linking).

Carbonite is linked statically, so the tree has no carb.dll or libcarb.so. The ovstage backend uses the carb.tasking plugin from ovstage:

  • A local ovstage install tree keeps it.

  • The product wheel and the ovstage SDK archive get it, with the rest of that runtime closure, from their pinned ovstage dependency.

  • The OpenUSD developer SDK archive has no carb.tasking plugin.

Points that matter when you change packaging:

  • pkgconfig/ovclash.pc repeats lib/pkgconfig/ovclash.pc at the OV Libraries V2 root location. Both come from cmake/ovclash.pc.in; only the prefix= depth differs.

  • scripts/package_licenses.py and scripts/package_deps.py write LICENSE.txt, ovclash-LICENSES.zip, the ovstage third-party notices and dependency_audit.txt at the root.

  • samples/data/ holds the fixtures that scripts/sample_data_files.cmake lists. The wheel stages the same list.

  • ovclash-build-provenance.json is copied from the build after it is validated.

  • docs/consumer/ is every page of docs/consumer/, preprocessed, with the generated CHANGELOG.md. It keeps its source path, so the shipped Markdown outside it (README.md, skills/ and the sample pages) links a consumer page as docs/consumer/<page>.md, and that link resolves in the archive and in a source checkout alike. docs/html/ is added beside it when _build/docs/ovclash/latest holds a rendered site.

An SDK archive is this tree without the native test executable. The ovstage archive also leaves out the ovstage runtime; The SDK archive explains how.

The SDK archive#

scripts/package_sdk.cmake turns an existing install tree into this platform’s archive:

  1. It reads the backend and the build type from the install’s provenance (scripts/sdk_package_context.cmake). A -DOVCLASH_OVSTAGE_ONLY or -DBUILD_TYPE you pass must match.

  2. For ovstage, it requires the wheel this build staged (the .ovclash-source-wheel marker). It checks this before it changes anything in the distribution directory.

  3. It deletes older archives of this platform and copies the install tree to <dist>/package/ovclash, a staging copy marked with .ovclash-sdk-staging.

  4. On both backends and in every configuration, it deletes the native test programs from the copy: every ovclash.<name>.test file (.exe on Windows) directly in bin/ or lib/, with its .pdb or .debug file. It prints Removed a native test program file from SDK staging: <path> for each file.

  5. For ovstage, it runs scripts/prepare_sdk.py on that copy, which removes the files that ovclash does not own. It also regenerates config.toml with empty plugin directories and a note that the separate ovstage dependency supplies the OpenUSD and plugin closure.

  6. For a Release build, it deletes every .pdb and .debug file from the copy.

  7. It writes ovclash-<version>-<platform>.zip on Windows or .tar.gz on Linux.

  8. It checks the archive with scripts/verify_release_artifact.py --sdk, adding --expect-ovstage for ovstage, and deletes the staging copy.

The install tree itself keeps the native test programs and the complete ovstage runtime closure, for native tests and diagnostics: test_cpp, Sentinel and the Visual Studio debugger run ovclash.native.test from its bin/. The unpublished OpenUSD archive keeps the rest of its install tree.

scripts/prepare_sdk.py removes the files that ovclash does not own:

Kept: owned by ovclash

Removed: owned by the ovstage dependency

ovclash.dll, ovclash.lib, ovclash.pdb, libovclash.so and its versioned names and .debug files

Every other file directly in bin/ or lib/

The ovclash.<name>.test programs and their symbols, which step 4 has already removed

bin/plugins/, lib/plugins/, bin/ovstage_usd_schemas/, lib/ovstage_usd_schemas/

config.toml, and subdirectories such as lib/cmake/ and lib/pkgconfig/

The top-level plugins/

The script refuses a directory that is not a marked staging copy, a copy without provenance, a directory link and a path that leaves the copy. It hashes every removed native file (.dll, .pyd, .dylib, .so, .so.*) and looks up the same file name in the staged wheel:

  • A removed file that the wheel does not supply stops packaging.

  • A file whose bytes match no copy in the wheel stops packaging, with one exception: a Windows DLL or .pyd of which the wheel has exactly one copy. For such a file the inventory records the wheel’s bytes, and the script prints Recorded the wheel's bytes for <path>; the local install copy differs.

It then writes the three dependency files with runtime_metadata_files from scripts/runtime_dependencies.py. KPI (benchmarks/kpi/evidence.py) rebuilds them with the same function, so change both together. For a pin <pin> and one removed file they are:

--- requirements.txt
ovstage==<pin>
--- ovclash-runtime-dependencies.json
{
  "schema_version": 1,
  "dependencies": [
    {
      "name": "ovstage",
      "version": "<pin>",
      "index_url": "https://pypi.org/simple",
      "release_url": "https://pypi.org/project/ovstage/<pin>/"
    }
  ]
}
--- ovclash-runtime-closure.json
{"dependency":{"index_url":"https://pypi.org/simple","name":"ovstage","release_url":"https://pypi.org/project/ovstage/<pin>/","version":"<pin>"},"native_files":[{"path":"bin/ovstage.dll","sha256":"<sha256 of the file in the pinned wheel>"}],"schema_version":1}

The closure file is one line of compact JSON with sorted keys, and native_files is sorted by path. The SDK archive consumer check (test_c_compat_sdk_archive, under CMake targets) and KPI compare an installed ovstage package with it.

The fields of ovclash-runtime-dependencies.json, which ovstage_dependencies() builds:

Field

Type

Required

Default or values

Description

schema_version

integer

Yes

1

The format version

dependencies

array of objects

Yes

Exactly one entry, ovstage

The external runtime dependencies

dependencies[].name

string

Yes

ovstage

The package name

dependencies[].version

string

Yes

The pin, a canonical dotted version

The exact version to install

dependencies[].index_url

string

Yes

https://pypi.org/simple

The public index that serves the pin

dependencies[].release_url

string

Yes

https://pypi.org/project/ovstage/<pin>/

The release page of the pin

The fields of ovclash-runtime-closure.json:

Field

Type

Required

Default or values

Description

schema_version

integer

Yes

1

The format version

dependency

object

Yes

The single entry of dependencies in ovclash-runtime-dependencies.json

The runtime that supplies the files

native_files

array of objects

Yes

Non-empty, sorted by path, unique

The dependency-owned native files that packaging removed

native_files[].path

string

Yes

A path relative to the SDK archive root, with / separators

Where the file sat in the install tree

native_files[].sha256

string

Yes

64 lowercase hexadecimal digits

The digest of that file in the pinned wheel

The script also replaces dependency_audit.txt with the install instruction:

External runtime: ovstage==<pin> from public PyPI.
Install with: python -m pip install -r requirements.txt
The ovstage runtime and its dependency closure are excluded from this archive.

On Linux it rewrites both ovclash.pc files for the separate runtime. These lines change:

ovstage_root=/OVCLASH_SET_ovstage_root
ovx_includedir=${ovstage_root}/include
Libs: -L${libdir} -lovclash -L${ovstage_root}/bin -Wl,--push-state,--no-as-needed,-l:libovstage-dynamic.so,--pop-state -Wl,-rpath,${libdir} -Wl,-rpath,${ovstage_root}/bin -Wl,-rpath-link,${ovstage_root}/bin -Wl,-rpath-link,${ovstage_root}/bin/plugins

A pkg-config consumer must define ovstage_root, for example with pkg-config --define-variable=ovstage_root=<site-packages>/ovstage --cflags --libs ovclash. pkg-config on Linux in the C/C++ quickstart gives the consumer steps.

Python wheel#

scripts/build_wheel.cmake builds the wheel from the install tree, never from the source tree. The build_wheel target, build_packages and the test_python_wheel validation step run it.

  1. It checks that the build, the installed provenance and the current sources agree (Build provenance).

  2. It stages the installed Python packages ovclash, omni and the ovclash_suite alias module. It writes ovclash/python/suite/_wheel_backend.py with BACKEND = "ovstage" or BACKEND = "openusd". When the distribution version differs from VERSION (off release branches, and always for OpenUSD), it writes that version into the staged _version.py only.

  3. It stages the native payload. The ovstage wheel gets only bin/ovclash.dll and bin/config.toml on Windows, or lib/libovclash.so, lib/libovclash.so.<major> and lib/config.toml on Linux. pip cannot restore symbolic links, so the wheel ships these two copies instead of the link chain. The OpenUSD developer wheel copies bin/, plugins/ and, on Linux, lib/ from the install tree.

  4. It stages the agent skills and the package README:

    • skills/, with its catalog skills/README.md, comes from the project root;

    • the package-root README.md is python/WHEEL_README.md;

    • the wheel’s long description on the package index is docs/consumer/README.md, the file the SDK archive ships at that path, with its links pointed at the published documentation site.

    The wheel ships no documentation pages: no docs/ and no docs/html/. Its Markdown names a consumer page with the label (SDK archive): in front of the reference.

  5. It stages samples/data/ and the Python samples (clash_api, clash_suite_api, legacy_clash_detection) with this platform’s launchers. It then removes native development files, bytecode and debug files with scripts/prepare_python_wheel.py.

  6. It copies the installed provenance verbatim to ovclash/ovclash-build-provenance.json.

  7. It runs setup.py bdist_wheel with SOURCE_DATE_EPOCH set to the time of the commit that last changed VERSION (a fixed constant without Git), so equal content gives equal bytes.

  8. It checks the wheel with scripts/verify_release_artifact.py --wheel.

Release artifact verification#

scripts/verify_release_artifact.py re-reads the packed bytes of a wheel (--wheel) or an SDK archive (--sdk). Packaging runs it on every artifact it writes, and --expect-ovstage adds the rules of a publishable ovstage artifact. It fails closed on the wheel’s identity:

  • exactly one ovclash/ovclash-build-provenance.json;

  • exactly one regular ovclash/python/suite/_wheel_backend.py, whose only statement is a literal BACKEND assignment of ovstage or openusd;

  • exactly one root-level <distribution>.dist-info/METADATA, parsed as email headers, with normalized distribution names;

  • the ovstage wheel carries exactly one bare ovstage dependency at the canonical pin. An OpenUSD wheel carries no spelling of it.

It also enforces these rules:

  • Release SDK archives and wheels reject debug sidecars and unstripped ovclash-owned ELF binaries (Symbols and stripping).

  • Wheels and SDK archives exclude native test executables. An SDK archive also excludes their .pdb and .debug files, in a Debug build too. Wheels exclude native development files as well.

  • Neither ovstage artifact may contain the dependency-owned ovstage runtime: the loader and runtime libraries, the OpenUSD monolith or plugins/. The ovstage SDK archive may not carry any other bin/ or lib/ library that ovclash does not own either.

  • The ovstage SDK archive must declare exactly ovstage==<pin>, from the public PyPI index, in both requirements.txt and ovclash-runtime-dependencies.json.

  • The ovstage SDK archive must carry a canonical ovclash-runtime-closure.json: exactly schema_version 1, that dependency, and a non-empty, sorted, unique native_files list of dependency-owned paths with lower-case SHA-256 digests. It is serialized as sorted, compact UTF-8 JSON with one trailing newline.

  • On Linux, the ovstage SDK archive’s pkg-config files must let a consumer link against the separately installed runtime through ovstage_root.

  • Every SDK archive must ship its Python bindings and samples/sample_python.py, with which its sample launchers prepare their interpreter. A Windows SDK archive must also ship samples/sample_build_root.bat, which selects the short sample build root. A missing, empty, duplicated or case-aliased helper fails with SDK is missing its sample helpers: <members>.

  • The OpenUSD developer SDK archive keeps its complete runtime closure.

  • Both artifacts require the schema-1 ovclash-build-provenance.json. Its dependency identity must match the checkout’s pin: OVSTAGE_VERSION for ovstage, or the pinned OpenUSD package and version. Packaging takes the expected values from the checkout, not from the artifact’s manifest or file name.

  • With --expect-ovstage, an OpenUSD wheel fails with only ovstage-backed wheels are publishable and an OpenUSD SDK archive with only ovstage-backed SDK archives are publishable.

Each packaging entry point passes the canonical pin (--expected-ovstage-version), and the wheel and SDK archive manifests are checked against it.

Backend markers#

The build records the backend in three files:

File

Where

Read by

samples/ovclash_backend.txt

An install tree, the SDK archive and the wheel’s package root. It holds one line, ovstage or openusd.

The clash_api and clash_suite_api sample launchers, to pick their default backend.

ovclash/python/suite/_wheel_backend.py

A wheel only, importable as ovclash_suite._wheel_backend. It defines BACKEND.

The Python loader, to set up the ovstage dependency. scripts/verify_release_artifact.py checks that it matches the wheel’s build provenance.

ovclash-build-provenance.json

The root of an install tree and of the SDK archive, and the wheel’s package root.

Release verification, which reads its backend field for an SDK archive (Build provenance).

Package identity#

Only the ovstage packages are products.

ovstage

OpenUSD

Built by

build_packages.sh / build_packages.bat (the default backend)

build_packages.* --backend openusd

Packaged from

_build/install/ovstage/

_build/install/openusd/

Output directory

_build/dist/ovstage/

_build/dist/openusd/

Version

<VERSION> on a release branch. Elsewhere a PEP 440 local segment follows.

The same, with openusd leading the local segment: <VERSION>+openusd on a release branch, <VERSION>+openusd.<local> elsewhere.

OpenUSD runtime in the wheel

Supplied by the pinned ovstage dependency that the wheel declares.

Bundled: the wheel carries its own OpenUSD closure and declares no ovstage dependency.

OpenUSD runtime in the SDK archive

Not bundled. requirements.txt pins the same exact ovstage version, which the consumer installs separately from public PyPI or a mirror.

Bundled: the archive carries its own closure.

Publishable

Yes

No

Each packaging run writes a wheel and an SDK archive with the same version. The openusd label is part of the PEP 440 local segment. It travels with the file and never changes the release segment, the part before +.

Build provenance and controlled comparisons#

Every install tree, SDK archive and wheel carries one ovclash-build-provenance.json. Packaging copies it and never rewrites it. An ovstage build from a clean checkout records:

{
  "schema_version": 1,
  "source_revision": "<HEAD commit, 40 hex digits>",
  "source_tree": "<git write-tree, 40 hex digits>",
  "source_dirty": false,
  "source_verified": true,
  "backend": "ovstage",
  "build_type": "Release",
  "generator": "Ninja",
  "ovclash_version": "<VERSION>",
  "ovstage_version": "<pin>",
  "openusd_package": null,
  "openusd_version": null
}

The template is cmake/ovclash-build-provenance.json.in; scripts/write_build_provenance.cmake fills it.

Field

Type

Required

Default or values

Description

schema_version

integer

Yes

1

The format version

source_revision, source_tree

string or null

Yes

40 hexadecimal digits, from Git or the content snapshot; null when unverified

The source identity (Source identity)

source_dirty, source_verified

boolean

Yes

true or false

The state of that identity

backend

string

Yes

ovstage or openusd

The backend of the build

build_type

string

Yes

Release or Debug

The selected configuration

generator

string

Yes

For example Ninja

The actual CMake generator

ovclash_version

string

Yes

The bare VERSION, without a local version label

The product version

ovstage_version

string or null

Yes

The ovstage pin; null for OpenUSD

The ovstage dependency

openusd_package, openusd_version

string or null

Yes

"OpenUSD" and the normalized version, for example "25.11"; null for ovstage

The OpenUSD dependency

ovstage_source

string

No: present only in a local ovstage source build

"local"

Marks a build that packaging and publishing refuse

Source identity#

The writer anchors ovclash to its parent directory as the expected repository root. It accepts Git hashes only when the index file exists and every Git probe succeeds:

Checkout state

source_verified

source_dirty

source_revision, source_tree

Clean and committed

true

false

HEAD and its index tree

Only staged changes

true

true

HEAD and the staged index tree

An unstaged change or an untracked, not ignored file anywhere in the repository

true

true, or false when the working-tree tree equals HEAD’s tree

HEAD and the working-tree tree

A missing index file, or a failed Git probe, for example a working-tree file that another process holds locked, a corrupt index or unmerged paths

false

true

null

No usable Git, or ovclash is not directly below the repository root

true

false

A content snapshot (scripts/source_snapshot.cmake)

source_dirty of a Git identity is true exactly when the recorded tree differs from the tree of the recorded HEAD. A staged change that the working tree has reverted therefore records HEAD’s tree as clean.

The working-tree tree is what git add --all followed by git write-tree would record, computed in a scratch copy of the index so the caller’s index never changes. The index tree of a clean or staged checkout is git write-tree of a scratch copy of the index as well. Neither computation takes the checkout’s index.lock. The git diff --quiet probe may take it briefly to refresh the file status cached in the index, and skips that refresh while another process holds the lock. Another Git process that holds it, such as an editor’s git status, therefore cannot make the identity fail. An index file that Git names but that does not exist leaves the identity unverified instead of hashing as the empty tree. scripts/kpi_startup.py computes the same trees and the same source_dirty, so KPI can reuse a build of uncommitted changes.

The content snapshot hashes the relative names and contents of the source files and the mapped shared-engine inputs. It skips generated outputs and dependency caches. Its IDs detect edits between build, install, packaging and KPI startup, but they are not Git object IDs. A file that cannot be read stops the snapshot instead of claiming a verified identity.

Unverified artifacts stay packageable and runnable. Benchmark tooling must reject them as evidence.

Visual Studio’s generated targets run with MSBuild’s packaged-tool ExecutablePath, which does not include host tools such as Git. The configure step therefore resolves Git once (OVCLASH_PROVENANCE_GIT_EXECUTABLE). The build, install and wheel checks reuse that executable. KPI startup reads the same cache entry from the selected backend’s default build tree, so a later PATH change does not switch identity modes. A -NOTFOUND value disables Git and selects the content snapshot.

When provenance is written and checked#

  1. The always-run target ovclash.build-provenance depends on the native target. After a successful build, including a no-op build, it writes the carrier <build tree>/ovclash-build-provenance-<configuration>.json. A failed build leaves the old carrier unchanged. A no-op build can thus record the current source identity without a relink.

  2. scripts/install.cmake recomputes the identity and compares it with the carrier before it clears the previous install. A direct cmake --install runs the same guard. The install gets a copy of the carrier.

  3. scripts/build_wheel.cmake compares the current identity with the carrier and the installed copy with the carrier before it replaces its staging. It then copies the installed manifest.

Each check fails with a diagnostic:

Condition

Message

No carrier for this configuration

The configured build has not completed a successful native build for <configuration>; missing build provenance carrier: <path>

Sources changed after the build

The source identity changed since the last successful native build. Rebuild the configured tree before installing or packaging it., followed by the changed fields and, when both identities are Git trees, up to 20 paths that differ between them

No installed manifest

Installed build provenance is missing: <path>. Run the install step for this configured build before packaging it.

Installed manifest differs from the carrier

The installed provenance does not match the current successful native build. Run the install step again before packaging it.

Keep the source tree fixed through build, install and packaging, including Python, header and documentation files. The identity covers every file of the Git repository that no ignore rule excludes, not only ovclash/. Any edit, new untracked file, git add, commit or checkout changes it, also when another tool makes the change while a validation runs.

The sources-changed message lists each field that changed as <field>: <recorded> -> <current>:

  • source_verified: true -> false, with the note that Git could not hash the current working tree: the index file is missing, or a Git command failed, for example because another process held a working-tree file open, the index is corrupt or a merge left unmerged paths. The sources need not have changed. Run git status in the checkout. If it fails, repair what its error names, such as a corrupt index. If it lists unmerged paths, finish or abort the merge. If it succeeds and lists neither, another process held a file open: close that process. Then run the step again.

  • source_tree, with the paths that differ between the recorded and the current tree: those files changed after the build. A, M, D and T mark added, modified, deleted and type-changed paths, such as a file replaced by a symbolic link. After 20 paths the list ends with the number of the rest. source_dirty changes with it when the checkout became clean or dirty.

  • source_revision: HEAD moved, through a commit, checkout or pull.

  • ovclash_version or ovstage_version: a version pin changed after the build.

The regenerated identity is removed after the comparison, so the message is the only record of the change. Rebuild the configured tree, or restore the listed files and run the step again.

Controlled two-backend comparisons#

A controlled comparison of the two backends needs two manifests that:

  • both have source_verified: true;

  • agree on source_revision, source_tree, build_type and ovclash_version;

  • are the expected distinct pair, ovstage and openusd, each with only its own dependency field.

source_dirty: true is valid for a verified staged tree; benchmark output must keep it. The generator is reported for diagnostics but need not match.

test_all.sh --backend both and test_all.bat --backend both enforce this as their last step, after both backends pass validation. They read only the two install trees they just assembled. The single-backend path never reads the other backend’s install, so a stale install cannot make a validation depend on run order. The same check runs by hand from ovclash/, with the Packman Python that a build staged.

Linux:

_build/deps/target-deps/python/bin/python3 scripts/verify_release_artifact.py --install-pair \
    _build/install/ovstage/ovclash-build-provenance.json \
    _build/install/openusd/ovclash-build-provenance.json

Windows:

_build\deps\target-deps\python\python.exe scripts\verify_release_artifact.py --install-pair _build\install\ovstage\ovclash-build-provenance.json _build\install\openusd\ovclash-build-provenance.json

When the pair matches, it prints backend provenance pair passed and exits with 0. Otherwise it prints one line per problem and exits with 1, for example:

error: openusd install source_verified must be true for a dual gate

Packaging policy#

  • No package bundles the MSVC runtime (MSVCP140.dll, VCRUNTIME140.dll, VCRUNTIME140_1.dll), although the Windows binaries import it. Consumers install the Microsoft Visual C++ Redistributable; the Overview states the requirement. Windows Debug validation stages the Debug CRT only in build-only directories under _build/; see The Windows Debug runtime.

  • ovclash.dll must not import omni.usd.dll directly.

  • Do not package omni.physx.* runtime libraries. No package carries physxSchema.dll or the PhysxSchema, PhysxSchemaAddition or OmniUsdPhysicsDeformableSchema registries.

  • For OpenUSD (--usd-mode namespaced), scripts/package_deps.py replaces plugins/ with the runtime dependency closure of the installed library. Its SKIP_PATTERNS leave out OpenUSD imaging, Hydra, rendering, validator, Python and other unused schema libraries. The closure carries no usdPhysics resources. Do not widen it without a documented reason.

  • An ovstage install tree keeps the ovstage runtime’s complete OpenUSD plugin registry, usdPhysics and usdLux included, because that runtime owns it. The ovstage SDK archive and wheel leave it to the ovstage dependency.

  • Keep the shared-engine source lists explicit in scripts/usdclash_sources.cmake. OpenUSD compiles the engine list, and ovstage compiles Intersection.cpp. CMakeLists.txt adds the OpenUSD adapter source/OpenUsdClashBackend.cpp separately.

The packaged native test checks the omni.usd.dll import, the schema registries, the presence or absence of usdPhysics and usdLux, and the absence of MSVC runtime DLLs on Windows.