Building UHD from source gives you full control over the version, enabled components, and install prefix. The build system uses CMake and follows the same configure-build-install pattern on all platforms. This guide covers dependency setup, cloning the repository, configuring CMake with common options, and running the build.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/EttusResearch/uhd/llms.txt
Use this file to discover all available pages before exploring further.
Prerequisites
Compiler Requirements
The following compilers are officially supported:| Compiler | Minimum Version |
|---|---|
| GCC | 7.3.0 |
| Clang | 6.0.0 |
| MSVC (Visual Studio) | 16.0 (VS 2019) |
Dependency List
- Ubuntu / Debian
- Fedora
- macOS
- Windows
Install all build dependencies with a single command:Your exact package list may differ depending on your Ubuntu/Debian version.
| Package | Minimum Version | Required? |
|---|---|---|
| CMake | 3.12 | Required |
| Boost | 1.71 (1.76 on Windows) | Required |
| Python | 3.7 | Required |
| Mako | 0.4.2 | Required |
| NumPy | 1.11 | Required for Python API |
| Pybind11 | 2.7 | Build-time (Python API only) |
| LibUSB | 1.0 | Optional (USB devices) |
| Doxygen | 1.8 | Optional (API docs) |
Pybind11 is bundled with the UHD source tree. If no system-installed Pybind11 is found, the in-tree version is used automatically. Using the system version is recommended when building alongside GNU Radio or other software that also uses Pybind11.
Get the Source Code
The UHD source is hosted on GitHub:Branch Overview
| Branch | Purpose |
|---|---|
master | Main development branch — new features and bug fixes |
UHD-* | Stable release branches (e.g., UHD-4.7) — bugfixes only |
UHD-*.LTS | Long-term support branches — extended bugfix lifetime |
Build Instructions
CMake Configuration Options
Pass options to CMake with-D<OPTION>=<VALUE>. The most commonly used options are listed below.
Install Prefix
Common Feature Flags
| CMake Option | Default | Description |
|---|---|---|
ENABLE_PYTHON_API | ON (Linux/macOS), OFF (Windows) | Build the UHD Python C extension |
ENABLE_LIBUHD | ON | Build the core UHD shared library |
ENABLE_C_API | ON | Build the C language API wrapper |
ENABLE_EXAMPLES | ON | Build example programs |
ENABLE_TESTS | ON | Build the unit test suite |
ENABLE_STATIC_LIBS | OFF | Build a static libuhd.a instead of shared |
ENABLE_DPDK | OFF | Enable DPDK transport support |
ENABLE_RFNOC_DEV | OFF | Install RFNoC/HDL development files |
NEON_SIMD_ENABLE | ON | Enable NEON SIMD on ARM; disable when cross-compiling |
Python API Options
WhenENABLE_PYTHON_API=ON, verify CMake is using the correct Python installation:
Build Python Utilities Only (no full UHD build)
If you only needrfnoc_image_builder (e.g., in a CI environment for building FPGA bitfiles):
Static Library Build
Post-Install Setup
Update the shared library cache (Linux)
Make sure Alternatively, add the library directory to
libuhd.so is discoverable at runtime:/etc/ld.so.conf before running ldconfig.Add UHD to PATH (Windows)
Add
C:\Program Files\UHD\bin (or your custom prefix \bin) to the %PATH% environment variable.Platform-Specific Notes
Ubuntu 20.04 CMake path issue
On Ubuntu 20.04, CMake may follow the/bin → /usr/bin symlink and miscalculate include paths, producing errors like:
/usr/bin precedes /bin in PATH, or pass:
ARM cross-compilation
When cross-compiling for ARM targets that do not support NEON (e.g., Odroid XU4 via standard SDK), disable NEON extensions explicitly:Windows LibUSB paths
CMake on Windows cannot usepkg-config, so set LibUSB paths manually in the CMake GUI (Advanced View):
LIBUSB_INCLUDE_DIRS(PATH) → directory containinglibusb.h, e.g.C:\local\libusb-1.0.22\include\libusb-1.0LIBUSB_LIBRARIES(FILEPATH) → full path tolibusb-1.0.lib, e.g.C:\local\libusb-1.0.22\MS64\dll\libusb-1.0.lib
Building Applications Against UHD
If your application uses CMake, add the following to yourCMakeLists.txt to locate the installed UHD headers and libraries:
examples/init_usrp in the UHD source tree and the installed UHDConfig.cmake for a complete working example.
