Local Development#

This page is the reference for building, testing, packaging and documenting ovclash from a source checkout. Run every command on this page from ovclash/.

If you use a released package instead, start with the consumer pages: the Python package guide, the C/C++ Quickstart and Samples. Contributing describes how to propose a change and which validation each kind of change needs.

Building ovclash from a source checkout#

ovclash has its own CMake-script build system. Do not use the build commands of the other projects of this repository on it: the PhysX SDK, NVIDIA’s physics SDK, or Omni PhysX, the PhysX integration of Kit.

The engine sources are under source/usdclash/, and ovclash does not modify them. The explicit inventory in scripts/usdclash_sources.cmake lists the compiled inputs.

Prerequisites#

  • A Windows x86-64 host, or a Linux x86-64 or aarch64 host.

  • Network access for the first build. It downloads the build dependencies, including CMake and Python, into _build/deps/; see Dependency sources. No system CMake is needed.

  • On Windows, a build from the public source needs the installed Visual Studio 2022, or its Build Tools with the x64 C++ tools, and a Windows SDK. “Public source builds” in the repository README.md describes the toolchain selection. The wrappers use the packaged vswhere and Ninja.

  • On Linux, a public source export builds on the host with the system’s GCC, and its output must meet the ELF baseline; see Wrapper flags.

Dependency sources#

The first build stages everything it needs below _build/deps/. Later builds reuse it.

Dependency

Staged in

Overrides

