Introduction
Note: After numerous attempts to build CubicSDR from source on the Raspberry Pi, I was still unsuccessful. It’s unfortunate as this seemed like a promising application. I am publishing this as I may come back to it in the future, but for now, consider this post incomplete or containing inaccurate information.
I picked up an RTL-SDR Blog V4 and already installed the drivers on my Raspberry Pi 5. Now I want to use some software to take advantage of the capabilities. I will provide a link to my GitHub for a script to alleviate all the typing and accommodate version changes.
Installing CubicSDR from apt
Yes, you can install CubicSDR from apt, but you will not get the most up-to-date versions. If this doesn’t matter to you, then here you go.
sudo apt install cubicsdr
Building CubicSDR
Adding basic build support to Raspberry Pi OS.
sudo apt-get install git build-essential automake cmake
Adding basic dependencies.
sudo apt-get install libpulse-dev libgtk-3-dev
OpenGL dependencies. Note that the package here is for Raspberry Pi OS, this version differs from the Debian package that is listed on the CubicSDR instruction. On the Debian page, it makes reference to install freeglut3
as well. That package does not exist on the current version of Raspberry Pi OS and according to the freeglut.sourceforge.net page for the project, the -dev
version is the version to install.
sudo apt-get install freeglut3-dev
Add some libraries…
sudo apt install libjpeg-dev libtiff-dev libsdl1.2-dev libgstreamer-plugins-base1.0-dev libnotify-dev libsm-dev libwebkit2gtk-4.0-dev libxtst-dev
Add HamLib support if using a supported radio. Hamlib is not needed for RTL-SDR Blog V4.
sudo apt install libhamlib4 libhamlib-utils libhamlib++-dev libhamlib-dev libhamlib-doc
Build and install SoapySDR.
git clone https://github.com/pothosware/SoapySDR.git
cd SoapySDR
mkdir build
cd build
cmake ../ -DCMAKE_BUILD_TYPE=Release
make -j4
sudo make install
sudo ldconfig
SoapySDRUtil --info #test SoapySDR install
arombaut@raspberrypi:~/CubicSDR/build $ SoapySDRUtil --info ###################################################### ## Soapy SDR -- the SDR abstraction library ## ###################################################### Lib Version: v0.8.1-g8c6cb7c5 API Version: v0.8.200 ABI Version: v0.8-3 Install root: /usr/local Search path: /usr/local/lib/SoapySDR/modules0.8-3 Module found: /usr/local/lib/SoapySDR/modules0.8-3/librtlsdrSupport.so (0.3.3-f22516c) Available factories... rtlsdr Available converters... - CF32 -> [CF32, CS16, CS8, CU16, CU8] - CS16 -> [CF32, CS16, CS8, CU16, CU8] - CS32 -> [CS32] - CS8 -> [CF32, CS16, CS8, CU16, CU8] - CU16 -> [CF32, CS16, CS8] - CU8 -> [CF32, CS16, CS8] - F32 -> [F32, S16, S8, U16, U8] - S16 -> [F32, S16, S8, U16, U8] - S32 -> [S32] - S8 -> [F32, S16, S8, U16, U8] - U16 -> [F32, S16, S8] - U8 -> [F32, S16, S8]
Build and install liquid-dsp.
git clone https://github.com/jgaeddert/liquid-dsp
cd liquid-dsp
./bootstrap.sh
CFLAGS="-march=native -O3" ./configure --enable-fftoverride
make -j4
sudo make install
sudo ldconfig
Build wxWidgets.
wget https://github.com/wxWidgets/wxWidgets/releases/download/v3.2.1/wxWidgets-3.2.1.tar.bz2
Untar the file.
tar -xvjf wxWidgets-3.2.1.tar.bz2
Change into the directory.
cd wxWidgets-3.2.1/
Make a development directory.
mkdir -p ~/Develop/wxWidgets-staticlib
sudo mkdir -p /opt/wxWidgets-staticlib
Run the autogen file.
./autogen.sh
Configure the software, adding in libraries that we already configured and installed.
./configure --prefix=`echo ~/Develop/wxWidgets-staticlib` --with-opengl --disable-glcanvasegl --disable-shared --enable-monolithic --with-libjpeg --with-libtiff --with-libpng --with-zlib --disable-sdltest --enable-unicode --enable-display --enable-propgrid --disable-webview --disable-webviewwebkit CXXFLAGS="-std=c++0x"
./configure --with-opengl --disable-shared --enable-monolithic --with-libjpeg --with-libtiff --with-libpng --with-zlib --disable-sdltest --enable-unicode --enable-display --enable-propgrid --disable-webview --disable-webviewwebkit --prefix=`echo /opt/wxWidgets-staticlib` CXXFLAGS="-std=c++0x" --with-libiconv=/usr
Make and install the software. This process will take awhile! (~15 minutes)
make -j4 && sudo make install
Build CubicSDR.
git clone https://github.com/cjcliffe/CubicSDR.git
cd CubicSDR
mkdir build; cd build
Without Hamlib…
cmake ../ -DCMAKE_BUILD_TYPE=Release -DwxWidgets_CONFIG_EXECUTABLE=/opt/wxWidgets-staticlib/bin/wx-config
With Hamlib
cmake ../ -DUSE_HAMLIB=1 -DCMAKE_BUILD_TYPE=Release -DwxWidgets_CONFIG_EXECUTABLE=/opt/wxWidgets-staticlib/bin/wx-config
make
cd x64/
./CubicSDR
cd ..; sudo make install
Leave a Reply