User avatar
LDighera
Posts: 49
Joined: Wed Aug 29, 2012 1:04 am
Location: Santa Barbara, California, USA

Build CubicSDR under Debien Jessie on the Raspberry Pi3

Tue Jun 07, 2016 7:50 pm

Here's how to successfully build CubicSDR under Debian Jessie on the Raspberry Pi3.

The script below was adapted from the information on this page <https://github.com/cjcliffe/CubicSDR/wiki/Build-Linux>, and reflects the commands that resulted in the successful build.

Code: Select all

==============================================
# Building CubicSDR for Linux
# This script will successfully build CubicSDR under Debian Jessie on the Raspberry Pi3.
# Adapted from https://github.com/cjcliffe/CubicSDR/wiki/Build-Linux
# Larry Dighera June 7, 2016
# [email protected]

apt-get install git build-essential automake cmake
apt-get install libpulse-dev libgtk-3-dev
apt-get install freeglut3 freeglut3-dev
mkdir cubicsdr && cd cubicsdr
git clone https://github.com/pothosware/SoapySDR.git
cd SoapySDR
mkdir build && cd build
cmake ../ -DCMAKE_BUILD_TYPE=Release
make -j4
make install
ldconfig
SoapySDRUtil --info #test SoapySDR install
cd ..
git clone https://github.com/jgaeddert/liquid-dsp
cd liquid-dsp
./bootstrap.sh
./configure --enable-fftoverride 
make -j4
make install
ldconfig
cd ..
wget https://github.com/wxWidgets/wxWidgets/releases/download/v3.1.0/wxWidgets-3.1.0.tar.bz2
tar -xvjf wxWidgets-3.1.0.tar.bz2  
cd wxWidgets-3.1.0/
mkdir -p ~/Develop/wxWidgets-staticlib
./autogen.sh 
./configure --with-opengl --disable-shared --enable-monolithic --with-libjpeg --with-libtiff --with-libpng --with-zlib --disable-sdltest --enable-unicode --enable-display --enable-propgrid --disable-webkit --disable-webview --disable-webviewwebkit --prefix=`echo ~/Develop/wxWidgets-staticlib` CXXFLAGS="-std=c++0x" --with-libiconv=/usr
make -j4 && make install
cd ..
apt-get install libhamlib2 libhamlib-utils libhamlib++-dev libhamlib-dev libhamlib-doc python-libhamlib2
git clone https://github.com/cjcliffe/CubicSDR.git
cd CubicSDR
mkdir build && cd build
../ -DUSE_HAMLIB=1 -DCMAKE_BUILD_TYPE=Release -DwxWidgets_CONFIG_EXECUTABLE=~/Develop/wxWidgets-staticlib/bin/wx-config
make
cd x86/
./CubicSDR
make install
cd ..
git clone https://github.com/pothosware/SoapyRTLSDR.git
cd SoapyRTLSDR
cd build
cmake .. -DCMAKE_BUILD_TYPE=Release
make
make install
ldconfig
# should now show RTL-SDR device if connected
SoapySDRUtil --probe     

# Add CubicSDR to the X11 menu with the Menu Editor: cubicsdr/CubicSDR/build/x86/CubicSDR
CubicSDR defaults to PulseAudio, which was installed in the dist-upgrade a few days ago. However, I don't have the Pulse deamon running, so I didn't hear any audio yet. To my joyous surprise the waterfall and spectrum run reasonably fast. CubicSDR seems to use about 85% of the CPU cycles, and may be reduced about 10% in the CubicSDR Settings drop-down menu.
There is no expedient to which a man will not resort
to avoid the real labor of thinking.
-- Sir Joshua Reynolds

User avatar
LDighera
Posts: 49
Joined: Wed Aug 29, 2012 1:04 am
Location: Santa Barbara, California, USA

Re: Build CubicSDR under Debien Jessie on the Raspberry Pi3

