Difference between revisions of "Linux"
(→Installing the build-dependencies: fixed the python installation command for fedora) |
(→Building: Added info for building the cli) |
||
Line 42: | Line 42: | ||
First, checkout the sources: | First, checkout the sources: | ||
$ '''git clone git://sigrok.git.sourceforge.net/gitroot/sigrok/sigrok''' | $ '''git clone git://sigrok.git.sourceforge.net/gitroot/sigrok/sigrok''' | ||
$ '''cd sigrok''' | $ '''cd sigrok''' | ||
Then you need to build libsigrok: | Then you need to build the libraries. For libsigrok: | ||
$ '''cd libsigrok''' | $ '''cd libsigrok''' | ||
Line 61: | Line 62: | ||
$ '''sudo make install''' | $ '''sudo make install''' | ||
Then, | Then you need to build the chosen user interfaces (cli, qt or gtk). | ||
For building the [[Command-line |command line]] interface (cli): | |||
$ '''cd ../sigrok-cli''' | |||
$ '''./autogen.sh''' | |||
$ '''./configure''' | |||
$ '''make''' | |||
$ '''sudo make install''' | |||
For building the [[GUI | QT GUI ]] ('''Note:''' The GUI is not yet usable!): | |||
$ '''cd gui''' | $ '''cd ../gui''' | ||
$ '''qmake''' | $ '''qmake''' | ||
$ '''make''' | $ '''make''' |
Revision as of 18:16, 4 January 2012
This page describes how to build/install sigrok on Linux.
Distribution packages
There are no distribution packages, yet, but some are being worked on.
- Debian / Ubuntu: Uwe Hermann will create packages for Debian unstable (which will semi-automatically migrate to Ubuntu after a while).
- Fedora: See Linux/Fedora.
Building from source
Requirements
- git (for cloning the source code repository)
- gcc, g++, make, ...
- autoconf, automake, libtool, pkg-config
- libglib >= 2.22.0
- libusb >= 1.0.5
- libzip >= 0.8
- libftdi (optional, only required for some devices)
- libudev >= 151 (optional, only required for some devices)
- Python >= 3.0
- Qt + Qt Creator >= 4.5 (optional, only required for building/editing the GUI)
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 python-dev qtcreator qt4-designer qt4-dev-tools libqt4-dev
Fedora:
$ yum install gcc-c++ libtool glib2-devel libftdi-devel libusb1-devel libzip-devel qt-devel python3-devel
Building
First, checkout the sources:
$ git clone git://sigrok.git.sourceforge.net/gitroot/sigrok/sigrok $ cd sigrok
Then you need to build the libraries. For libsigrok:
$ cd libsigrok $ ./autogen.sh $ ./configure $ make $ sudo make install
The same applies to libsigrokdecode:
$ cd ../libsigrok $ ./autogen.sh $ ./configure $ make $ sudo make install
Then you need to build the chosen user interfaces (cli, qt or gtk).
For building the command line interface (cli):
$ cd ../sigrok-cli $ ./autogen.sh $ ./configure $ make $ sudo make install
For building the QT GUI (Note: The GUI is not yet usable!):
$ cd ../gui $ qmake $ make
If you get warnings claiming potential symbol conflicts when running qmake, you are likely 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 Command-line for further usage.