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 |
|
Validation steps and their output |
|
Packaging commands and artifact names |
|
What a consumer finds in the SDK archive and the wheel |
What ships in the C/C++ quickstart and the Overview |
The |
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 |
|
Role |
|---|---|---|---|
ovstage |
|
|
The product backend (ovstage backend) |
OpenUSD |
|
|
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 works in this order:
It lists any output roots of the previous layout that it finds. It never uses or deletes them.
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.It fetches the Packman dependencies and stages the ovstage wheel (Dependency staging).
It selects and checks the ovx include tree, the directory of the ovx headers (ovx include-tree checks).
On Windows, it applies the toolchain that
OVCLASH_WINDOWS_TOOLCHAINselects. 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.For ovstage, it finds the ovstage runtime. In local ovstage mode it can build that runtime (Local ovstage source builds).
It configures
BUILD_DIRand builds it, or onlyBUILD_TARGETwhen 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_DIRandINSTALL_DIR,scripts/build_common.cmakederives_build/compile/<backend>/<generator>and_build/install/<backend>fromOVCLASH_OVSTAGE_ONLYandGENERATOR. WithoutOVCLASH_OVSTAGE_ONLY, or withOFF, a script targets the OpenUSD backend and its_build/compile/openusd/<generator>and_build/install/openusdtrees; pass-DOVCLASH_OVSTAGE_ONLY=ONfor ovstage.GENERATORdefaults toninjain the scripts, althoughbuild.batdefaults tovs. SetGENERATOR=vs(a-Dvalue or the environment) when you drive a Visual Studio tree.Do not switch a tree’s generator.
scripts/build.cmakestops withGenerator changed (cached: ..., requested: ...). Clean the build first.Build one target with
scripts/build_target.cmake, notcmake --build. It first applies the selected Windows toolchain environment (ovclash_apply_windows_toolchain_envinscripts/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_DIRis 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 |
|---|---|---|---|---|
|
A CMake boolean, such as |
No |
Unset: the OpenUSD backend |
|
|
|
No |
|
The generator, and the last component of the default |
|
|
No |
|
The configuration |
|
One of the four compile trees under |
Yes for |
|
The compile tree |
|
A directory |
No |
|
The install tree |
|
A CMake target name |
No |
Empty: every target |
|
|
A CMake target name |
No |
Unset: every target |
|
|
|
No |
|
The configuration that |
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 |
|
Both backends |
Packman host tools: Ninja and, on Windows, vswhere |
|
Both backends |
The pinned ovstage wheel, installed |
|
ovstage: the ovstage SDK (headers and link library), runtime and ovx headers. OpenUSD: the |
The downloaded ovstage wheel |
|
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#
Reuse. The build reuses
_build/deps/pip-deps/ovstagewhen it holds a complete package atOVSTAGE_VERSION, its.ovclash-source-wheelmarker names an existing wheel, and that wheel still matches its SHA-256 pin. The stamp.ovclash-source-wheel-verifiedbeside 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.Select a source. The first match wins. The variables come from the environment or a
-Ddefinition, and none is required; unset, the build uses source 5. Dependency overrides is their full reference.Order
Source
Values
Condition
1
OVSTAGE_WHEEL_PATHThe path of a wheel file
Set. The file must exist.
2
A wheel in
OVCLASH_PIP_OVERRIDE_DIRA 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_REQUIREMENTA pip requirement or a wheel path
Set.
5
ovstage==<OVSTAGE_VERSION>from the configured package index–
Always.
Download. The default source is the exact platform wheel,
ovstage==<OVSTAGE_VERSION>, from the package index pip is configured to use: public PyPI unlessPIP_INDEX_URL,PIP_EXTRA_INDEX_URLor a pip configuration file name another one.pip downloadfetches 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.Resolve. Every source ends as one file in
_build/deps/downloads/ovstage/resolved/. A wheel is copied there; a pip requirement is resolved withpip download --no-input --no-deps. Exactly oneovstage-<OVSTAGE_VERSION>-*.whlmust result, and it must match its committed SHA-256 pin inOVSTAGE_SHA256SUMS: a wheel with other bytes stops the build. AnotherOVSTAGE_VERSIONhas no committed pin, so its wheel is reported as unverified and the artifacts built from it are not publishable.Install. The Packman Python runs
pip install --no-input --upgrade --target _build/deps/pip-deps/ovstage <wheel>.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-wheeland records the verified wheel in.ovclash-source-wheel-verifiedbeside 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 |
Wheel file name |
text |
Yes |
|
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 |
|
ovstage |
The same, plus all three of |
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 |
|---|---|
|
|
|
|
|
|
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 |
|---|---|---|
|
Assembles the install tree ( |
Yes, step 2 |
|
Runs the packaged native tests from the install tree. |
Yes |
|
Builds and runs the pure-C compatibility smoke against the install tree. |
Yes |
|
Builds and runs the pure-C smoke against the extracted SDK archive. |
Yes, after |
|
Runs the one-shot smoke of the ovRTX clash sample app against the install tree. Rendering is required only when |
Yes |
|
Runs the Python runtime and Suite tests against the install tree. |
Yes |
|
Builds the Python wheel (Python wheel). |
Yes, before |
|
Checks the wheel contents and runs queries in a clean virtual environment. |
Yes |
|
Runs the ovRTX clash sample app tests under |
Only through |
|
Runs the sample launchers and checks their results (Native Suite test build and sample gate). |
Yes |
|
Fails when a build, script, sample, source or test file references the repository’s |
Yes |
|
Checks the ovx include-tree diagnostics. |
Yes |
|
Runs the Sentinel controller and checker tests. |
Only through |
|
Renders the documentation against the install tree and stages it as the install tree’s |
Only through |
|
Builds the SDK archive (SDK install tree). |
Before |
|
Reruns the Python runtime suite under coverage (Python coverage). |
No |
|
Generates the full KPI reference fixtures, one task at a time. |
No |
|
Aggregate build-graph target over the |
Not applicable |
|
Part of |
Built by step 1 |
|
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 |
|---|---|---|---|---|
|
Target names separated by |
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. |
|
Target names separated by |
No |
Unset |
Drops the named targets, extras included. An unknown name only warns. |
|
A true CMake variable, or any non-empty environment value |
No |
Unset: |
Adds the render smoke to |
Details that matter when you change these targets:
test_c_compat_sdk_archiveon ovstage recreates_build/deps/venv/sdk_archiveon every run. It installs the archive’srequirements.txtthere offline, from the staged wheel only (pip install --isolated --no-index --only-binary=:all:). It then checks the installed native files against the archive’sovclash-runtime-closure.jsonwithscripts/verify_runtime_closure.py --sdk-root <sdk> --ovstage-package-dir <package>. The consumer gets only that interpreter, so the exported CMake package must findovstageitself.On Linux, that consumer runs with
LD_LIBRARY_PATHunset. A second leg links the same smoke through the SDK archive’sovclash.pcwith-Wl,--as-needed. It reads the file withpkg-configorpkgconfwhen the host has one and no path contains whitespace; otherwise the script expands the file itself. A directscripts/test_c_compat.cmakerun 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.txtlists the ovclash sources (OVCLASH_SUITE_SOURCES,OVCLASH_WRAPPER_SOURCES).scripts/usdclash_sources.cmakelists the shared engine inputs (OVCLASH_USDCLASH_OPENUSD_SOURCES,OVCLASH_USDCLASH_OVSTAGE_SOURCESand 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 |
|
Backend sources |
|
The |
Backend-specific definitions |
|
|
Links |
Namespaced, Python-free OpenUSD ( |
The ovstage loader |
Precompiled header |
|
None |
|
|
|
Both backends compile:
the canonical forwarding layer,
source/ovclash_capi_api.cppandsource/ClashApiCommon.cpp;the Suite sources under
source/suite/;Carbonite globals, bootstrap and tasking:
CarboniteGlobals.cpp,CarboniteBootstrap.cppandTasking.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 |
|---|---|
|
The standalone adapter, built with |
|
The private OpenUSD C++ wrapper. |
|
The stage registry and report extraction. They keep the |
|
A fixed timeline: standalone ovclash has no Kit timeline. |
|
A link stub for an engine helper that |
ovstage backend files#
Files |
Role |
|---|---|
|
The canonical entry points: context, settings, timeline and stage; pipeline runs and result queries; overlap reports. They share the C API guard helpers in |
|
The pipeline operations, declared in |
|
The |
|
Raw authored xformOp static/dynamic classification. |
|
Validation and copy of an attached composition, its replay into engine populations, and their stage metadata check. |
|
Numeric transform population, the selected numeric plan and world-matrix reads. They share |
|
ovstage instance lifecycle, population and query helpers. |
|
Mesh and point-cloud census and extraction. |
|
Prototype and instance roots, and instance-proxy expansion. |
|
Transform extraction, composition and instance-root validation. |
|
Declarations shared by the scene-reader files. |
|
The USD text fallbacks. |
|
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 ( |
Unoptimized ( |
Windows |
Optimized, compiled with |
Debug code generation with |
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 |
Static, Release |
Not linked; only its ovx headers are used |
Configuration-neutral package |
OpenUSD Debug |
Debug packages, linked directly |
Prebuilt static |
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 |
Static, Release |
Published Release runtime |
Configuration-neutral package |
ovstage Debug |
Release runtime closure of ovstage; not linked directly |
Prebuilt static |
Static, Release |
Published Release runtime |
Configuration-neutral package |
Every non-Debug build links PhysX checked on purpose:
checkedis an optimized build (NDEBUG). It keepsPX_CHECKEDassertions, API parameter validation and PVD (PhysX Visual Debugger), which PhysXreleasestrips.The pinned
physxsdkPackman package ships onlychecked/anddebug/. The Omni PhysX runtime inovphysx/ovruntimemakes the same choice with the same pin.ovclash_link_physx_static_libsmaps Debug todebug/and every other configuration tochecked/.For the ovstage backend,
CMakeLists.txtaddschecked/as aBEFORElink 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.testand the scheduler testovclash.parallel_for.testa Release-compatible ABI:/MD,NDEBUGinstead 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.cmakedeletes every.pdband.debugfile from its staging copy before it archives a Release build.scripts/verify_release_artifact.pyrejects 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.pdbor.debugfiles (The SDK archive, step 4), so a Debug SDK archive keeps only the library’s symbols, and--allow-debug-sidecarsnever admits a test program’s symbols.Wheel staging removes every
.pdbfile, in both configurations.On Linux, the Release install and wheel trees strip symbols and the
.commentsection from ovclash-owned ELF binaries..commentnames 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_CHECKwaives only the ABI check, not the stripping.verify_release_artifact.pyre-checks the packed bytes. It rejects an ovclash-owned ELF binary that still has a.symtabor a.commentsection. Dependency-owned binaries stay unchanged. Debug artifacts pass--allow-unstrippedand 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.txtapplies 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 ( |
Signing is required. A missing signing tool or credentials, or a host other than Windows, is fatal. |
False ( |
Signing is skipped. |
Unset |
Signs only on Windows when the Packman signing tool is staged and signing credentials are configured. Otherwise it reports |
When signing runs:
During
--validate, the separately timedsign_sdkstep runs right afterinstall_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 whenOVCLASH_CODESIGNis on; otherwiseinstall_sdksigns as a standalone install does.A standalone
scripts/install.cmakecall or a direct CMake install target signs as its final operation.scripts/codesign.cmakesigns an existing install tree again:cmake -DINSTALL_DIR=_build/install/ovstage -DOVCLASH_CODESIGN=ON -P scripts/codesign.cmake. It printsCode signing complete for ovclash SDK installand exits with 0. Its failures:A missing tree stops it with
Install directory not found at <path>.: runscripts/install.cmakefirst.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 withcmake -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.dlland theovclash.<suite>.test.exeexecutables directly inbin/orlib/. Signing works on copies in a<install>.codesign-stagingfolder 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.jsonrecords those bytes, and KPI compares the installed runtime with them.ovstage owns
plugins/, the other files directly inbin/orlib/, and theirplugins/andovstage_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|x64andRelease|x64. The wrapper’s--debugor--releaseselects 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 |
|---|---|
|
The sample with |
|
The packaged test from |
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-errorin the same process;writes viewer state and the ovRTX cache to
_build/viewer/<backend>/<configuration>, as the script launchers do;loads
ovclash.dllfrom the build output directory, where its PDB is, and keeps the install tree onPATHfor the runtime dependencies and OpenUSD plugins;forces the Native Only debugger and sets
_NT_SYMBOL_PATHto 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. |
|
|
|
The ovstage source checkout (a directory) |
Defaults to an |
Defaults to an |
|
The ovstage build tree (a directory) |
Defaults to |
Defaults to |
|
The OpenUSD root that ovstage builds against (a directory) |
Defaults to the Packman OpenUSD payload |
Defaults to |
|
|
Defaults to |
Defaults to |
|
|
Defaults to |
Defaults to |
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_CUDAfollowsOVCLASH_OVSTAGE_ENABLE_CUDA, which defaults toOFF.On Windows, the build also passes
-DUSD_MS_LIB=<USD root>/lib/ov_25.11usd_ms.libwhen that file exists. The monolithic namespaced OpenUSD payload needs it.--no-depsorOVCLASH_AUTO_BUILD_DEPS=OFFstops 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_*.dllfromCUDAToolkit_BIN_DIRintobin/.On Linux it installs
libcudart.so*intolib/. It searchesCUDAToolkit_LIBRARY_DIR, thenCUDAToolkit_BIN_DIRand thelib64andlibdirectories 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 |
|---|---|
|
Windows: |
|
Linux: |
|
A second |
|
Public headers |
|
The |
|
The OpenUSD plugin registry and its resources under |
|
Sample sources and the current platform’s launchers, |
|
|
|
The SDK archive readme (from |
|
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 |
|
The dependency audit written by the install step |
|
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
ovstagedependency.The OpenUSD developer SDK archive has no
carb.taskingplugin.
Points that matter when you change packaging:
pkgconfig/ovclash.pcrepeatslib/pkgconfig/ovclash.pcat the OV Libraries V2 root location. Both come fromcmake/ovclash.pc.in; only theprefix=depth differs.scripts/package_licenses.pyandscripts/package_deps.pywriteLICENSE.txt,ovclash-LICENSES.zip, the ovstage third-party notices anddependency_audit.txtat the root.samples/data/holds the fixtures thatscripts/sample_data_files.cmakelists. The wheel stages the same list.ovclash-build-provenance.jsonis copied from the build after it is validated.docs/consumer/is every page ofdocs/consumer/, preprocessed, with the generatedCHANGELOG.md. It keeps its source path, so the shipped Markdown outside it (README.md,skills/and the sample pages) links a consumer page asdocs/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/latestholds 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:
It reads the backend and the build type from the install’s provenance (
scripts/sdk_package_context.cmake). A-DOVCLASH_OVSTAGE_ONLYor-DBUILD_TYPEyou pass must match.For ovstage, it requires the wheel this build staged (the
.ovclash-source-wheelmarker). It checks this before it changes anything in the distribution directory.It deletes older archives of this platform and copies the install tree to
<dist>/package/ovclash, a staging copy marked with.ovclash-sdk-staging.On both backends and in every configuration, it deletes the native test programs from the copy: every
ovclash.<name>.testfile (.exeon Windows) directly inbin/orlib/, with its.pdbor.debugfile. It printsRemoved a native test program file from SDK staging: <path>for each file.For ovstage, it runs
scripts/prepare_sdk.pyon that copy, which removes the files that ovclash does not own. It also regeneratesconfig.tomlwith empty plugin directories and a note that the separate ovstage dependency supplies the OpenUSD and plugin closure.For a Release build, it deletes every
.pdband.debugfile from the copy.It writes
ovclash-<version>-<platform>.zipon Windows or.tar.gzon Linux.It checks the archive with
scripts/verify_release_artifact.py --sdk, adding--expect-ovstagefor 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 |
|---|---|
|
Every other file directly in |
The |
|
|
The top-level |
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
.pydof which the wheel has exactly one copy. For such a file the inventory records the wheel’s bytes, and the script printsRecorded 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 |
|---|---|---|---|---|
|
integer |
Yes |
|
The format version |
|
array of objects |
Yes |
Exactly one entry, ovstage |
The external runtime dependencies |
|
string |
Yes |
|
The package name |
|
string |
Yes |
The pin, a canonical dotted version |
The exact version to install |
|
string |
Yes |
|
The public index that serves the pin |
|
string |
Yes |
|
The release page of the pin |
The fields of ovclash-runtime-closure.json:
Field |
Type |
Required |
Default or values |
Description |
|---|---|---|---|---|
|
integer |
Yes |
|
The format version |
|
object |
Yes |
The single entry of |
The runtime that supplies the files |
|
array of objects |
Yes |
Non-empty, sorted by |
The dependency-owned native files that packaging removed |
|
string |
Yes |
A path relative to the SDK archive root, with |
Where the file sat in the install tree |
|
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.
It checks that the build, the installed provenance and the current sources agree (Build provenance).
It stages the installed Python packages
ovclash,omniand theovclash_suitealias module. It writesovclash/python/suite/_wheel_backend.pywithBACKEND = "ovstage"orBACKEND = "openusd". When the distribution version differs fromVERSION(off release branches, and always for OpenUSD), it writes that version into the staged_version.pyonly.It stages the native payload. The ovstage wheel gets only
bin/ovclash.dllandbin/config.tomlon Windows, orlib/libovclash.so,lib/libovclash.so.<major>andlib/config.tomlon Linux. pip cannot restore symbolic links, so the wheel ships these two copies instead of the link chain. The OpenUSD developer wheel copiesbin/,plugins/and, on Linux,lib/from the install tree.It stages the agent skills and the package README:
skills/, with its catalogskills/README.md, comes from the project root;the package-root
README.mdispython/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 nodocs/html/. Its Markdown names a consumer page with the label(SDK archive):in front of the reference.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 withscripts/prepare_python_wheel.py.It copies the installed provenance verbatim to
ovclash/ovclash-build-provenance.json.It runs
setup.py bdist_wheelwithSOURCE_DATE_EPOCHset to the time of the commit that last changedVERSION(a fixed constant without Git), so equal content gives equal bytes.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 literalBACKENDassignment ofovstageoropenusd;exactly one root-level
<distribution>.dist-info/METADATA, parsed as email headers, with normalized distribution names;the ovstage wheel carries exactly one bare
ovstagedependency 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
.pdband.debugfiles, 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 otherbin/orlib/library that ovclash does not own either.The ovstage SDK archive must declare exactly
ovstage==<pin>, from the public PyPI index, in bothrequirements.txtandovclash-runtime-dependencies.json.The ovstage SDK archive must carry a canonical
ovclash-runtime-closure.json: exactlyschema_version1, that dependency, and a non-empty, sorted, uniquenative_fileslist 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 shipsamples/sample_build_root.bat, which selects the short sample build root. A missing, empty, duplicated or case-aliased helper fails withSDK 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_VERSIONfor 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 withonly ovstage-backed wheels are publishableand an OpenUSD SDK archive withonly 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 |
|---|---|---|
|
An install tree, the SDK archive and the wheel’s package root. It holds one line, |
The |
|
A wheel only, importable as |
The Python loader, to set up the |
|
The root of an install tree and of the SDK archive, and the wheel’s package root. |
Release verification, which reads its |
Package identity#
Only the ovstage packages are products.
ovstage |
OpenUSD |
|
|---|---|---|
Built by |
|
|
Packaged from |
|
|
Output directory |
|
|
Version |
|
The same, with |
OpenUSD runtime in the wheel |
Supplied by the pinned |
Bundled: the wheel carries its own OpenUSD closure and declares no |
OpenUSD runtime in the SDK archive |
Not bundled. |
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 |
|---|---|---|---|---|
|
integer |
Yes |
|
The format version |
|
string or |
Yes |
40 hexadecimal digits, from Git or the content snapshot; |
The source identity (Source identity) |
|
boolean |
Yes |
|
The state of that identity |
|
string |
Yes |
|
The backend of the build |
|
string |
Yes |
|
The selected configuration |
|
string |
Yes |
For example |
The actual CMake generator |
|
string |
Yes |
The bare |
The product version |
|
string or |
Yes |
The ovstage pin; |
The ovstage dependency |
|
string or |
Yes |
|
The OpenUSD dependency |
|
string |
No: present only in a local ovstage source build |
|
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 |
|
|
|
|---|---|---|---|
Clean and committed |
|
|
HEAD and its index tree |
Only staged changes |
|
|
HEAD and the staged index tree |
An unstaged change or an untracked, not ignored file anywhere in the repository |
|
|
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 |
|
|
|
No usable Git, or |
|
|
A content snapshot ( |
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#
The always-run target
ovclash.build-provenancedepends 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.scripts/install.cmakerecomputes the identity and compares it with the carrier before it clears the previous install. A directcmake --installruns the same guard. The install gets a copy of the carrier.scripts/build_wheel.cmakecompares 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 |
|
Sources changed after the build |
|
No installed manifest |
|
Installed manifest differs from the carrier |
|
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. Rungit statusin 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,DandTmark 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_dirtychanges with it when the checkout became clean or dirty.source_revision: HEAD moved, through a commit, checkout or pull.ovclash_versionorovstage_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_typeandovclash_version;are the expected distinct pair,
ovstageandopenusd, 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.dllmust not importomni.usd.dlldirectly.Do not package
omni.physx.*runtime libraries. No package carriesphysxSchema.dllor thePhysxSchema,PhysxSchemaAdditionorOmniUsdPhysicsDeformableSchemaregistries.For OpenUSD (
--usd-mode namespaced),scripts/package_deps.pyreplacesplugins/with the runtime dependency closure of the installed library. ItsSKIP_PATTERNSleave out OpenUSD imaging, Hydra, rendering, validator, Python and other unused schema libraries. The closure carries nousdPhysicsresources. Do not widen it without a documented reason.An ovstage install tree keeps the ovstage runtime’s complete OpenUSD plugin registry,
usdPhysicsandusdLuxincluded, because that runtime owns it. The ovstage SDK archive and wheel leave it to theovstagedependency.Keep the shared-engine source lists explicit in
scripts/usdclash_sources.cmake. OpenUSD compiles the engine list, and ovstage compilesIntersection.cpp.CMakeLists.txtadds the OpenUSD adaptersource/OpenUsdClashBackend.cppseparately.
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.