Sat Jun 11, 2016 8:34 am

I was surprised to find that CubicSDR would run on the Raspberry Pi3. Although a bit slow, and tending to overheat the Pi, it looks to be usable. It was necessary to reduce the Sample Rate to prevent buffer overflow.

The present issue is getting CubicSDR audio out. It appears to possibly be the result of the current (4.4.11-v7+) Debian Jessie release default configuration of PulseAudio. This is apparently currently under active development from the information here: https://www.raspberrypi.org/blog/anothe ... -raspbian/. Killing and restarting the PulseAudio daemon successfully produced CubicSDR Audio:

Code: Select all

/bin/sh /usr/bin/start-pulseaudio-x11
.
There is no expedient to which a man will not resort
to avoid the real labor of thinking.
-- Sir Joshua Reynolds

yo2ldk
Posts: 6
Joined: Wed May 30, 2012 12:22 pm

Re: Build CubicSDR under Debien Jessie on the Raspberry Pi3

Sat Jul 30, 2016 1:48 pm

Hi,
I have many errors during install cubicsdr..
https://github.com/wxWidgets/wxWidgets/releases dont't exist anymore, so failed to install wxWidgets
when I try to install soapysdr , on ./bootstrap.sh sau aclocal,autoconf,autoheader say not found

any tips please ?

User avatar
LDighera
Posts: 49
Joined: Wed Aug 29, 2012 1:04 am
Location: Santa Barbara, California, USA

Re: Build CubicSDR under Debien Jessie on the Raspberry Pi3

Sun Jul 31, 2016 5:13 am

Clues below:

https://github.com/cjcliffe/CubicSDR/wiki/Build-Linux
Charles J. Cliffe edited this page Apr 1, 2016 · 28 revisions
Pages 8

Building CubicSDR for Linux:

Basic build support: (debian)

$ sudo apt-get install git build-essential automake cmake
Base Dependencies: (debian)

$ sudo apt-get install libpulse-dev libgtk-3-dev
If you didn't install your own OpenGL driver/headers (via Nvidia, AMD binaries or other) this will bring in the appropriate libs and headers:

$ sudo apt-get install freeglut3 freeglut3-dev
Build and install SoapySDR

$ git clone https://github.com/pothosware/SoapySDR.git
$ cd SoapySDR
SoapySDR$ mkdir build
build$ cd build
build$ cmake ../ -DCMAKE_BUILD_TYPE=Release
build$ make -j4
build$ sudo make install
build$ sudo ldconfig
build$ SoapySDRUtil --info #test SoapySDR install

------
Build and install liquid-dsp

$ git clone https://github.com/jgaeddert/liquid-dsp
liquid-dsp$ cd liquid-dsp
liquid-dsp$ ./bootstrap.sh
liquid-dsp$ ./configure --enable-fftoverride
liquid-dsp$ make -j4 #*lots of gcc errors
liquid-dsp$ sudo make install

==========
/root/radio/cubicsdr/liquid-dsp (/dev/pts/0) # make install
installing...

mkdir -p /usr/local/lib
mkdir -p /usr/local/include/liquid
install -m 644 -p libliquid.so libliquid.a /usr/local/lib
install -m 644 -p include/liquid.h /usr/local/include/liquid

---------------------------------------------------------
liquid-dsp was successfully installed.

On some machines (e.g. Linux) you should rebind your
libraries by running 'ldconfig' to make the shared
object available. You might also need to modify your
LD_LIBRARY_PATH environment variable to include the
directory /usr/local

Please report bugs to [email protected]
---------------------------------------------------------
==========

liquid-dsp$ sudo ldconfig

---------------
Build static wxWidgets:

Note: replace '~/Develop/wxWidgets-staticlib' with your own path if you prefer, remember it to be used later when building CubicSDR.

