Linux
This page describes how to build/install sigrok on Linux.
Distribution packages
See Downloads.
Building from source
Requirements
- git
- gcc (>= 4.0)
- g++
- make
- autoconf >= 2.63
- automake >= 1.11
- libtool
- pkg-config >= 0.22
- libglib >= 2.28.0
- libusb >= 1.0.5 (optional, only required for some devices)
- libzip >= 0.8
- zlib >= 1.2.3.1
- libftdi >= 0.16 (optional, only required for some devices)
- libudev >= 151 (optional, only required for some devices)
- Python >= 3.0 (optional, only required for libsigrokdecode)
- GTK+ (optional, only required for building/editing sigrok-gtk)
- Qt + Qt Creator >= 4.5 (optional, only required for building/editing the sigrok-qt)
Installing the build-dependencies
On most Linux distributions there are pre-built packages for the sigrok dependencies (if not, you have to build the packages from source). The installation using a package manager is usually pretty simple.
Debian/Ubuntu:
$ sudo apt-get install git-core gcc g++ make autoconf automake libtool pkg-config \ libglib2.0-dev libftdi-dev libudev-dev libusb-1.0-0-dev libzip-dev zlib1g-dev python3-dev \ libgtk2.0-dev qtcreator qt4-designer qt4-dev-tools libqt4-dev libasound2-dev \ libboost-system-dev libboost-thread-dev
Fedora (TODO: Needs updates):
$ yum install gcc-c++ libtool glib2-devel libftdi-devel libusb1-devel libzip-devel qt-devel python3-devel
OpenSuSE (12.2):
$ zypper install gcc-c++ libtool glib2-devel libftdi1-devel libusb-1_0-devel libzip-devel libqt4-devel python3-devel
Building
Building libsigrok:
$ git clone git://sigrok.org/libsigrok $ cd libsigrok $ ./autogen.sh $ ./configure $ make $ sudo make install $ cd ..
Building libsigrokdecode:
$ git clone git://sigrok.org/libsigrokdecode $ cd libsigrokdecode $ ./autogen.sh $ ./configure $ make $ sudo make install $ cd ..
Then you need to build the chosen user interfaces (cli, qt or gtk).
For building sigrok-cli (the command-line interface for sigrok):
$ git clone git://sigrok.org/sigrok-cli $ cd sigrok-cli $ ./autogen.sh $ ./configure $ make $ sudo make install $ cd ..
For building PulseView:
$ git clone git://sigrok.org/pulseview $ cd pulseview $ cmake . $ make $ sudo make install $ cd ..
For building sigrok-gtk (Note: The GTK+ GUI is not yet usable!):
$ git clone git://sigrok.org/sigrok-gtk $ cd sigrok-gtk $ ./autogen.sh $ ./configure $ make $ sudo make install $ cd ..
For building sigrok-qt (Note: The Qt GUI is not yet usable!):
$ git clone git://sigrok.org/sigrok-qt $ cd sigrok-qt $ qmake $ make $ sudo make install $ cd ..
If you get warnings claiming potential symbol conflicts when running qmake, you are likely not invoking qmake-qt4. Try running qmake-qt4 to force the correct version.
Pitfalls
If you get this error:
sigrok-cli: error while loading shared libraries: libsigrok.so.0: cannot open shared object file: No such file or directory
Then you have to rebuild the links to your shared libraries:
$ sudo ldconfig /usr/local/lib
Testing
Scan for devices:
$ sigrok-cli -D The following devices were found: ID Device 0 Zeroplus Logic Cube with 32 probes demo Demo device with 8 probes
Get 10 samples from device 0 (Zeroplus Logic Cube in this example):
$ sigrok-cli -d 0 --samples 10
See sigrok-cli for further usage.