Difference between revisions of "Linux"

From sigrok
Jump to navigation Jump to search
m
Line 7: Line 7:
See [[Downloads#Binaries_and_distribution_packages|Downloads]].
See [[Downloads#Binaries_and_distribution_packages|Downloads]].


== Building from source ==
== Building ==


=== Requirements ===
=== libsigrok ===


* git
'''Installing the [[Building#Build_requirements|requirements]]:'''
* gcc (>= 4.0)
* g++
* make
* autoconf >= 2.63
* automake >= 1.11
* libtool
* pkg-config >= 0.22
* [http://library.gnome.org/devel/glib/unstable/ libglib] >= 2.28.0
* [http://www.libusb.org libusb] >= 1.0.5 (optional, only required for some devices)
* [http://nih.at/libzip/ libzip] >= 0.8
* zlib >= 1.2.3.1
* [http://www.intra2net.com/en/developer/libftdi/ libftdi] >= 0.16 (optional, only required for some devices)
* [http://www.kernel.org/pub/linux/utils/kernel/hotplug/libudev/ libudev] >= 151 (optional, only required for some devices)
* [http://www.python.org Python] >= 3.0 (optional, only required for libsigrokdecode)
* GTK+ (optional, only required for building/editing sigrok-gtk)
* [http://qt.nokia.com 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:
Debian/Ubuntu:


  $ '''sudo apt-get install git-core gcc g++ make autoconf automake libtool pkg-config \'''
  $ '''sudo apt-get install git-core gcc make autoconf automake libtool pkg-config \'''
   '''libglib2.0-dev libftdi-dev libudev-dev libusb-1.0-0-dev libzip-dev zlib1g-dev python3-dev \'''
   '''libglib2.0-dev libzip-dev libusb-1.0-0-dev libftdi-dev libudev-dev libasound2-dev'''
  '''libgtk2.0-dev qtcreator qt4-designer qt4-dev-tools libqt4-dev libasound2-dev \'''
  '''libboost-system-dev libboost-thread-dev'''


Fedora (TODO: Needs updates):
Fedora:
 
$ '''yum install gcc-c++ libtool glib2-devel libftdi-devel libusb1-devel libzip-devel qt-devel python3-devel'''


$ '''yum install git gcc make autoconf automake libtool pkgconfig glib2-devel libzip-devel libusb1-devel libftdi-devel libudev-devel alsa-lib-devel'''


OpenSuSE (12.2):
OpenSuSE (12.2):
$ '''zypper install gcc-c++ libtool glib2-devel libftdi1-devel libusb-1_0-devel libzip-devel libqt4-devel python3-devel'''


=== Building ===
$ '''zypper install gcc libtool glib2-devel libzip-devel libusb-1_0-devel libftdi1-devel'''


Building [[libsigrok]]:
'''Building:'''


  $ '''git clone git://sigrok.org/libsigrok'''
  $ '''git clone git://sigrok.org/libsigrok'''
Line 57: Line 33:
  $ '''./configure'''
  $ '''./configure'''
  $ '''make'''
  $ '''make'''
  $ '''sudo make install'''
  $ '''make install'''
  $ '''cd ..'''
 
=== libsigrokdecode ===
 
'''Installing the [[Building#Build_requirements|requirements]]:'''
 
  $ '''pkg_add -r git gcc autoconf268 automake111 libtool pkg-config glib20 python31'''


Building [[libsigrokdecode]]:
'''Building:'''


  $ '''git clone git://sigrok.org/libsigrokdecode'''
  $ '''git clone git://sigrok.org/libsigrokdecode'''
Line 67: Line 48:
  $ '''./configure'''
  $ '''./configure'''
  $ '''make'''
  $ '''make'''
  $ '''sudo make install'''
  $ '''make install'''
$ '''cd ..'''
 
=== sigrok-cli ===
 
'''Installing the [[Building#Build_requirements|requirements]]:'''


Then you need to build the chosen user interfaces (cli, qt or gtk).
$ '''pkg_add -r git gcc autoconf268 automake111 libtool pkg-config glib20'''


For building [[sigrok-cli]] (the command-line interface for sigrok):
'''Building:'''


  $ '''git clone git://sigrok.org/sigrok-cli'''
  $ '''git clone git://sigrok.org/sigrok-cli'''
Line 79: Line 63:
  $ '''./configure'''
  $ '''./configure'''
  $ '''make'''
  $ '''make'''
  $ '''sudo make install'''
  $ '''make install'''
  $ '''cd ..'''
 
=== PulseView ===
 
'''Installing the [[Building#Build_requirements|requirements]]:'''
 
  $ '''pkg_add -r git gcc libtool pkg-config cmake glib20 qt4 qt4-qmake qt4-moc qt4-rcc qt4-uic boost-libs'''


For building [[PulseView]]:
'''Building:'''


  $ '''git clone git://sigrok.org/pulseview'''
  $ '''git clone git://sigrok.org/pulseview'''
Line 91: Line 80:
  $ '''cd ..'''
  $ '''cd ..'''


For building [[sigrok-gtk]] ('''Note:''' The GTK+ GUI is not yet usable!):
=== sigrok-gtk ===
 
'''Note:''' [[sigrok-gtk]] is not yet usable!
 
'''Installing the [[Building#Build_requirements|requirements]]:'''
 
$ '''pkg_add -r git gcc autoconf268 automake111 libtool pkg-config glib20 gtk20'''
 
'''Building:'''


  $ '''git clone git://sigrok.org/sigrok-gtk'''
  $ '''git clone git://sigrok.org/sigrok-gtk'''
Line 98: Line 95:
  $ '''./configure'''
  $ '''./configure'''
  $ '''make'''
  $ '''make'''
  $ '''sudo make install'''
  $ '''make install'''
  $ '''cd ..'''
 
=== sigrok-qt ===
 
'''Note:''' [[sigrok-qt]] is not yet usable!
 
'''Installing the [[Building#Build_requirements|requirements]]:'''
 
  $ '''pkg_add -r git gcc libtool pkg-config glib20 qt4 qt4-qmake qt4-moc qt4-rcc qt4-uic'''


For building [[sigrok-qt]] ('''Note:''' The Qt GUI is not yet usable!):
'''Building:'''


  $ '''git clone git://sigrok.org/sigrok-qt'''
  $ '''git clone git://sigrok.org/sigrok-qt'''
  $ '''cd sigrok-qt'''
  $ '''cd sigrok-qt'''
  $ '''qmake'''
  $ '''qmake-qt4'''
  $ '''make'''
  $ '''make'''
  $ '''sudo make install'''
  $ '''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.
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 ===
== Common problems ==


If you get this error:
If you get this error:
Line 121: Line 124:


  $ '''sudo ldconfig /usr/local/lib'''
  $ '''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.

Revision as of 19:40, 2 February 2013

sigrok-gtk 0.1.0 on Linux

This page describes how to build/install sigrok on Linux.

Distribution packages

See Downloads.

Building

libsigrok

Installing the requirements:

Debian/Ubuntu:

$ sudo apt-get install git-core gcc make autoconf automake libtool pkg-config \
  libglib2.0-dev libzip-dev libusb-1.0-0-dev libftdi-dev libudev-dev libasound2-dev

Fedora:

$ yum install git gcc make autoconf automake libtool pkgconfig glib2-devel libzip-devel libusb1-devel libftdi-devel libudev-devel alsa-lib-devel

OpenSuSE (12.2):

$ zypper install gcc libtool glib2-devel libzip-devel libusb-1_0-devel libftdi1-devel

Building:

$ git clone git://sigrok.org/libsigrok
$ cd libsigrok
$ ./autogen.sh
$ ./configure
$ make
$ make install

libsigrokdecode

Installing the requirements:

$ pkg_add -r git gcc autoconf268 automake111 libtool pkg-config glib20 python31

Building:

$ git clone git://sigrok.org/libsigrokdecode
$ cd libsigrokdecode
$ ./autogen.sh
$ ./configure
$ make
$ make install

sigrok-cli

Installing the requirements:

$ pkg_add -r git gcc autoconf268 automake111 libtool pkg-config glib20

Building:

$ git clone git://sigrok.org/sigrok-cli
$ cd sigrok-cli
$ ./autogen.sh
$ ./configure
$ make
$ make install

PulseView

Installing the requirements:

$ pkg_add -r git gcc libtool pkg-config cmake glib20 qt4 qt4-qmake qt4-moc qt4-rcc qt4-uic boost-libs

Building:

$ git clone git://sigrok.org/pulseview
$ cd pulseview
$ cmake .
$ make
$ sudo make install
$ cd ..

sigrok-gtk

Note: sigrok-gtk is not yet usable!

Installing the requirements:

$ pkg_add -r git gcc autoconf268 automake111 libtool pkg-config glib20 gtk20

Building:

$ git clone git://sigrok.org/sigrok-gtk
$ cd sigrok-gtk
$ ./autogen.sh
$ ./configure
$ make
$ make install

sigrok-qt

Note: sigrok-qt is not yet usable!

Installing the requirements:

$ pkg_add -r git gcc libtool pkg-config glib20 qt4 qt4-qmake qt4-moc qt4-rcc qt4-uic

Building:

$ git clone git://sigrok.org/sigrok-qt
$ cd sigrok-qt
$ qmake-qt4
$ make
$ make install

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.

Common problems

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