$ wget https://github.com/wxWidgets/wxWidgets/ ... .0.tar.bz2
[ downloading.. ]
$ tar -xvjf wxWidgets-3.1.0.tar.bz2
[ unpacking.. ]
$ cd wxWidgets-3.1.0/
wxWidgets-3.1.0$ mkdir -p ~/Develop/wxWidgets-staticlib
wxWidgets-3.1.0$ ./autogen.sh
wxWidgets-3.1.0$ ./configure --with-opengl --disable-shared --enable-monolithic --with-libjpeg --with-libtiff --with-libpng --with-zlib --disable-sdltest --enable-unicode --enable-display --enable-propgrid --disable-webkit --disable-webview --disable-webviewwebkit --prefix=`echo ~/Develop/wxWidgets-staticlib` CXXFLAGS="-std=c++0x" --with-libiconv=/usr

[ configuring.. ]

wxWidgets-3.1.0$ make -j4 && make install

[ building and installed to ~/Develop/wxWidgets-staticlib in this example ]
-----------------

Build CubicSDR
-----------
Note: add -DUSE_HAMLIB=1 to cmake command line to include hamlib support.
This will require installing hamlib packages:

Run-time library to control radio transceivers: libhamlib2
Utilities to support the hamlib radio control library: libhamlib-utils
Development library to control radio transceivers: libhamlib++-dev
Run-time library to control radio transceivers: ibhamlib2++c2*Unable to locate package ibhamlib2++c2
Development library to control radio transceivers: libhamlib-dev
Documentation for hamlib library providing a standardised programming
interface: libhamlib-doc
This package provides the perl bindings of the library: libhamlib2-perl* not installed
This package provides the Tcl bindings of the library: libhamlib2-tcl* not installed
This package provides the Python bindings of library: python-libhamlib2

apt-get install libhamlib2 libhamlib-utils libhamlib++-dev libhamlib-dev libhamlib-doc python-libhamlib2

The following NEW packages will be installed:k
libhamlib++-dev libhamlib-dev libhamlib-doc libhamlib-utils libhamlib2
libhamlib2++c2 libusb-dev python-libhamlib2

The following extra packages will be installed:
libhamlib2++c2 libusb-dev
---------------

$ git clone https://github.com/cjcliffe/CubicSDR.git
CubicSDR$ cd CubicSDR
CubicSDR$ mkdir build
CubicSDR$ cd build

build$ cmake ../ -DUSE_HAMLIB=1 -DCMAKE_BUILD_TYPE=Release -DwxWidgets_CONFIG_EXECUTABLE=~/Develop/wxWidgets-staticlib/bin/wx-config

build$ cmake ../ -DCMAKE_BUILD_TYPE=Release -DwxWidgets_CONFIG_EXECUTABLE=~/Develop/wxWidgets-staticlib/bin/wx-config
build$ make
# You can now run the build from the folder, note if you're on 32-bit linux it will be in x86/
build$ cd x64/./CubicSDR: not found
x64$ ./CubicSDR*
Install CubicSDR (and launcher)

build$ sudo make install
Un-install CubicSDR

build$ sudo make uninstall
Support Modules

SoapyRTLSDR (similar to other Soapy modules):

$ sudo apt-get install librtlsdr-dev
$ git clone https://github.com/pothosware/SoapyRTLSDR.git
$ cd SoapyRTLSDR
SoapyRTLSDR$ mkdir build
SoapyRTLSDR$ cd build
build$ cmake .. -DCMAKE_BUILD_TYPE=Release
build$ make
build$ sudo make install
build$ sudo ldconfig
# should now show RTL-SDR device if connected
build$ SoapySDRUtil --probe
SoapySDRPlay (similar to other Soapy modules):

** Note: requires API from http://sdrplay.com/linux.html to be installed first.
** Also note that the SoapySDRPlay installer will at present time install an earlier SoapySDR binary -- please re-run 'sudo make install' for your SoapySDR build folder to update to the build version after installing.

