Difference between revisions of "Linux"

From sigrok
Jump to navigation Jump to search
m (add: hint ( sudo ldconfig /usr/local/lib/ ))
(Mention libudev, small fixes.)
Line 13: Line 13:
* [http://www.intra2net.com/en/developer/libftdi/ libftdi] (optional, only required for some devices)
* [http://www.intra2net.com/en/developer/libftdi/ libftdi] (optional, only required for some devices)
<!-- * [http://www.intra2net.com/en/developer/libftdi/ libftdi] >= 0.17 (optional, only required for some devices) -->
<!-- * [http://www.intra2net.com/en/developer/libftdi/ libftdi] >= 0.17 (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] >= 2.5 (optional, only required for protocol decoders)
* [http://www.python.org Python] >= 2.5 (optional, only required for protocol decoders)
* [http://qt.nokia.com Qt + Qt Creator] >= 4.5 (optional, only required for building/editing the GUI)
* [http://qt.nokia.com Qt + Qt Creator] >= 4.5 (optional, only required for building/editing the GUI)
Line 23: Line 24:


  $ '''sudo apt-get install git-core gcc g++ make autoconf automake libtool pkg-config \'''
  $ '''sudo apt-get install git-core gcc g++ make autoconf automake libtool pkg-config \'''
   '''libglib2.0-dev libftdi-dev libusb-1.0-0-dev libzip-dev python-dev qtcreator qt4-designer qt4-dev-tools libqt4-dev'''
   '''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:
Fedora:
Line 38: Line 39:
  $ '''sudo make install'''
  $ '''sudo make install'''


Then, for building the GUI:
Then, for building the [[GUI]] ('''Note:''' The GUI is not yet usable!):


  $ '''cd gui'''
  $ '''cd gui'''
Line 44: Line 45:
  $ '''make'''
  $ '''make'''


If you get warnings claiming potential symbol conflicts when running qmake, you are likely invoking qt3. Try running qmake-qt4 to force the correct version.
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 ==
== Pitfalls ==
If you get this error:
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
  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:
Then you have to rebuild the links to your shared libraries:
  $ '''sudo ldconfig /usr/local/lib/'''
 
  $ '''sudo ldconfig /usr/local/lib'''


== Test it ==
== Test it ==
  $ '''sigrok-cli -H'''
 
Should give you something like:
Scan for devices:
<pre>Plugins for the following devices are installed:
 
  saleae-logic
  $ '''sigrok-cli -D'''
  sump
The following devices were found:
  zeroplus-logic-cube
  ID    Device
asix-sigma
  0    Zeroplus Logic Cube with 32 probes
</pre>After plugin your device try
  demo  Demo device with 8 probes
  $''' sigrok-cli -D'''
 
<pre>
Get 10 samples from device 0 (Zeroplus Logic Cube in this example):
The following devices were found:
 
ID  Device
  $ '''sigrok-cli -d 0 --samples 10'''
0  Zeroplus Logic Cube with 32 probes
</pre>


See [[Command-line]] for further usage.
See [[Command-line]] for further usage.


== Distribution packages ==
== Distribution packages ==

Revision as of 17:57, 16 January 2011

sigrok-gui on Linux

This page describes how to build sigrok on Linux.

Requirements

  • git (for cloning the source code repository)
  • gcc, g++, make, ...
  • autoconf, automake, libtool, pkg-config
  • libglib >= 2.0
  • libusb >= 1.0.5
  • libzip >= 0.8
  • libftdi (optional, only required for some devices)
  • libudev >= 151 (optional, only required for some devices)
  • Python >= 2.5 (optional, only required for protocol decoders)
  • 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 python-devel

Building

$ git clone git://sigrok.git.sourceforge.net/gitroot/sigrok/sigrok
$ cd sigrok
$ ./autogen.sh
$ ./configure
$ make
$ sudo make install

Then, for building the 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

Test it

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.

Distribution packages