Skip to content

Build from Source

Build Methods

NovaPhy can be built in two ways:

  1. Python package (recommended) — via pip install -e . with scikit-build-core
  2. 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
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:

add_subdirectory(/path/to/NovaPhy)
target_link_libraries(your_target PRIVATE novaphy::core)

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-10 Fails Missing <span> / PSTL issues
Clang 19+ Works With libstdc++ 13
Clang <= 18 Fails Missing alias template deduction
CUDA 12.4 Works Required for IPC
CUDA 13 TODO muda compatibility issue

Packaging

Build a wheel package for distribution:

pip install build
CMAKE_ARGS="--preset=default" python -m build

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.