$ git clone https://github.com/pothosware/SoapySDRPlay.git
$ cd SoapySDRPlay
SoapySDRPlay$ mkdir build
SoapySDRPlay$ cd build
build$ cmake .. -DCMAKE_BUILD_TYPE=Release
build$ make
build$ sudo make install
build$ sudo ldconfig
build$ SoapySDRUtil --probe
Always ensure to update, build and install SoapySDR before building dependent projects.
Ubuntu 15.10 Note:

If you've installed a graphics driver that includes OpenGL and your libGL.so currently points to an invalid mesa/libGL.so you may get a compiler error:

make[2]: *** No rule to make target '/usr/lib/x86_64-linux-gnu/libGL.so', needed by 'x64/CubicSDR'. Stop.
Checking the link should reveal that it's pointing at a deleted file:

$ ls -lah /usr/lib/x86_64-linux-gnu/libGL.so
lrwxrwxrwx 1 root root 13 Oct 9 01:16 /usr/lib/x86_64-linux-gnu/libGL.so -> mesa/libGL.so
To fix the link first remove the old one:

$ sudo rm /usr/lib/x86_64-linux-gnu/libGL.so
Then check where libGL.so.1 is pointing:

$ ls -lah /usr/lib/x86_64-linux-gnu/libGL.so.1
lrwxrwxrwx 1 root root 15 Dec 20 19:03 /usr/lib/x86_64-linux-gnu/libGL.so.1 -> libGL.so.358.16
And create a new link to the same location:

$ sudo ln -s /usr/lib/x86_64-linux-gnu/libGL.so.358.16 /usr/lib/x86_64-linux-gnu/libGL.so

==============================================
Building CubicSDR for Linux:
apt-get install git build-essential automake cmake
apt-get install libpulse-dev libgtk-3-dev
apt-get install freeglut3 freeglut3-dev
mkdir cubicsdr && cd cubicsdr
git clone https://github.com/pothosware/SoapySDR.git
cd SoapySDR
mkdir build && cd build
cmake ../ -DCMAKE_BUILD_TYPE=Release
make -j4
make install
ldconfig
SoapySDRUtil --info #test SoapySDR install
cd ..
git clone https://github.com/jgaeddert/liquid-dsp
cd liquid-dsp
./bootstrap.sh
./configure --enable-fftoverride
make -j4
make install
ldconfig
cd ..
wget https://github.com/wxWidgets/wxWidgets/ ... .0.tar.bz2
tar -xvjf wxWidgets-3.1.0.tar.bz2
cd wxWidgets-3.1.0/
mkdir -p ~/Develop/wxWidgets-staticlib
./autogen.sh
./configure --with-opengl --disable-shared --enable-monolithic --with-libjpeg --with-libtiff --with-libpng --with-zlib --disable-sdltest --enable-unicode --enable-display --enable-propgrid --disable-webkit --disable-webview --disable-webviewwebkit --prefix=`echo ~/Develop/wxWidgets-staticlib` CXXFLAGS="-std=c++0x" --with-libiconv=/usr
make -j4 && make install
cd ..
apt-get install libhamlib2 libhamlib-utils libhamlib++-dev libhamlib-dev libhamlib-doc python-libhamlib2
git clone https://github.com/cjcliffe/CubicSDR.git
cd CubicSDR
mkdir build && cd build
../ -DUSE_HAMLIB=1 -DCMAKE_BUILD_TYPE=Release -DwxWidgets_CONFIG_EXECUTABLE=~/Develop/wxWidgets-staticlib/bin/wx-config
make
cd x86/
./CubicSDR
make install
cd ..
git clone https://github.com/pothosware/SoapyRTLSDR.git
cd SoapyRTLSDR
mkdir build && cd build
# mkdir: cannot create directory ‘build’: File exists
cmake .. -DCMAKE_BUILD_TYPE=Release
make
make install
ldconfig
# should now show RTL-SDR device if connected
SoapySDRUtil --probe