The packages that deps/*.packman.xml declare for Packman, NVIDIA’s package fetcher, such as CMake, Python, OpenUSD, PhysX and Carbonite (NVIDIA’s plugin and runtime framework) for the target, and Ninja and, on Windows, vswhere for the host

_build/deps/target-deps and _build/deps/host-deps, through the Packman cache _build/deps/packman-cache

PM_PACKAGES_ROOT moves the Packman cache. OVCLASH_PACKMAN_OVERRIDE_DIR names an override directory that Packman tries before the remotes listed in tools/packman/config.packman.xml. OVCLASH_EXTERNAL_TARGET_DEPS and OVCLASH_HOST_DEPS point the build at other target and host dependency roots.

The pinned wheel of ovstage, the runtime through which ovclash reads USD, version OVSTAGE_VERSION

Downloaded with pip from pip’s configured package index into _build/deps/downloads/ovstage, checked against its SHA-256 pin in OVSTAGE_SHA256SUMS, and installed into _build/deps/pip-deps/ovstage

OVSTAGE_WHEEL_PATH names a wheel on disk. OVCLASH_PIP_OVERRIDE_DIR names a directory that holds it. OVSTAGE_PIP_REQUIREMENT names a pip requirement, which pip download resolves.

The pip packages of the Python test environments and of the wheel build environment

_build/deps/venv and _build/deps/.venv_wheel_build

pip’s own configuration selects the index.

A public source build on Windows uses the installed Visual Studio 2022 and Windows SDK named in Prerequisites; the public manifests pin no compiler, Windows SDK or signing tool.

Both backends (the scene-reading implementation that a build compiles in; Backends and trees) stage the ovstage wheel: the ovstage backend builds against the ovstage SDK and runtime in it, and the OpenUSD backend takes its ovx/ headers from it. The wrappers never look for a sibling source checkout of ovstage or of any other project.

Unless an override names a wheel, the build runs pip download --no-input --no-cache-dir --no-deps --only-binary=:all: --platform <tag> ovstage==<OVSTAGE_VERSION> against the index pip is configured to use: public PyPI unless PIP_INDEX_URL, PIP_EXTRA_INDEX_URL or a pip configuration file name another. The download is anonymous and noninteractive: a credential, Poetry configuration or account is not required. pip keeps no copy in its own cache: the build caches the wheel in the project-local _build/deps/downloads/ovstage directory and stops unless the wheel matches its SHA-256 pin in OVSTAGE_SHA256SUMS. A failed download stops the build with pip’s exit code and the variables that select the index. To build offline, download the wheel yourself and set OVSTAGE_WHEEL_PATH to it, or put it in the directory that OVCLASH_PIP_OVERRIDE_DIR names.

The ovRTX sample viewer setup installs the same pin: the wheel that an ovstage build downloaded and verified, or else ovstage==<OVSTAGE_VERSION> from the same index. It installs the pinned ovRTX wheel from NVIDIA’s public package index, which the PyPI ovrtx release also installs from, and pip checks it against its SHA-256 pin. It is anonymous too; no credential is required.

Dependency overrides lists every override and how the scripts read it. Dependency staging gives the order in which the build selects the ovstage wheel, and the checks of the include tree of the ovx headers.

Common tasks#

Before you begin: the host meets the Prerequisites, and it can reach the hosts that Dependency sources names, because the first step downloads the dependencies.

Run these in order for a first build. Each later command reuses what the earlier ones built. Use the Linux column on Linux and the Windows column on Windows.

Step

Linux

Windows

Success

1. Build the product backend into its install tree

./build_ovstage.sh --release

build_ovstage.bat --release

Exit code 0, and _build/install/ovstage holds the library

2. Run the packaged native tests

./build_ovstage.sh --release --test

build_ovstage.bat --release --test

Exit code 0

3. Run the full validation

./build_ovstage.sh --release --validate

build_ovstage.bat --release --validate

The run ends with All validation checks passed! No bugs, only features...

4. Check the documentation links

./build_docs.sh --links-only

build_docs.bat --links-only

Two documentation payload OK lines and exit code 0

5. Package the wheel and SDK archive

./build_packages.sh --backend ovstage --release

build_packages.bat --backend ovstage --release

Exit code 0, and the wheel and the SDK archive are in _build/dist/ovstage

A failing step stops with a nonzero exit code and names what failed. Troubleshooting lists the common build, download and validation failures, and Validation output shows how a failed validation step reads.

These programs answer a lone --help or --version before they do any work:

  • the build, documentation and packaging frontends, and those of Sentinel, the correctness campaign, and of KPI, the performance benchmark suite;

  • the C API samples and the native test programs;

  • the Sentinel helpers;

  • the rtx_viewer debugger host of the ovRTX sample viewer.

test_all prints its usage with --help but has no --version. Repository frontends report the checkout’s VERSION, including any prerelease suffix. Native executables and the Python packages report the numeric version of the compiled or loaded runtime. Native executables print their banner on stderr, so their JSON or binary stdout keeps its format.

Backends and trees#

ovclash builds one backend per build tree. Each backend owns its own trees, so both can exist side by side for comparison.

Before you begin: the host meets the Prerequisites and can reach the hosts that Dependency sources names, because the first build of either backend downloads its dependencies.

On Linux:

./build_ovstage.sh --release      # the product backend
./build_openusd.sh --release      # the unpublished parity backend

On Windows:

build_ovstage.bat --release
build_openusd.bat --release

Each command prints ovclash build completed successfully., then ovclash install tree assembled at <install-dir>, where <install-dir> is the backend’s install tree in the table that follows, and exits with code 0. A failed configure stops with CMake configuration failed (exit code: <n>), and a failed compile with Build failed (exit code: <n>); both exit nonzero. Troubleshooting lists the common build and download failures.

Backend

Build tree

Install tree

Distribution output

ovstage (Ninja, and all Linux builds)

_build/compile/ovstage/ninja

_build/install/ovstage

_build/dist/ovstage

ovstage (Visual Studio, the Windows default)

_build/compile/ovstage/vs

_build/install/ovstage

_build/dist/ovstage

OpenUSD (Ninja, and all Linux builds)

_build/compile/openusd/ninja

_build/install/openusd

_build/dist/openusd

OpenUSD (Visual Studio)

_build/compile/openusd/vs

_build/install/openusd

_build/dist/openusd

_build/ holds every generated output, but it is not a CMake build tree. Never configure CMake directly in it. Besides the build, install and distribution trees of the backend table, it holds these outputs:

Path

Contents

_build/deps/

Shared dependency staging. It holds the Packman dependencies (target-deps, host-deps), the Packman cache and overrides (packman-cache, packman-override), the staged ovstage wheel (pip-deps/ovstage) and its download cache (downloads/ovstage). It also holds the local virtual environments: venv/, and the wheel build and smoke environments .venv_wheel_build and .venv_wheel_smoke.

_build/validation/<backend>/<generator>/<configuration>/

A validation run’s runtime evidence: task logs, the command log, sample outputs and timing caches. <generator> is ninja, vs, or external-<id> for a BUILD_DIR outside _build/compile.

_build/samples/

Native sample build trees (build_samples).

_build/smoke/

Extracted SDK archive and wheel of the no-GPU smoke test of the SDK archive.

_build/c_compat_<leg>/

C-consumer check trees.

_build/test_tmp/

Test scratch files.

_build/coverage/

Opt-in Python coverage data.

_build/docs/

Rendered documentation.

_build/docs-link-check/

Link-check stages. A passing check removes its stage; a failing one keeps it for inspection.

_build/sentinel/, _build/sentinel-local/, _build/portable-inputs/

Sentinel work areas; see the Sentinel guide.

_build/kpi/, _build/kpi-openusd/

Default KPI outputs of the ovstage and OpenUSD backends; see the KPI guide.

_build/benchmarks/

Compile output of the C++ benchmark launchers (run_matrix_decomposition.* builds into _build/benchmarks/matrix_decomposition); see benchmarks/README.md.

_build/benchmark-reports/

Default reports of the standalone benchmarks (the backend_timings JSON and Markdown) and the documented --output-root of the directory_serializer examples.

_build/viewer/<backend>/<configuration>/

State and cache of the ovRTX sample viewer.

Deleting _build/ removes every dependency, build, install and distribution tree. The next build bootstraps from scratch.

On Linux, _build/ itself may be a symbolic link to another location, such as a larger drive. On Windows, the packaged CMake cannot resolve a junction, so clean, install and packaging refuse a junctioned _build/. Links further down, inside _build/, are refused wherever a generated directory would be replaced or removed. To move only the dependencies, use the dependency overrides, such as PM_PACKAGES_ROOT.

Install trees are per backend, not per configuration. The install step deletes the previous tree before it assembles a new one. A Debug install therefore replaces the Release install of the same backend, and an install from the Ninja tree replaces one from the Visual Studio tree. On Windows, close any process that holds files from an install tree before you rebuild it.

Builds assemble the install tree by default. Pass --no-install for a faster build-only iteration.

--clean, and the clean step of --rebuild, removes:

  • the selected compile tree;

  • the backend’s install tree and its distribution directory (both generators share them);

  • that compile tree’s validation evidence for every configuration (_build/validation/<backend>/<generator>/);

  • the sample build root.

It keeps _build/deps, the other generator’s compile tree, the other backend’s trees and the viewer state, _build/viewer/<backend>.

An explicit BUILD_DIR (a Linux -DBUILD_DIR=... option or a direct cmake -P call) under _build must be one of the four compile trees of the backend table. Any other build tree must be outside _build. Its validation evidence goes to _build/validation/<backend>/external-<id>/.

The distribution directory follows the install root alone, so the wheel and the SDK archive of one install land in one directory:

Install root

Distribution directory

_build/install/<name>

_build/dist/<name>

An explicit _install--prefixed root at the top of the checkout, such as _install-ovstage-profile

_build/dist/ plus the name after the prefix, here _build/dist/ovstage-profile

Any other install root

_build/dist/external-<id>, keyed by the install path

The install step recreates the chosen install root, so never point INSTALL_DIR at data you need to keep.

Dependency staging describes how the build stages ovstage and the ovx headers for both backends.

Install step#

The install step, scripts/install.cmake, turns the build outputs into the relocatable install layout. The install_sdk CMake target brings the library and the native tests up to date and then runs it. The step does this:

  1. It deletes the previous install tree and runs cmake --install for the selected configuration.

  2. It runs scripts/package_deps.py, which writes dependency_audit.txt. For OpenUSD the script copies the namespaced OpenUSD dependency closure, and scripts/verify_pyless_closure.py then checks that the closure is Python-free. For ovstage, CMake install rules select the closure.

  3. It assembles the license payload, the documentation and the agent skills.

  4. On Linux it strips the ovclash-built ELF binaries of a Release install and enforces the GLIBC 2.35 / GLIBCXX 3.4.30 baseline.

  5. On Windows, when code signing is enabled, it signs the binaries last. A --validate run whose plan has the sign_sdk step signs in that step instead.

It compiles nothing, builds no wheel or archive and uploads nothing. The configuration selects only the ovclash-owned binaries: a Debug ovstage install holds Debug ovclash binaries and symbols over the published Release ovstage, OpenUSD and Carbonite closure.

Wrapper flags#

build_ovstage.* and build_openusd.* accept the flags of this table. Any other argument stops the wrapper with Unknown option: before it builds.

Flag

Meaning

--release / --debug

Configuration. Defaults to Release.

--clean

Delete this backend’s build, install and distribution trees, the build tree’s validation evidence and the sample build tree. Builds nothing.

--rebuild

Delete the same trees, then build.

--generate

Configure only; no compile.

--target NAME

Build one CMake target.

--install / --no-install

Assemble the install tree (the default), or skip it.

--test

Build, install and run the packaged native tests.

--validate

Run the full validation flow for this backend; see Test and validate.

--prepare-sentinel

Rebuild the Sentinel helpers with the tree’s compiler. Normal builds already include them. With --stage-inputs, also stage them.

--stage-inputs

Copy the SDK install tree, its Python runtime and the Sentinel helpers to _build/portable-inputs/<backend>/<configuration>. Compiles nothing.

--no-deps / --auto-deps

In local-ovstage mode, stop when the local ovstage runtime is missing, or build it (the default).

--help, -h, --version

Print information and exit. Recognized only as the only argument.

The Linux wrappers also accept short aliases (-r, -d, -c, -x, -g, -t NAME) and one more flag:

Flag

Meaning

-D<NAME>=<VALUE>

Pass a definition through to the CMake scripts.

The Windows wrappers accept long flags only and reject -D options. Set the matching environment variable instead. They add these flags:

Flag

Meaning

--vs / --ninja

Visual Studio (the default) or Ninja generator. The GENERATOR environment variable (vs or ninja) sets the default.

--generate-vs

Configure a Visual Studio tree only. Visual Studio solutions and F5 debugging describes how to use it.

--build-local-ovstage

Build against a local ovstage checkout: OVCLASH_OVSTAGE_ROOT, by default an ovstage checkout beside the repository.

--setup-ovrtx-viewer

Prepare the ovRTX sample viewer environment.

--build-local-ovui

Use a local checkout of ovui, the package that provides the viewer’s omni.ui user-interface toolkit, for the viewer setup.

On Linux:

  • Set OVCLASH_BUILD_LOCAL_OVSTAGE=ON, or pass -DOVCLASH_BUILD_LOCAL_OVSTAGE=ON, instead of --build-local-ovstage. OVCLASH_OVSTAGE_ROOT defaults to an ovstage directory beside the repository checkout.

  • Run setup_ovrtx_viewer.sh instead of --setup-ovrtx-viewer. It accepts --build-local-ovui.

  • Ninja is the only generator.

Local-ovstage mode builds against an ovstage source checkout instead of the staged wheel. Packaging and publishing reject such builds. Local ovstage source builds describes the mode.

Rules for combining flags:

  • --prepare-sentinel and --stage-inputs can follow --validate in the same invocation. After a passing validation, the wrapper only stages, and only with --stage-inputs: the validated build has already produced the Sentinel helpers.

  • Neither --prepare-sentinel nor --stage-inputs can be combined with --test, --generate, --clean, --rebuild, --target, --install or --no-install. On Windows, they also cannot be combined with --generate-vs. On Windows they cannot be combined with --setup-ovrtx-viewer either.

  • --validate cannot be combined with --generate or --clean.

On Linux, the install step enforces an ELF release contract with the manylinux_2_35 baseline (GLIBC <= 2.35, GLIBCXX <= 3.4.30). A host build on a newer distribution cannot meet it. A public source export always builds on the host, so build on Ubuntu 22.04 or a compatible environment. For a host build whose output you never publish, SKIP_GLIBC_CHECK=1 waives only the ABI baseline check.

Test and validate#

Before you begin: the host meets the Prerequisites. Each command builds and installs what it needs. The test_ovrtx_sample step of a validation also installs the viewer’s Python packages from the package indexes; Validation steps shows how to drop it offline.

On Linux:

./build_ovstage.sh --release --test        # packaged native tests only
./build_ovstage.sh --release --validate    # full validation, one backend
./test_all.sh --release                    # full validation, both backends
./test_all.sh --backend ovstage --release  # full validation, one backend
./build_openusd.sh --release --target test_python_runtime   # Python runtime suite only

On Windows:

build_ovstage.bat --release --test
build_ovstage.bat --release --validate
test_all.bat --release
test_all.bat --backend ovstage --release
build_openusd.bat --release --target test_python_runtime

Each command exits with code 0 when everything it ran passed. Every --validate run, including each backend run of test_all, ends with All validation checks passed! No bugs, only features...; Validation output shows a passing and a failing run, and Troubleshooting lists the common failures.

test_all validates both backends by default (--backend both, or --both):

  1. It prints its plan.

  2. It runs each selected backend wrapper, OpenUSD first, with your other options followed by --validate.

  3. After both backends pass, it checks the two installs’ ovclash-build-provenance.json files. Both must be source-verified and record the same source revision, source tree, build type and ovclash version.

test_all rejects --rebuild, --target, --static-carb and --dynamic-carb. test_all.sh also rejects the Windows-only generator flags.

An install built from a Git checkout records the working tree it was built from: HEAD and, with local changes, the tree of every staged, unstaged and untracked, not ignored file. Both installs of a two-backend run must be built from the same working tree, so do not edit sources between the two builds.

To run one native test or one Python test module instead of a whole step, see Run focused tests. Contributing lists the validation each kind of change requires.

Validation steps#

Each --validate run first builds and installs (build, install_sdk). A public source build has no signing step unless OVCLASH_CODESIGN is on, which needs a staged signing tool; then a sign_sdk step signs the install right after install_sdk. Code signing describes when signing runs. The run then executes these steps in order:

Step

What it does

test_c_compat

Compiles, links and runs a C consumer against the install tree.

test_cpp

Runs the packaged native tests.

test_python_runtime

Runs the sharded Python runtime tests.

test_python_wheel

Builds the wheel (build_wheel), then checks it in a clean virtual environment: smoke queries plus the shipped-docs link check.

test_ovrtx_sample

Runs the ovRTX sample viewer’s one-shot smoke against the install tree. It renders only when OVCLASH_TEST_OVRTX is set.

test_samples

Checks the sample result counts, IDs, ordered pairs and mesh CRCs.

test_no_clash_dependency

Checks that nothing references the Kit clash extension sources.

test_ovx_package_coherence

Checks ovx package coherence with synthetic header layouts.

The steps named in OVCLASH_VALIDATE_EXTRA_TARGETS

Run in the order given; the table of opt-in steps in this section lists them.

test_c_compat_sdk_archive

Packages the SDK archive (package_sdk), then runs a pure-C consumer against the extracted archive.

A signing failure stops the run before the tests and packaging.

A full run writes both a wheel and an SDK archive to _build/dist/<backend>. Debug and Release, and the Visual Studio and Ninja trees, share that directory, so the latest run replaces the earlier artifacts. Runtime evidence stays apart per tree and configuration. For the ovstage archive, test_c_compat_sdk_archive first installs the archive’s requirements.txt offline, from the ovstage wheel the build staged, into a separate environment. It then checks the installed native files against the archive’s ovclash-runtime-closure.json inventory.

--validate builds the Sentinel executables but runs neither Sentinel nor its checker tests, and it runs no KPI workloads.

OVCLASH_VALIDATE_EXTRA_TARGETS appends opt-in steps:

Step

What it runs

build_docs

The documentation render. A public source build renders the public site as a gate only; otherwise the render is staged into the install tree’s docs/html.

test_sentinel_checkers

The Sentinel controller and checker tests.

package_sdk

The packaging of the SDK archive as an explicit step. Every run packages anyway, so this does not package twice.

test_python_sample_app

The ovRTX sample-app Python suite under tests/sample_app_tests/.

An unknown extra name is fatal. OVCLASH_VALIDATE_EXCLUDE_TARGETS drops steps. An unknown exclude name only warns. Both take a ;- or space-separated list. Set them as environment variables, or, on Linux and in direct validate_all.cmake calls, as -D options. For example, on Linux:

OVCLASH_VALIDATE_EXTRA_TARGETS=build_docs ./build_ovstage.sh --release --validate

On Windows, in PowerShell:

$env:OVCLASH_VALIDATE_EXTRA_TARGETS = "build_docs"
.\build_ovstage.bat --release --validate
Remove-Item Env:OVCLASH_VALIDATE_EXTRA_TARGETS

Without OVCLASH_TEST_OVRTX the test_ovrtx_sample step only detects and needs no GPU, but it installs the viewer’s Python packages from the package indexes. Drop it where that is not possible. On Linux:

OVCLASH_VALIDATE_EXCLUDE_TARGETS=test_ovrtx_sample ./build_ovstage.sh --release --validate

On Windows, in PowerShell:

$env:OVCLASH_VALIDATE_EXCLUDE_TARGETS = "test_ovrtx_sample"
.\build_ovstage.bat --release --validate
Remove-Item Env:OVCLASH_VALIDATE_EXCLUDE_TARGETS

Validation output#

Validation first prints a numbered plan. Each row names a step and what it checks. A step that needs a prerequisite script lists it:

-- Validation plan (11 steps):
--    1. build                       Build the native runtime (initial)
--    2. install_sdk                 Assemble and harden the installed SDK
--    3. test_c_compat               Compile, link and run a C consumer against the installed SDK
--    4. test_cpp                    Run the packaged native tests, with a result for every test
--    5. test_python_runtime         Run sharded Python runtime tests against the installed SDK
--    6. test_python_wheel           Check wheel payload and docs, install offline, and run Python API smoke checks
--       Prerequisite: build_wheel (reused after the first run)
--    7. test_ovrtx_sample           Run the ovRTX validation app one-shot smoke
--    8. test_samples                Check sample result counts, IDs, ordered pairs and mesh CRCs
--    9. test_no_clash_dependency    Check for references into the Kit clash extension sources
--   10. test_ovx_package_coherence  Check OVX package coherence with synthetic header layouts
--   11. test_c_compat_sdk_archive   Compile, link and run a C consumer against the SDK archive
--       Prerequisite: package_sdk (reused after the first run)

With OVCLASH_CODESIGN on, the plan has sign_sdk (Prepare the signing tool and sign the installed SDK when enabled) as step 3, and the later steps are numbered one higher.

Each step then prints a banner (Step <n>/<count>: <name>), its command, and a closing status line. A test step also prints Total tests run: <n>. The run ends with a summary table and the verdict. <time> stands for each measured duration:

-- ========================================================================
-- Validation summary: ovstage backend, Release, passed after <time>
-- Timings cover this validation invocation only.
-- ========================================================================
--   STATUS   ELAPSED  STEP
--   OK        <time>   1. build (initial)
--   OK        <time>   2. install_sdk
--   OK        <time>   3. test_c_compat
--   OK        <time>   4. test_cpp
--   OK        <time>   5. test_python_runtime
--   OK        <time>   6. Build Python wheel (build_wheel)
--   OK        <time>   6. Validate Python wheel (test_python_wheel)
--   OK        <time>   7. test_ovrtx_sample
--   OK        <time>   8. test_samples
--   OK        <time>   9. test_no_clash_dependency
--   OK        <time>  10. test_ovx_package_coherence
--   OK        <time>  11. Package SDK archive (package_sdk)
--   OK        <time>  11. Validate SDK archive C consumer (test_c_compat_sdk_archive)
--
-- Task logs: <validation-dir>/run_parallel_logs/<suite>/<task>.log
-- Commands:  <validation-dir>/validation_commands.log
--
-- All validation checks passed! No bugs, only features...

The verdict line is the last line validation prints. The wrapper then prints its total time.

How to read the table:

Status

Meaning

OK

The step passed.

SKIPPED

sign_sdk signed nothing.

FAILED

The step failed. The row ends with (exit code: <n>).

NOT RUN

The run stopped before this step.

  • A prerequisite script shares its target’s step number and has its own timer. Step 6 separately builds and validates the Python wheel; step 11 separately packages the SDK archive and validates its C consumer. These display labels keep the original target names in parentheses.

  • The build row reads build (initial), or build (incremental) when the build tree was already configured.

  • Timings cover only this invocation. An incremental run excludes the earlier build, install and documentation time, and says so under the summary heading.

A failed run prints the same table, with FAILED in the summary heading. The table shows the failed step and every step the run did not reach:

-- Validation summary: ovstage backend, Release, FAILED after <time>
...
--   OK        <time>   4. test_cpp
--   FAILED    <time>   5. test_python_runtime (exit code: 1)
--   NOT RUN        -   6. Validate Python wheel (test_python_wheel)
--   NOT RUN        -   7. test_ovrtx_sample
...

It then prints the failed command with its working directory, and stops with <target> failed in <script>.cmake (exit code: <n>).

The output is colored. A non-empty NO_COLOR or TERM=dumb turns the colors off. On Windows the colors follow whether the output is a console: redirected to a file or piped to another program, it is plain. Elsewhere colors also reach redirected output, so set either variable for plain logs.

Validation evidence#

Compiler output, the build provenance and validation_receipt.json stay in the compile tree. The C-consumer checks build in _build/c_compat_<leg>. The run’s other runtime evidence goes to the tree’s validation directory, <validation-dir>: _build/validation/<backend>/<generator>/<configuration>, for example _build/validation/ovstage/vs/Release.

File

Contents

<validation-dir>/validation_commands.log

Each step’s command, with credentials and known secret values masked. Masking is best effort. When you rerun a step from the log, supply the masked values yourself.

<validation-dir>/run_parallel_logs/<suite>/<task>.log

The output of each parallel task; see Parallel tests and shard planning.

validation_receipt.json, in the compile tree

The plan, each step’s status and elapsed time and, at the end, SHA-256 digests of the installed native libraries and the packaged artifacts. KPI preparation reads it; Supported workflows in the KPI contracts defines each field with its type and values.

Sentinel, the engine-correctness and serialization-equivalence workflow, is separate. The Sentinel guide covers test_sentinel.*, automatic input preparation and the checker tests.

Other validation runs#

Before you begin: the host meets the Prerequisites. On Linux, the ELF release contract in install.cmake also needs a build environment whose glibc is no newer than the manylinux_2_35 baseline (the Python platform tag for Linux binaries that need at most glibc 2.35); see Wrapper flags.

To validate every backend and configuration that CI builds on your platform, run each wrapper with --validate. On Linux:

./build_ovstage.sh --release --validate
./build_ovstage.sh --debug --validate
./build_openusd.sh --release --validate
./build_openusd.sh --debug --validate

On Windows:

build_ovstage.bat --release --validate
build_ovstage.bat --debug --validate
build_openusd.bat --release --validate
build_openusd.bat --debug --validate

Each run passes when it ends with All validation checks passed! No bugs, only features... and exits with code 0. A failing run prints FAILED in its summary table, as Validation output shows; Troubleshooting lists the common build and download failures.

Add the opt-in steps you need, and quote the semicolon-separated values. On Linux:

OVCLASH_VALIDATE_EXTRA_TARGETS="build_docs;package_sdk" \
./build_ovstage.sh --release --validate

On Windows, in PowerShell:

$env:OVCLASH_VALIDATE_EXTRA_TARGETS = "build_docs;package_sdk"
.\build_ovstage.bat --release --validate
Remove-Item Env:OVCLASH_VALIDATE_EXTRA_TARGETS

Add the ovRTX sample-app suite the same way. On Linux:

OVCLASH_VALIDATE_EXTRA_TARGETS="test_python_sample_app;build_docs;package_sdk" \
./build_ovstage.sh --release --validate

On Windows, in PowerShell:

$env:OVCLASH_VALIDATE_EXTRA_TARGETS = "test_python_sample_app;build_docs;package_sdk"
.\build_ovstage.bat --release --validate
Remove-Item Env:OVCLASH_VALIDATE_EXTRA_TARGETS

Run the ovRTX rendering smoke on a machine with a GPU and Vulkan, the Khronos graphics API; see OVCLASH_TEST_OVRTX in Build and test environment variables.

Python coverage. The opt-in test_python_coverage target reruns the Python runtime suite under coverage.py and writes _build/coverage/python_tests/coverage.json. scripts/parse_coverage.py reports it per shipped package and exits with status 1 when a package falls below the minimum. Build the ovstage backend first, then run, on Linux:

cmake -DBUILD_DIR=_build/compile/ovstage/ninja -DTARGET=test_python_coverage -DCONFIG=Release -P scripts/build_target.cmake
python3 scripts/parse_coverage.py _build/coverage/python_tests/coverage.json

On Windows:

.\_build\deps\target-deps\cmake\bin\cmake.exe -DBUILD_DIR=_build/compile/ovstage/vs -DTARGET=test_python_coverage -DCONFIG=Release -P scripts/build_target.cmake
python scripts\parse_coverage.py _build/coverage/python_tests/coverage.json

Use the packaged CMake under _build/deps/target-deps/cmake/bin when no system CMake is on the path. Without the ovstage build, build_target.cmake stops with No configured build tree at <path> (CMakeCache.txt is missing); a failing test stops it with Build failed (exit code: <n>). Python coverage describes the gate.

Sentinel and KPI inputs. To stage the inputs that a local Sentinel or KPI run reads, add --stage-inputs to the Release validation, for example ./build_ovstage.sh --release --validate --stage-inputs. Staging copies the validated SDK install tree, its Python runtime and the Sentinel helpers into _build/portable-inputs/<backend>/Release without compiling. run_kpi and test_sentinel prepare these inputs themselves when they are missing; see Automatic preparation and the Sentinel guide.

Local Windows validation usually skips Authenticode signing (Microsoft’s code-signing format); the KPI quick start gives the commands that prepare Release inputs by hand, and automatic preparation sets OVCLASH_CI_REF_PROTECTED itself. OVCLASH_CI_REF_PROTECTED=false records the unprotected development ref in the validation receipt, which KPI preparation requires before it accepts that ovstage skip. An OpenUSD skip does not depend on the ref; see Supported workflows.

Source exports. Git is optional for the local build, packaging, KPI and baseline workflows. The build provenance contract describes the content fingerprints used when Git metadata is unavailable.

Parallel tests and shard planning#

--validate runs native test groups, Python shards and sample checks concurrently. It uses at most min(task count, CPU count, 16) workers. The validation steps themselves run one after another.

Setting

Effect

OVCLASH_PARALLEL_JOBS=N

Caps the workers at N.

OVCLASH_PARALLEL_TESTS=OFF

Forces one worker.

validate_all.cmake reads both from -D or the environment; -D takes precedence. Called directly, test_cpp.cmake, test_python_runtime.cmake and test_samples.cmake run one task at a time unless OVCLASH_PARALLEL_TESTS=ON. test_samples.cmake reads it only from -D.

Before you reproduce a failure with one worker: the host meets the Prerequisites. The rerun is a full --validate run, which builds and installs what it needs, as Test and validate describes.

On Windows, in PowerShell, use the environment, because the Windows wrapper rejects -D options:

$env:OVCLASH_PARALLEL_JOBS = "1"
.\build_ovstage.bat --release --validate
Remove-Item Env:OVCLASH_PARALLEL_JOBS

On Linux, pass the option to the wrapper:

./build_ovstage.sh --release --validate -DOVCLASH_PARALLEL_JOBS=1

The validation header then reads Parallel tests:    ON (max workers = 1). The rerun passes as any --validate run does: it ends with All validation checks passed! No bugs, only features... and exits with code 0. When a task fails again, the console prints its output, which also stays in <validation-dir>/run_parallel_logs/<suite>/<task>.log; Validation output shows how a failed step reads, and Troubleshooting lists the common failures.

When you call scripts/validate_all.cmake directly, add -DOVCLASH_PARALLEL_JOBS=1 to the same backend and build options. One worker runs the same shards one after another. It does not limit the native libraries’ own threads.

Python shards come from the current unittest discovery, so adding, renaming or removing tests needs no maintained test-name list:

  • Every run recalculates the shard count from the test inventory, the worker count and the per-test durations cached under <validation-dir>/python_test_durations/<suite>/.

  • PYTHON_TEST_SHARD_SIZE and PYTHON_TEST_SHARD_SECONDS override the derived shard size and time target.

  • A module’s literal PYTHON_TEST_MIN_SHARDS = N raises its minimum shard count.

  • The derived time target is a planning goal, not a timeout. More shards cannot shorten a single slow test, so measure by test ID rather than by shard number.

Ordinary python_tests shards have no default timeout, including coverage runs. A positive PYTHON_TEST_TIMEOUT_SECONDS=N, given as -DPYTHON_TEST_TIMEOUT_SECONDS=N or as an environment variable, sets a per-shard timeout; the -D value wins for a direct test_python_runtime.cmake call and for --validate, which forwards it to test_python_runtime and prints it in its header as Python timeout:    <N>s per shard, or Python timeout:    none. An explicit value also replaces the 1860-second default of the KPI reference-fixture suite. The test_python_runtime and test_python_coverage CMake targets inherit the environment form; they do not forward a PYTHON_TEST_TIMEOUT_SECONDS cache value.

The ovRTX sample_app_tests shards have no default timeout either, and --validate also forwards the value to test_python_sample_app.

Each task’s full output is saved to <validation-dir>/run_parallel_logs/<suite>/<task>.log. A failed task also prints it on the console. Each Python test result line ends with its duration in seconds, such as ... ok [0.123].

The opt-in test_sentinel_checkers step uses the same planner. Checker tests in the Sentinel guide describes its workers and evidence.

Test environment and fixtures#

The native, Python runtime and smoke test drivers put temporary files under _build/test_tmp:

  • Outside Windows, the native driver instead uses a per-checkout /dev/shm/ovclash-test-<hash> directory. It does so when /dev/shm is a tmpfs with at least 48 MiB free and the directory is private to the current user. The storage tests of the Suite API sync every record and SQLite commit, so a memory-backed directory is faster.

  • Set OVCLASH_TEST_TEMP_ROOT to choose another writable parent. Direct calls to scripts/test_cpp.cmake, scripts/test_python_runtime.cmake and the other test drivers also accept -DOVCLASH_TEST_TEMP_ROOT=PATH, which takes precedence. Relative values are anchored to the ovclash checkout.

  • The drivers set TMP, TEMP and TMPDIR only for their own process tree. Each fixture owns a private child directory, and no driver deletes the shared parent.

The drivers also keep many concurrent test processes from oversubscribing the host, unless you export your own value:

  • The native driver sets PXR_WORK_THREAD_LIMIT=2. Set 0 to restore OpenUSD’s one worker per hardware thread.

  • The Python runtime driver sets OPENBLAS_NUM_THREADS=1. Otherwise numpy’s OpenBLAS starts a worker per logical CPU in every test process, and on Windows each worker commits a large buffer up front.

Rules for test fixtures:

  • Keep regression fixtures just large enough to exercise their boundary.

  • Fixtures that fake optional modules must import native dependencies such as NumPy before patching sys.modules. Restoring that dictionary must not unload a newly imported extension.

  • Give synthetic GUI gestures explicit modifier state, so the host keyboard cannot affect unrelated tests.

  • Redaction fixtures use only synthetic secret values.

The Suite API migration test (test_suite_legacy_migration.py) needs no OpenUSD Python bindings. It runs in every validation on both backends.

Packaging and publishing#

Before you begin: the host meets the Prerequisites. Packaging reuses an existing build and install, and it never rebuilds, so the first command of each pair builds and installs. On Linux:

./build_ovstage.sh --release
./build_packages.sh --backend ovstage --release

On Windows:

build_ovstage.bat --release
build_packages.bat --backend ovstage --release

build_packages writes the Python wheel and this platform’s SDK archive to _build/dist/<backend>/ and exits with code 0; the two files appearing there is the success check. Every --validate run already writes both. When the build fails, or packaging finds no matching install, the command stops with a nonzero exit code; Troubleshooting lists the common build and download failures.

Option

Meaning

--backend ovstage|openusd

The install to package. Defaults to ovstage, the product.

--release / --debug

The configuration of the installed build. Defaults to Release.

--vs / --ninja

Windows: the build tree to package, Visual Studio by default. GENERATOR=ninja also selects Ninja. Linux accepts only --ninja.

--help, -h, --version

Print information and exit. Use them alone.

build_packages accepts no native build flags and no -D settings.

--backend openusd produces developer artifacts that are not a product. That wheel bundles its own OpenUSD closure, declares no ovstage dependency and carries openusd in its local version. Publishing rejects it.

Packaging reads the install’s ovclash-build-provenance.json:

  • It warns when the install records source_verified: false. It then cannot detect source edits made after the install. Rebuild and reinstall after editing sources.

  • It rejects an install built against a local ovstage source checkout (--build-local-ovstage on Windows, OVCLASH_BUILD_LOCAL_OVSTAGE=ON on Linux). The pinned ovstage version does not identify that build.

It also warns about other ovclash archives left in _build/dist/<backend>; remove the ones that do not belong to this build.

Artifact names carry the version:

Build

Version

A release/* branch

The bare VERSION, for example 0.2.0.

Any other branch

The PEP 440 local version (the +<label> suffix of the Python version-string standard) <VERSION>+<branch>.<sha8>, for example 0.2.0+dev.jdoe.scope.fix.<sha8> on branch dev/jdoe/scope-fix. A hand-built wheel therefore cannot collide with a later release wheel.

No branch name

<VERSION>+source.export.<rev8>.

The OpenUSD backend

The same, with openusd added to the local version, for example 0.2.0+openusd or 0.2.0+openusd.dev.jdoe.scope.fix.<sha8>.

Wheels are tagged win_amd64, manylinux_2_35_x86_64 or manylinux_2_35_aarch64, for example ovclash-<version>-py3-none-win_amd64.whl. SDK archives are ovclash-<version>-<platform>.zip on Windows and ovclash-<version>-<platform>.tar.gz on Linux. <platform> is windows-x86_64, linux-x86_64 or linux-aarch64.

To package only the SDK archive, name the backend install tree explicitly. Use the packaged CMake under _build/deps/target-deps/cmake/bin, or any CMake 3.19 or newer. The script reads the backend and build type from the install’s provenance:

cmake -DINSTALL_DIR=_build/install/ovstage -P scripts/package_sdk.cmake

Without INSTALL_DIR, it packages _build/install/openusd, or _build/install/ovstage only when -DOVCLASH_OVSTAGE_ONLY=ON is passed.

No SDK archive ships the native test programs (ovclash.<suite>.test, .exe on Windows) or their symbols; the install tree keeps them for test_cpp, Sentinel and the debugger.

The ovstage archive leaves ovstage out:

  1. Packaging copies the install tree into a disposable staging directory. The install tree keeps the full runtime.

  2. It removes the ovstage loader and runtime, their native closure and plugins/ from that copy.

  3. It adds requirements.txt (exactly ovstage==<pin>), ovclash-runtime-dependencies.json and the ovclash-runtime-closure.json checksum inventory of the removed native files. The inventory is taken from the ovstage wheel the build staged. When that wheel is missing, packaging stops before it replaces anything in the distribution directory.

A consumer installs the requirement separately, as Installing the ovstage runtime describes. The OpenUSD developer archive keeps the rest of its install tree. SDK install tree describes how packaging builds the archive.

Building this documentation#

Before you begin: the render needs an install tree of the backend it renders against, the ovstage one by default, so build and install that backend first; the link check needs no build.

build_docs.sh / build_docs.bat runs two gates:

  • The render, repo docs --project <project> --warn-as-error=1, renders docs/ to HTML with Sphinx, the documentation generator, and Doxygen, the C/C++ documentation generator. It fails on a broken cross-reference, a page that no {toctree} (the page list of a root page’s table of contents) lists, or a Doxygen parse error. In a public source export the project is ovclash-public: the public site rooted at docs/index_public.md, with the public pages only.

  • The link check, scripts/check_docs_links.cmake, checks the Markdown that ships. It builds one stage for the wheel and one for the SDK archive:

    • docs/consumer/ in the SDK archive stage only, and the package’s README, staged the way that package stages them;

    • skills/ and samples/, copied from the checkout. They include the ovRTX sample’s README, which neither package ships.

    It then runs documentation_payload_smoke.py over each stage. The check fails when a relative link in any staged Markdown file does not resolve inside that stage; in the wheel stage, which has no docs/, a link into docs/ passes only with the (SDK archive): label and only when it names a page of docs/consumer/. It also fails when the SDK archive stage’s docs/consumer/ and the source docs/consumer/ differ, or when a page lies elsewhere under its docs/. Links resolve case-sensitively, so a link that works only on a case-insensitive filesystem fails on Windows too.

On Linux:

./build_ovstage.sh --release
./build_docs.sh

On Windows:

build_ovstage.bat --release
build_docs.bat

The run passes when build_docs ends with SUCCESS: build_docs completed and exits with code 0; the link check also prints two documentation payload OK lines. Without an install tree the render stops first: build_docs.sh prints No installed library at <path>., and build_docs.bat prints FAILED: installed runtime check. No library at "<path>".. A broken link fails the link check with Documentation link check failed for the <layout> layout. When the build itself fails, Troubleshooting lists the common causes.

Option

Meaning

--backend ovstage|openusd

The install tree to render against. Defaults to ovstage.

--build

Build and install that backend (--release --install) first.

--public

Render the public site, the ovclash-public project, which a public source export renders by default. Only a render inside the public source export can be published; it records that in public_source.json.

--links-only

Skip the render and run only the link check. It needs no build tree and takes seconds. Run it after every docs edit.

--no-link-check

Render only.

The render needs an install tree:

  • Sphinx autodoc imports ovclash and ovclash_suite for real, rather than mocking their hand-written ctypes bindings.

  • The native library loads only from the install tree, where install.cmake stages its ovstage dependency closure. The wrapper points OVCLASH_SUITE_LIB at the installed library. It stops when there is none, rather than rendering an empty API reference.

  • Before rendering, it generates docs/consumer/CHANGELOG.md from CHANGELOG.md, because the toctree of each root page names that untracked file.

repo.sh / repo.bat keep the Packman cache in _build/deps/packman-cache and the overrides in _build/deps/packman-override. An explicit PM_PACKAGES_ROOT or OVCLASH_PACKMAN_OVERRIDE_DIR wins.

build_docs writes the public site to _build/docs/ovclash-public/latest. It clears _build/docs/ovclash-public before it renders, so a page that has left the site leaves no HTML behind, and refuses to clear a linked output directory. An SDK archive built from the public source carries the Markdown documentation only, never a rendered docs/html: neither the install step nor the build_docs validation step stages one.

Under --validate, the link check runs inside test_python_wheel. The render runs only as the opt-in build_docs step (OVCLASH_VALIDATE_EXTRA_TARGETS=build_docs). That step renders against the installed runtime into an emptied _build/docs/<project>; in a public source build it is a gate only.

docs/README.md indexes every page and states which set it belongs to. Contributing summarizes the documentation rules, and AGENTS.md (“Doc authoring conventions”) has them in full.

Doxygen generates the C API reference from the checked-in public headers under include/ovclash/ and include/ovclash_suite/, listed as doxygen_input in repo.toml. OVCLASH_STANDALONE=1 is predefined for that run. Without it, the reference would silently omit the standalone entry points that ovclash.h fences behind the define.

ovRTX sample viewer#

The ovRTX sample viewer, the ovRTX clash sample app, is an optional developer viewer. It renders the stage with ovRTX, NVIDIA’s RTX rendering runtime, outside Kit and runs and lists queries. It is not part of the product or of either package. samples/ovrtx_clash_sample_app/README.md covers its dependencies, controls and environment variables, and ovRTX Clash Sample App its internals.

Before you begin:

  • Build and install the backend you launch, with build_ovstage --release or build_openusd --release. The launchers do not build ovclash.

  • Rendering needs an NVIDIA RTX GPU with a supported driver.

  • The first launch installs the viewer’s Python packages from public package indexes, so it needs network access.

Launch one backend’s viewer. On Linux:

./launch_rtx_viewer_ovstage.sh
./launch_rtx_viewer_openusd.sh

On Windows:

launch_rtx_viewer_ovstage.bat
launch_rtx_viewer_openusd.bat

A launcher that starts the viewer prints Launching ovclash ovRTX viewer: and the viewer command, and the viewer window opens. Without the backend’s install tree it stops with ovstage ovclash native library not found: <path> (OpenUSD ovclash native library not found for OpenUSD) and the build command to run. A failed package install during setup stops with pip’s error; Troubleshooting lists the hosts that the downloads need.

  • The launchers run the viewer’s Python from source and load the installed native library through OVCLASH_LIB, so rebuilding the matching backend picks up C++ changes.

  • On first use they create the backend’s viewer environment, _build/deps/venv/ovrtx_viewer_<backend>, and they set it up again when an installed ovRTX, ovstage or ovui has another version than the checkout pins. setup_ovrtx_viewer.sh --backend ovstage|openusd, or setup_ovrtx_viewer.bat, prepares or refreshes it explicitly.

  • Setup installs the pinned ovRTX wheel, ovui and ovstage, all from public package indexes and without a credential. The ovRTX wheel comes from NVIDIA’s public package index, which the PyPI ovrtx release also installs from, and pip installs it only when its SHA-256 matches the pin; OVRTX_WHEEL_PATH or an override directory names a local copy instead. ovui and ovstage come from pip’s configured index, public PyPI by default. The default ovui==0.2.0 needs CPython 3.12. Unless OVSTAGE_WHEEL_PATH, an override directory or OVSTAGE_PIP_REQUIREMENT names another ovstage, setup installs the wheel that an ovstage build downloaded and verified against OVSTAGE_SHA256SUMS, or else ovstage==<OVSTAGE_VERSION>, the pin the backend builds use. Only the OpenUSD environment installs usd-core.

  • The one-shot smoke without OVCLASH_TEST_OVRTX does not render.

  • OVCLASH_SETUP_HEARTBEAT_SECONDS sets the interval of setup progress lines for commands without their own progress (default 30; 0 turns them off). Pip installs use their native output without setup heartbeats.

Building against a local install tree#

The consumer pages describe building against a released SDK archive: Linking in the C/C++ Quickstart, with every consumer CMake variable. This section covers what differs for a local install tree.

Local install trees and the OpenUSD SDK archive#

A local install tree, _build/install/<backend> in a source checkout, and the unpublished OpenUSD SDK archive keep the complete runtime closure beside libovclash.so. They need neither the separate ovstage install nor Python at configure time. They still need the ovx headers, which they do not ship: their include/ovx holds only dlpack. Add -DOVCLASH_OVX_INCLUDE_DIR=<ovstage>/include to the configure command, where <ovstage> is the ovstage package directory. In a source checkout that is _build/deps/pip-deps/ovstage/ovstage under ovclash/. With an installed ovstage wheel it is <site-packages>/ovstage. Without it, the configure stops with ovx/string_types.h (or ovx/types.h) was not found; see The ovx include tree.

For example, from your project directory, against a checkout’s ovstage install tree:

cmake -S . -B _build \
    -Dovclash_DIR=<ovclash>/_build/install/ovstage/lib/cmake/ovclash \
    -DOVCLASH_OVX_INCLUDE_DIR=<ovclash>/_build/deps/pip-deps/ovstage/ovstage/include
cmake --build _build --config Release

<ovclash> is the ovclash/ directory of the checkout. Both commands exit with code 0 when the configure and the build succeed, and the build directory _build of your project then holds your program.

To run such a program, put the runtime directories of the install tree <install>, such as <ovclash>/_build/install/ovstage, on the loader path of its process. Windows has no run path: put <install>\bin and <install>\plugins on PATH. On Linux, a CMake program started from its build tree has a run path to <install>/lib; a program linked through pkg-config, or moved out of its build tree, needs <install>/lib and <install>/plugins on LD_LIBRARY_PATH. Otherwise it exits with 0xc0000135 (Windows) or 127 (Linux) before main. The run_*_cpp sample launchers set these paths themselves.

The ovx include tree#

<ovclash/ovclash.h> includes <ovx/string_types.h>, or the older <ovx/types.h> when that header is absent. ovclash does not ship either header. ovstage produces them, in the include/ directory of the installed ovstage wheel or of the ovstage SDK. Every ovclash install tree ships exactly one ovx header, ovx/dlpack/dlpack.h, in its own include tree.

The CMake config of the product SDK archive finds the headers in the installed ovstage package. A local install tree has no such package, so name the ovx include directory yourself:

Setup

OVCLASH_OVX_INCLUDE_DIR

Source checkout

_build/deps/pip-deps/ovstage/ovstage/include under ovclash/, where the build stages the pinned ovstage wheel

pip-installed ovstage wheel

<site-packages>/ovstage/include

The exported config validates the directory: one without ovx/string_types.h or ovx/types.h is a fatal configure error. Linking gives the full lookup order and OVCLASH_ALLOW_MISSING_OVX.

pkg-config consumers set the directory through the ovx_includedir variable of ovclash.pc. In a local install tree and the OpenUSD SDK archive, ovx_includedir defaults to the ovclash include directory, whose only ovx header is ovx/dlpack/dlpack.h. A local tree’s ovclash.pc has no ovstage_root variable, so point ovx_includedir at the ovstage include directory.

Before you begin: the install tree <install> exists, built as Backends and trees describes, and <ovstage> is the ovstage package directory of Local install trees and the OpenUSD SDK archive. On Linux, from the directory that holds your C program app.c:

gcc app.c -o app $(PKG_CONFIG_PATH=<install>/lib/pkgconfig \
    pkg-config --define-variable=ovx_includedir=<ovstage>/include \
               --cflags --libs ovclash)

The command exits with code 0 and writes the executable app. When ovx_includedir names no ovx headers, the compile stops at #error "ovclash requires ovx/string_types.h or ovx/types.h". The link may also need -Wl,-rpath-link,<install>/lib, where the install tree keeps the ovstage libraries. The CMake config adds that option for you; ovclash.pc does not. Run app with the loader path that Local install trees and the OpenUSD SDK archive gives for a program linked through pkg-config.

On Windows, use the CMake config instead, with -DOVCLASH_OVX_INCLUDE_DIR as the example in Local install trees and the OpenUSD SDK archive shows.

Running the module from a source checkout#

To run the module against a local install tree, put ovclash/python/ on PYTHONPATH. Then set OVCLASH_LIB or OVCLASH_SUITE_LIB to the absolute path of the installed native library. A relative path fails at import with OVCLASH_SUITE_LIB/OVCLASH_LIB must be an absolute trusted native library path. On Windows, also set OVCLASH_DLL_DIRS when the runtime dependency directories are not on the DLL search path.

From ovclash/, after ./build_ovstage.sh --release, with any Python 3.10 or newer. On Linux:

export PYTHONPATH="$PWD/python"
export OVCLASH_LIB="$PWD/_build/install/ovstage/lib/libovclash.so"
python -m ovclash --stage tests/data/mesh_mesh_overlapping.usda \
    --scope-a /World/Objects/meshA --scope-b /World/Objects/meshB

On Windows, in PowerShell:

$env:PYTHONPATH = "$PWD\python"
$env:OVCLASH_LIB = "$PWD\_build\install\ovstage\bin\ovclash.dll"
python -m ovclash --stage tests\data\mesh_mesh_overlapping.usda --scope-a /World/Objects/meshA --scope-b /World/Objects/meshB

The version header goes to stderr. Stdout holds only the JSON summary; Command line in the Python package guide defines each of its fields with its type and values:

{
  "duplicate_count": 0,
  "duplicates": [],
  "overlap_count": 1,
  "overlaps": [
    {
      "name0": "/World/Objects/meshA",
      "name1": "/World/Objects/meshB",
      "nb_elements": 52,
      "time": 0.0,
      "type": 0
    }
  ],
  "pipeline_steps": [
    "Releasing previous data...",
    "Finding meshes...",
    "Computing initial mesh data...",
    "Finding shared meshes...",
    "Cooking meshes...",
    "Computing global mesh data...",
    "Building BVH...",
    "Running broad-phase...",
    "Purging duplicates...",
    "Running narrow-phase...",
    "Processing results..."
  ],
  "stage": "tests/data/mesh_mesh_overlapping.usda"
}

In Git Bash on Windows, set MSYS_NO_PATHCONV=1 for this command. Otherwise Git Bash rewrites /World/... into a Windows path, and the query fails with Invalid prim path in scope. Command line in the Python package guide lists the module’s options.

Samples in a source checkout#

Samples describes the shipped samples and their launchers in the wheel and the SDK archive, and Building the C++ samples the build_samples options. A source checkout behaves differently, as Building the shipped samples and Sample launchers in a source checkout describe.

Building the shipped samples#

samples/build_samples.sh (samples\build_samples.bat on Windows) builds every sample against a local install tree as well as against an SDK archive:

  • Without --install-root or OVCLASH_INSTALL_ROOT, the script uses the first directory that holds lib/cmake/ovclash/ovclashConfig.cmake: the root that contains samples/, then _build/install/openusd, then _build/install/ovstage under it. With both backends installed, pass --install-root to choose one.

  • The default build root is _build/samples under the ovclash root, with one child directory per sample.

  • When OVCLASH_OVX_INCLUDE_DIR is unset, the script takes the first of these directories that holds ovx/string_types.h or ovx/types.h: _build/deps/pip-deps/ovstage/ovstage/include under the root that contains samples/, then the same path under the directory above that root, then ovstage/include beside the root, then ovstage/include one level higher, and last the staged tree of the checkout that built the selected _build/install/<backend>. Set the variable when an ovstage directory beside the root, such as a sibling checkout, must not be used.

  • Local install trees configure without Python.

  • The script copies the install’s ovclash-build-provenance.json into each sample tree and configures a tree from scratch when its copy differs. A sample tree therefore starts fresh after an install with new provenance, such as a build of a new commit.

Sample launchers in a source checkout#

Before you begin: the host meets the Prerequisites. A launcher builds a missing install tree itself, so the first run of each backend takes as long as its build.

The clash_api and clash_suite_api launchers in a source checkout default to --backend both: they run the OpenUSD backend against _build/install/openusd, then the ovstage backend against _build/install/ovstage, and build a missing install tree first; a failed build stops the launcher, and Troubleshooting lists the common causes. An explicit --backend (or --openusd / --ovstage) or OVCLASH_BACKEND selects one backend, and OVCLASH_INSTALL_ROOT is ignored when they run both. With --backend both, --output-dir DIR writes the OpenUSD outputs under DIR/openusd and the ovstage outputs under DIR/ovstage.

With the default --backend both, a launcher prints === Running OpenUSD backend === and === Running ovstage backend === as it starts each backend, and exits with code 0 when both runs pass. Without --output-dir, each run writes its results to _build/<sample>_<language> for OpenUSD and _build/<sample>_<language>_ovstage for ovstage, such as _build/clash_suite_api_cpp and _build/clash_suite_api_cpp_ovstage for run_clash_suite_api_cpp.

Source-checkout launchers use the checkout’s staged Python and skip the sample runtime helper samples/sample_python.py.

To pass your own processor arguments through a launcher, select one backend and put the arguments after --:

On Linux:

./samples/clash_suite_api/run_clash_suite_api_cpp.sh --backend ovstage -- --stage tests/data/time_sampled.usda --num-tasks 8

On Windows:

samples\clash_suite_api\run_clash_suite_api_cpp.bat --backend ovstage -- --stage tests/data/time_sampled.usda --num-tasks 8

The launcher exits with code 0 when the processor does, and writes only the outputs that your arguments name.

samples/legacy_clash_detection/ has its own run_legacy_clash_detection_cpp and run_legacy_clash_detection_python launchers, without a backend selector. From a source checkout they use _build/install/openusd unless --install-root selects another tree.

samples/clash_suite_api/run_custom_clash.{sh,bat} runs the Clash Processor, the sample program that runs one query on a USD stage from command-line arguments and saves the results; samples/clash_suite_api/clash_processor.md is its guide. In a source checkout it uses a built _build/install/<backend> of the checkout before it falls back to the published wheel, so after ./build_ovstage.sh --release a plain run_custom_clash runs your build. --backend openusd builds a missing _build/install/openusd. The wheel fallback installs into _build/deps/venv/custom_clash, and runs the checkout’s processor against the published wheel, which can lack newer API.

Configuration reference#

The consumer pages document the variables of an installed package: Linking the CMake variables a consumer sets, and Environment variables the runtime variables.

Dependency overrides#

These variables select the build dependencies; Dependency sources explains what each one replaces. The wrappers and the cmake -P scripts read them from the environment. When a cmake -P script or a Linux wrapper also receives a -D definition of the same name, the definition wins. A relative path is anchored to the checkout.

Variable

Effect

OVSTAGE_VERSION

ovstage wheel version of the default download. The pin in the OVSTAGE_VERSION file is the default. Another version has no SHA-256 pin, so its wheel is not verified and the artifacts built from it are not publishable.

OVSTAGE_WHEEL_PATH

Local ovstage wheel used instead of any download. The file must exist.

OVCLASH_PIP_OVERRIDE_DIR, OVCLASH_PIP_SEED_DIR

Directories searched for the ovstage wheel, and by the ovRTX viewer setup also for the pinned ovRTX wheel. OVCLASH_PIP_SEED_DIR is the legacy name.

OVSTAGE_PIP_REQUIREMENT

pip requirement or wheel path that replaces the default download, for both backends and the ovRTX viewer setup.

PM_PACKAGES_ROOT, OVCLASH_PACKMAN_OVERRIDE_DIR

Packman cache and override directories. Default _build/deps/packman-cache and _build/deps/packman-override.

OVCLASH_EXTERNAL_TARGET_DEPS, OVCLASH_HOST_DEPS

CMake definitions only: the target and host dependency roots. Default _build/deps/target-deps and _build/deps/host-deps.

OVCLASH_BUILD_LOCAL_OVSTAGE

ON selects local ovstage mode.

OVCLASH_OVSTAGE_ROOT

ovstage source checkout for local mode. In that mode the wrappers and a direct CMake configure default it to an ovstage checkout beside the repository: ../ovstage from the repository root, which is ../../ovstage from ovclash/ in a public source export as in any other checkout. Installed CMake packages also use its include/ as a hint for the ovx headers. It never selects the runtime of a distributed SDK archive.

OVCLASH_OVSTAGE_BUILD_DIR

ovstage build tree for local mode. Defaults to <OVCLASH_OVSTAGE_ROOT>/_build.

OVCLASH_AUTO_BUILD_DEPS

ON, the default, builds a missing local-mode ovstage runtime, like --auto-deps. OFF stops the build instead, like --no-deps.

OVCLASH_OVSTAGE_ENABLE_CUDA

ON builds the local ovstage dependency with CUDA storage. The default is OFF.

OVCLASH_OVSTAGE_USD_ROOT

OpenUSD runtime root for ovstage builds, tests and launchers. The default is the Packman OpenUSD package under _build/deps/target-deps/usd/.

Build and test environment variables#

These variables control the source-checkout build and test tooling described on this page.

Variable

Values

Required

Default

Effect

See

SKIP_GLIBC_CHECK

A CMake true value, such as 1

No

Unset: the check runs

Waives only the Linux ELF ABI baseline check, for builds that are never published.

Wrapper flags

GENERATOR

vs or ninja

No

vs

Windows default generator for the build wrappers and build_packages.

Wrapper flags

OVCLASH_WINDOWS_TOOLCHAIN

installed or packaged

No

installed in a public source export

installed uses the installed Visual Studio 2022 and Windows SDK; packaged uses the msvc and winsdk packages staged under _build/deps/host-deps, which the public manifests do not pin. Any other value stops the build before it downloads anything.

“Public source builds” in README.md; Visual Studio solutions and F5 debugging

OVCLASH_VISUAL_STUDIO_ROOT, OVCLASH_WINDOWS_SDK_ROOT

Directory paths

No

The Developer Command Prompt’s VSINSTALLDIR and WindowsSdkDir, then vswhere and the standard Windows Kits location

Roots of the installed Visual Studio and Windows SDK. A relative root, from -D or the environment, is anchored to the checkout.

“Public source builds” in README.md

OVCLASH_WINDOWS_SDK_VERSION

An installed Windows SDK version

No

The newest one with complete x64 Include, Lib and bin directories

Installed Windows SDK version to use.

“Public source builds” in README.md

CMAKE

Path of a CMake executable

No

The packaged CMake under _build/deps/target-deps/cmake/bin, then cmake on PATH

CMake executable for build_samples, build_packages, build_docs and the Windows build wrappers.

OVCLASH_CODESIGN

A CMake true or false value, such as ON or OFF

No

Unset: signs only on Windows, and only when a staged signing tool can authenticate

A true value requires code signing of the Windows install; a false value skips it.

Code signing

OVCLASH_VALIDATE_EXTRA_TARGETS, OVCLASH_VALIDATE_EXCLUDE_TARGETS

Step names, ;- or space-separated

No

Empty

Add or drop --validate steps. An unknown extra name is fatal; an unknown exclude name only warns.

Validation steps

OVCLASH_PARALLEL_JOBS

A positive integer

No

Unset: min(task count, CPU count, 16)

Caps the test workers.

Parallel tests and shard planning

OVCLASH_PARALLEL_TESTS

ON or OFF

No

ON under --validate; off in a direct test_cpp.cmake, test_python_runtime.cmake or test_samples.cmake call

OFF forces one worker.

Parallel tests and shard planning

PYTHON_TEST_SHARD_SIZE

A non-negative integer

No

Unset: derived from the test inventory and durations

Overrides the derived Python shard size.

Parallel tests and shard planning

PYTHON_TEST_SHARD_SECONDS

A positive number of seconds

No

Unset: derived

Overrides the derived Python shard time target.

Parallel tests and shard planning

PYTHON_TEST_TIMEOUT_SECONDS

A positive number of seconds

No

Unset: no timeout; 1860 for the KPI reference-fixture suite

Per-shard Python test timeout.

Parallel tests and shard planning

OVCLASH_SKIP_PUBLISHING_TESTS

A CMake true value, such as 1

No

Unset: every module runs

Leaves the modules that test the publishing of the source tree, such as test_public_references.py, out of test_python_runtime; they depend on neither the backend nor the build type. The coverage run always leaves them out.

Python test groups

OVCLASH_TEST_TEMP_ROOT

A writable directory path

No

_build/test_tmp; outside Windows the native driver may use /dev/shm

Parent directory for test scratch files.

Test environment and fixtures

OVCLASH_TEST_DATA_DIR

A directory path

Only for Python test modules run outside the test drivers

tests/data, set by the test drivers

Test fixture directory.

Run focused tests

OVCLASH_TEST_OVRTX

Environment: any non-empty value, OFF included; -D: a CMake true value

No

Unset: the step detects only and does not render

Makes test_ovrtx_sample use ovRTX and require rendering, which needs a GPU and Vulkan. Unset it, or drop the step with OVCLASH_VALIDATE_EXCLUDE_TARGETS, to skip rendering.

Validation steps

OVCLASH_ALLOW_WARP_STARTUP_SKIP

A CMake true value, from -D or the environment

No

Unset: the test fails

Makes test_ovrtx_sample skip only its Warp buffer-view test with a warning, instead of failing, when Warp’s start-up ends the separate probe process natively before its last step. A native end after the last step, or any other failure, fails the step with or without the switch. Set it only on a host where Warp is known not to start.

ovRTX sample validation

OVCLASH_SETUP_HEARTBEAT_SECONDS

A number of seconds; 0 turns the lines off

No

30

Interval of the ovRTX viewer setup progress lines for commands without their own progress. Pip installs use native output without setup heartbeats.

ovRTX sample viewer

In a source checkout the sample launchers and build_samples also read the consumer variables OVCLASH_BACKEND, OVCLASH_INSTALL_ROOT, OVCLASH_SAMPLE_BUILD_ROOT and OVCLASH_OVX_INCLUDE_DIR; Samples in a source checkout gives their checkout defaults.

Troubleshooting#

Troubleshooting lists loader, version-mismatch and package configuration failures by their exact messages. These cases are specific to a source checkout:

  • Unknown option: <flag> from a build wrapper. The backend wrappers accept a fixed flag set and stop before building on anything else. The Windows wrappers also reject -D options. Wrapper flags lists the flags each platform accepts.

  • ELF strip/GLIBC baseline contract failed during a Linux install. The build ran on a host whose glibc or libstdc++ is newer than the manylinux_2_35 baseline. Delete the build tree (_build/compile/<backend>/ninja), whose cached compiler and objects are the host toolchain’s, and rebuild on Ubuntu 22.04 or another manylinux_2_35 compatible environment. For local work that will never be published, set SKIP_GLIBC_CHECK=1 instead; it waives only this check. See Wrapper flags.

  • error: ovstage install source_verified must be true for a dual gate (or openusd) at the end of a two-backend test_all. A Git command failed, or the index file that git rev-parse --git-path index names was missing, when that install was built, so its source is unknown. Check that Git works in the checkout (git reset rebuilds a missing index from HEAD) and run again. See Test and validate.

  • The source identity changed since the last successful native build during --validate, an install or packaging. The source identity covers every file of the Git repository that no ignore rule excludes, not only ovclash/. Something edited a file, created a new untracked file, ran git add, or committed or checked out after the build. While a validation runs, do none of these anywhere in the checkout, and keep editors and other tools from writing files there that are not ignored. The message lists the changed fields and the paths that differ. When it reports source_verified: true -> false instead, a Git command failed and the sources may be unchanged: run again once git status shows a settled checkout. A missing index file, the one git rev-parse --git-path index names, also reports it; git reset rebuilds the index from HEAD and leaves the working tree as it is. Build provenance explains each field.

  • The selected OVX include directory has no ovx/dlpack/dlpack.h, which the public <ovclash/ovclash.h> requires: <dir> when you configure ovclash itself. <ovclash/ovclash.h> includes <ovx/dlpack/dlpack.h>, and the install rule copies that header from OVCLASH_OVX_INCLUDE_DIR into the ovclash include/ tree. Point OVCLASH_OVX_INCLUDE_DIR at a complete ovx include directory. A consumer that fails to compile that include has a different problem; see Troubleshooting.

  • Could not find the ovclash suite shared library: neither OVCLASH_LIB nor OVCLASH_SUITE_LIB is set, ... with PYTHONPATH pointing at python/. The checkout’s python/ directory holds no build output beside the packages. Set OVCLASH_LIB to the absolute path of the install tree’s library, as Running the module from a source checkout shows.

  • A consumer program exits with 0xc0000135 (Windows) or 127 (Linux) before main while OpenUSD Python tests run. Those test runs temporarily replace the install tree’s OpenUSD library with a Python-enabled one. That library needs python312.dll (libpython3.12.so.1.0 on Linux), so a native consumer started during the swap cannot load it. A *.ovclash_pyless_backup file beside the OpenUSD library means that an interrupted run left the swap in place. Rerun those tests, which restore the backup first, or rename the backup over the swapped file.

  • A Packman download fails with HTTP 403, and the cloudfront.net URL it names answers with a page that reads 403 ERROR, The request could not be satisfied and Request blocked (Generated by cloudfront (CloudFront)). The content delivery network that serves the packages refused the request, for example while its firewall limits anonymous downloads. The package is not missing and the checkout is not misconfigured. Wait and run the build again: it continues from the packages already in the Packman cache (PM_PACKAGES_ROOT, by default _build/deps/packman-cache; see Dependency sources), which are not downloaded again. If the block lasts for hours, report it with the URL that the error names.

  • A Packman or pip download fails with a connection error, a proxy error or a timeout. The build then stops with Failed to download <dependencies> (exit code: <n>) after Packman’s own error, or, for the ovstage wheel, with Failed to materialize ovstage from <source kind>: <source> (pip exit code <n>) after pip’s. The network blocks a host that the build needs. Allow HTTPS to these hosts: d4i3qtqj3r0z5.cloudfront.net and d2cerybs4newgl.cloudfront.net for the Packman packages (the first redirects the PhysX SDK, the OpenUSD packages and the documentation tools to the second, so allowing only the first is not enough); bootstrap.packman.nvidia.com for Packman and the Python it runs on, on the first run; and pypi.org and files.pythonhosted.org for the pinned ovstage wheel and the Python packages that the build and its tests install.

See also: