Skip to content

Building Scopy on Linux

AlexandraTrifan edited this page Nov 7, 2018 · 13 revisions

Installing the dependencies

Install Qt 5 using an online or offline installer from the official Qt downloads page.

Install git, cmake, libzip, autoconf, libtool and libxml

sudo apt-get install git cmake libzip-dev autoconf libtool libxml2 libxml2-dev libmatio2 libmatio-dev

Install Python header files

sudo apt-get install python-dev
sudo apt-get install python3-dev

Build and install Boost

cd ~
wget https://netcologne.dl.sourceforge.net/project/boost/boost/1.63.0/boost_1_63_0.tar.gz
tar -xzvf boost_1_63_0.tar.gz
cd boost_1_63_0
./bootstrap.sh --with-libraries=date_time,filesystem,program_options,regex,system,test,thread
./b2
sudo ./b2 install

Install Markdown and Cheetah

sudo apt-get install python-cheetah python-markdown

Install libfftw3

sudo apt-get install libfftw3-dev

Build and install Volk

cd ~
wget http://libvolk.org/releases/volk-1.3.tar.gz
tar -xzvf volk-1.3.tar.gz
cd volk-1.3
mkdir build && cd build
cmake ..
make
sudo make install

Build and install GNU Radio

cd ~
git clone https://github.com/analogdevicesinc/gnuradio
cd gnuradio
git checkout scopy
mkdir build && cd build
cmake -DENABLE_INTERNAL_VOLK:​BOOL=OFF -DENABLE_GR_FEC:BOOL=OFF -DENABLE_GR_DIGITAL:BOOL=OFF -DENABLE_GR_DTV:BOOL=OFF -DENABLE_GR_ATSC:BOOL=OFF -DENABLE_GR_AUDIO:BOOL=OFF -DENABLE_GR_CHANNELS:BOOL=OFF -DENABLE_GR_NOAA:BOOL=OFF -DENABLE_GR_PAGER:​BOOL=OFF -DENABLE_GR_TRELLIS:​BOOL=OFF -DENABLE_GR_VOCODER:​BOOL=OFF ​..
make
sudo make install

Install libffi, libmount, libpcre, libglib, libsigc++, libglibmm, doxygen

sudo apt-get install libffi-dev libmount-dev libpcre3-dev libglib2.0-dev libsigc++-2.0-dev libglibmm-2.4-dev doxygen

Build and install libsigrok

cd ~
git clone https://github.com/sigrokproject/libsigrok/
cd libsigrok
./autogen.sh
./configure --disable-all-drivers --enable-bindings --enable-cxx
make
sudo make install

Build and install libsigrokdecode

cd ~
wget http://sigrok.org/download/source/libsigrokdecode/libsigrokdecode-0.4.1.tar.gz
tar -xzvf libsigrokdecode-0.4.1.tar.gz
cd libsigrokdecode-0.4.1
./configure
make
sudo make install

Install OpenGL development files

sudo apt-get install libglu1-mesa-dev

Install curl

sudo apt-get install curl

Build and install Qwt

Before building Qwt, you need to check out your version of qmake.
Depending on the location of your Qt installation,​ the output of the following command can be either the version of Qt or an error.

qmake --version

If the output is an error it means you have a custom location for Qt. Please use the full path of qmake 5 in the following steps.
Example:

Use /​opt/​Qt/​5.9.1/​gcc_64/​bin/​qmake instead of qmake

If the Qt version is less than 5, you can do the following:

export QT_SELECT=5

Now we can build and install Qwt:

cd ~
git clone https://github.com/osakared/qwt
cd qwt
git checkout qwt-6.1-multiaxes
gedit qwtconfig.pri 

Change QWT_INSTALL_PREFIX to /usr/local

qmake qwt.pro
make
sudo make install

Build and install Qwt Polar

cd ~
wget https://downloads.sourceforge.net/project/qwtpolar/qwtpolar/1.1.1/qwtpolar-1.1.1.tar.bz2
tar xvjf qwtpolar-1.1.1.tar.bz2
cd qwtpolar-1.1.1
curl -o qwtpolar-qwt-6.1-compat.patch https://raw.githubusercontent.com/analogdevicesinc/scopy-flatpak/master/qwtpolar-qwt-6.1-compat.patch
patch -p1 < qwtpolar-qwt-6.1-compat.patch
gedit qwtpolarconfig.pri

Change QWT_POLAR_INSTALL_PREFIX to /usr/local and remove the line: QWT_POLAR_CONFIG += QwtPolarExamples

qmake qwtpolar.pro
make
sudo make install

Install libusb

sudo apt-get install libusb-1.0-0-dev

Build and install libiio

cd ~
git clone https://github.com/analogdevicesinc/libiio
cd libiio && mkdir build && cd build
cmake -DCMAKE_INSTALL_LIBDIR:STRING=lib -DINSTALL_UDEV_RULE:BOOL=OFF -DWITH_TESTS:BOOL=OFF -DWITH_DOC:BOOL=OFF -DWITH_IIOD:BOOL=OFF -DWITH_LOCAL_BACKEND:BOOL=OFF -DWITH_MATLAB_BINDINGS_API:BOOL=OFF ..
make
sudo make install

Install flex

sudo apt-get install flex

Install bison

sudo apt-get install bison

Install libad9361

cd ~
git clone https://github.com/analogdevicesinc/libad9361-iio
cd libad9361-iio
mkdir build && cd build
cmake ..
make
sudo make install

Build and install the IIO blocks for GNU Radio

cd ~
git clone https://github.com/analogdevicesinc/gr-iio
cd gr-iio
mkdir build && cd build
cmake ..
make
sudo make install

Building Scopy

git clone https://github.com/analogdevicesinc/scopy.git

This will fetch the latest sources from GitHub to a "scopy" directory.

cd scopy
mkdir build && cd build
cmake ..

If everything goes well, the output should be "Configuring done" and "Generating done".

Now build the project:

make

And run Scopy:

./scopy
Clone this wiki locally