/root/radio/cubicsdr/CubicSDR/build/x86/CubicSDR

====================================================
Here's how to successfully build CubicSDR under Debian Jessie on the Raspberry Pi3.

The script below was adapted from the information on this page <https://github.com/cjcliffe/CubicSDR/wiki/Build-Linux>, and reflects the commands that resulted in the successful build.

Code: Select all

==============================================
# Building CubicSDR for Linux
# This script will successfully build CubicSDR under Debian Jessie on the Raspberry Pi3.
# Adapted from https://github.com/cjcliffe/CubicSDR/wiki/Build-Linux
# Larry Dighera June 7, 2016
# [email protected]

apt-get install git build-essential automake cmake
apt-get install libpulse-dev libgtk-3-dev
apt-get install freeglut3 freeglut3-dev
mkdir cubicsdr && cd cubicsdr
git clone https://github.com/pothosware/SoapySDR.git
cd SoapySDR
mkdir build && cd build
cmake ../ -DCMAKE_BUILD_TYPE=Release
make -j4
make install
ldconfig
SoapySDRUtil --info #test SoapySDR install
cd ..
git clone https://github.com/jgaeddert/liquid-dsp
cd liquid-dsp
./bootstrap.sh
./configure --enable-fftoverride 
make -j4
make install
ldconfig
cd ..
wget https://github.com/wxWidgets/wxWidgets/releases/download/v3.1.0/wxWidgets-3.1.0.tar.bz2
tar -xvjf wxWidgets-3.1.0.tar.bz2  
cd wxWidgets-3.1.0/
mkdir -p ~/Develop/wxWidgets-staticlib
./autogen.sh 
./configure --with-opengl --disable-shared --enable-monolithic --with-libjpeg --with-libtiff --with-libpng --with-zlib --disable-sdltest --enable-unicode --enable-display --enable-propgrid --disable-webkit --disable-webview --disable-webviewwebkit --prefix=`echo ~/Develop/wxWidgets-staticlib` CXXFLAGS="-std=c++0x" --with-libiconv=/usr
make -j4 && make install
cd ..
apt-get install libhamlib2 libhamlib-utils libhamlib++-dev libhamlib-dev libhamlib-doc python-libhamlib2
git clone https://github.com/cjcliffe/CubicSDR.git
cd CubicSDR
mkdir build && cd build
../ -DUSE_HAMLIB=1 -DCMAKE_BUILD_TYPE=Release -DwxWidgets_CONFIG_EXECUTABLE=~/Develop/wxWidgets-staticlib/bin/wx-config
make
cd x86/
./CubicSDR
make install
cd ..
git clone https://github.com/pothosware/SoapyRTLSDR.git
cd SoapyRTLSDR
cd build
cmake .. -DCMAKE_BUILD_TYPE=Release
make
make install
ldconfig
# should now show RTL-SDR device if connected
SoapySDRUtil --probe     
CubicSDR seems to use about 85% of the CPU cycles, and may be reduced about 10% in the CubicSDR Settings drop-down menu.
====================================================
There is no expedient to which a man will not resort
to avoid the real labor of thinking.
-- Sir Joshua Reynolds

stuzog
Posts: 7
Joined: Mon Nov 09, 2015 5:10 pm

Re: Build CubicSDR under Debien Jessie on the Raspberry Pi3

Tue Dec 27, 2016 2:35 am

Install of wxWidgets during configure threw this error and the subsequent make failed:

Code: Select all

checking for GTK+ - version >= 2.6.0... Package gtk+-2.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `gtk+-2.0.pc'
to the PKG_CONFIG_PATH environment variable
No package 'gtk+-2.0' found
no
*** Could not run GTK+ test program, checking why...
*** The test program failed to compile or link. See the file config.log for the
*** exact error that occurred. This usually means GTK+ is incorrectly installed.
How do I install GTK+ properly?

Return to “General discussion”