GNU Radio 4.0
Introduction
GNU Radio 4.0 represents a major shift in the framework to allow for new functionality that has required architectural change to allow, such as:
- Modular Runtime Components
- Improved Support of Heterogeneous Architectures
- Support for Distributed Architectures
To see a full description of the proposed features for 4.0, please see GNU_Radio_4.0_Summary_of_Proposed_Features
Getting and Installing
Currently GR 4.0 is not packaged, but can be easily built from source:
Dependencies
A complete list of dependencies can be found in the CI worker build scripts. These include:
- meson-build
- ninja
- jinja2
- gcc (or clang)
- spdlog
- libfmt
- gtest
- pybind11
- python3
- numpy
- soapysdr
- libasound
- portaudio
- flatbuffers-compiler
- zmq
- pyyaml
Ubuntu
sudo apt install libzmq3-dev libspdlog-dev libyaml-cpp-dev libgtest-dev libfmt-dev pybind11-dev python3-dev python3-numpy build-essential cmake ninja-build libfftw3-dev libgmp-dev libgsl0-dev git python3-pip pkg-config libsoapysdr-dev libasound2 portaudio19-dev libad9361-0 pip install meson ninja mako jinja2 pyyaml zmq jsonschema jsonschema-default
For Ubuntu 22.04, VOLK can be installed from apt
sudo apt install libvolk2-dev
But for Ubuntu 20.04, we must install VOLK from source
# Install VOLK mkdir -p /src/build git clone --recursive https://github.com/gnuradio/volk.git /src/volk --branch v2.4.1 cd /src/build && cmake -DCMAKE_BUILD_TYPE=Release ../volk/ && make && make install && cd / && rm -rf /src/
For both 22.04 and 20.04, flatbuffers must be installed from source
# Install Flatc mkdir -p /src/build git clone https://github.com/google/flatbuffers.git /src/flatbuffers --branch v2.0.0 cd /src/build && cmake -DCMAKE_BUILD_TYPE=Release ../flatbuffers/ && make && make install && cd / && rm -rf /src/
Fedora
sudo dnf install cmake gcc gcc-c++ spdlog-devel fmt-devel yaml-cpp-devel gtest-devel cppzmq-devel fftw-devel gsl-devel gmp-devel volk-devel SoapySDR-devel python3-devel python3-pybind11 python3-numpy python3-pip python3-pyyaml python3-lxml python3-gobject gtk3 python3-cairo pango SDL-devel alsa-lib-devel portaudio-devel jack-audio-connection-kit-devel libsndfile-devel git flatbuffers-devel flatbuffers-compiler pip install meson ninja mako six jinja2 pyyaml zmq jsonschema jsonschema-default
Installing from Source
Creating a Prefix
An isolated prefix provides a convenient way to develop and utilize multiple versions of GNU Radio simultaneously (e.g. GR 3.10 and GR 4.0) without interference.
1. Create a directory that will be the root of your prefix
This might be /opt/gr4/
or ~/gr4
or anywhere else you like to keep a big directory (build files can grow to several GB). We will refer to this directory as $GR_PREFIX
2. Create a setup_env.sh
file into the prefix root. This file should look contain something similar to (edit your /path/to/my/prefix
and python version
export GR_PREFIX="/path/to/my/prefix" export PATH="$GR_PREFIX/bin:$PATH" export PYTHONPATH="$GR_PREFIX/lib/python3/site-packages:$GR_PREFIX/lib/python3/dist-packages:$GR_PREFIX/lib/python3.8/site-packages:$GR_PREFIX/lib/python3.8/dist-packages:$GR_PREFIX/lib64/python3/site-packages:$GR_PREFIX/lib64/python3/dist-packages:$GR_PREFIX/lib64/python3.8/site-packages:$GR_PREFIX/lib64/python3.8/dist-packages:$PYTHONPATH" export LD_LIBRARY_PATH="$GR_PREFIX/lib:$GR_PREFIX/lib64/:$GR_PREFIX/lib/x86_64-linux-gnu:$LD_LIBRARY_PATH" export LIBRARY_PATH="$GR_PREFIX/lib:$GR_PREFIX/lib64/:$GR_PREFIX/lib/x86_64-linux-gnu:$LIBRARY_PATH" export PKG_CONFIG_PATH="$GR_PREFIX/lib/pkgconfig:$GR_PREFIX/lib64/pkgconfig:$PKG_CONFIG_PATH"
3. source setup_env.sh
- do this every time you open the terminal to enter the development or runtime in this prefix
Getting the GR4 Source
Open a new terminal window
cd $GR_PREFIX mkdir src && cd src git clone https//github.com/gnuradio/gnuradio --branch dev-4.0
Building and installing GR4
cd gnuradio meson setup build --libdir=lib --prefix=$GR_PREFIX cd build ninja ninja test ninja install
Note that nothing in installing to the prefix should require sudo