Build from Source¶
Build Methods¶
NovaPhy can be built in two ways:
- Python package (recommended) — via
pip install -e .with scikit-build-core - Standalone CMake — for C++ projects or custom integration
CMake Presets¶
NovaPhy provides two CMake presets:
| Preset | Description |
|---|---|
default |
Standard build without IPC |
ipc |
Full build with IPC + CUDA support |
# Using presets with pip
CMAKE_ARGS="--preset=default" pip install -e .
CMAKE_ARGS="--preset=ipc" pip install -e .
Build Flags¶
| Flag | Default | Description |
|---|---|---|
NOVAPHY_WITH_IPC |
OFF | Enable IPC contact via libuipc (requires CUDA) |
NOVAPHY_WITH_VBD_CUDA |
OFF | Enable VBD CUDA backend |
NOVAPHY_WITH_SPH_CUDA |
OFF | Enable SPH CUDA backend; CPU SPH is always built |
CMAKE_CUDA_COMPILER |
auto | Path to nvcc |
CMAKE_TOOLCHAIN_FILE |
— | Path to vcpkg toolchain |
Standalone CMake Build¶
For using NovaPhy in a C++ project:
mkdir build && cd build
cmake -S .. -B . --preset=default --install-prefix=/path/to/install
cmake --build .
cmake --install . --component core
Or use add_subdirectory:
Compiler Compatibility¶
Without IPC¶
Any C++20-capable compiler works:
- MSVC 2022+
- GCC 11+
- Clang 14+
With IPC (libuipc)¶
IPC has stricter compiler requirements:
| Compiler | Status | Notes |
|---|---|---|
| MSVC 2019+ | Works | — |
| GCC 11 | Works | — |
| GCC 12 | Works | — |
| GCC 13 | Works | — |
| GCC 14-15 | Fails | Incompatible with nvcc-12 |
| GCC 9 | Fails | libuipc needs <span>, introduced in GCC 10 |
| GCC 10 | Fails | PSTL in libstdc++ 10 incompatible with oneTBB |
| GCC 15 | Fails | urdfdom expects non-standard uint32_t import removed from libstdc++1 |
| Clang 19+ | Works | With libstdc++ 13 |
| Clang <= 18 | Fails | libuipc uses alias template deduction unsupported by older Clang2 |
| CUDA 12.4 | Works | Minimum for the NVIDIA IPC path |
| CUDA 12.8 | Works | Required for RTX 50-series / compute_120 targets such as RTX 5070 Ti |
| CUDA 13 | TODO | muda expects non-strict dependent name resolution |
| CoreX toolchain | Works | Use NOVAPHY_GPU_PLATFORM=COREX |
Packaging¶
Build a wheel package for distribution:
Troubleshooting¶
pybind11 version conflict
Always use pybind11 from pip, NOT from vcpkg. The vcpkg version conflicts with conda's Python.
CUDA 12 + glibc 2.43
CUDA 12 has conflicting math function implementations with glibc 2.43's noexcept declarations.
This breaks strict noexcept checking in Clang. Use GCC as the CUDA host compiler if affected.
Clang with libstdc++
Clang uses libstdc++ by default. Any crash caused by libstdc++ also affects Clang.
-
Fixed upstream via a patch, but not yet in the current vcpkg baseline (2025.07.25). Add
-include cstdinttoCXXFLAGSas a workaround. ↩ -
However, alias template deduction is only required for CUDA targets. If you have another compiler as the CUDA host compiler (e.g. GCC 11), Clang 14+ can still compile non-CUDA C/C++ targets. ↩