Difference between revisions of "Linux"

From sigrok
Jump to navigation Jump to search
(AX_CXX_COMPILE_STDCXX_11 warnings)
(25 intermediate revisions by 7 users not shown)
Line 6: Line 6:


== Building ==
== Building ==
<div style="background-color:#ff6666">
'''IMPORTANT''': The following sections on installing build requirements are distro-specific examples and may or may not be out of date, depending on which distro you use. Please check the [[Building#Build_requirements|official build requirements list]] in the wiki or the current [http://sigrok.org/gitweb/?p=libsigrok.git;a=blob;f=README libsigrok README] for the full list of requirements.
</div>


=== libserialport ===
=== libserialport ===


'''Installing the [[Building#Build_requirements|requirements]]:'''
==== Installing the [[Building#Build_requirements|requirements]] ====


Example on Debian/Ubuntu (please check your respective distro's package manager tool if you use other distros):
'''Debian/Ubuntu/Mint'''
$ '''sudo apt-get install git-core gcc make autoconf automake libtool'''


  $ '''sudo apt-get install git-core gcc make autoconf automake libtool'''
'''Arch'''
  $ '''sudo pacman -S git gcc make autoconf automake libtool'''


'''Building:'''
==== Building ====


  $ '''git clone git://sigrok.org/libserialport'''
  $ '''git clone git://sigrok.org/libserialport'''
Line 26: Line 32:
=== libsigrok ===
=== libsigrok ===


'''Installing the [[Building#Build_requirements|requirements]]:'''
==== Installing the [[Building#Build_requirements|requirements]] ====


Example on Debian/Ubuntu (please check your respective distro's package manager tool if you use other distros):
'''Debian/Ubuntu/Mint'''


  $ '''sudo apt-get install git-core gcc g++ make autoconf autoconf-archive \'''
  $ '''sudo apt-get install git-core gcc g++ make autoconf autoconf-archive \'''
   '''automake libtool pkg-config libglib2.0-dev libglibmm-2.4-dev libzip-dev \'''
   '''automake libtool pkg-config libglib2.0-dev libglibmm-2.4-dev libzip-dev \'''
   '''libusb-1.0-0-dev libftdi-dev check doxygen \'''
   '''libusb-1.0-0-dev libftdi-dev check doxygen python-numpy\'''
   '''python-dev python-gi-dev python-setuptools swig default-jdk'''
   '''python-dev python-gi-dev python-setuptools swig default-jdk'''


Fedora (18, 19):
'''Fedora (18, 19, 20, 21, 22, 23)'''


  $ '''sudo yum install git gcc make autoconf automake libtool pkgconfig glib2-devel \'''
  $ '''sudo yum install git gcc make autoconf autoconf-archive automake libtool pkgconfig \'''
   '''libzip-devel libusb1-devel libftdi-devel check-devel'''
   ''' glib2-devel libzip-devel libusb1-devel libftdi-devel check-devel doxygen'''


OpenSuSE (12.2):
:: For C++ bindings, add '''sudo yum install glibmm24-devel'''.
:: for Python bindings, add '''sudo yum install python-devel numpy pygobject3-devel swig'''.
:: For Fedora 23, you need as well: '''redhat-rpm-config''' and note that '''libusb1-devel''' is now '''libusbx-devel'''.


$ '''zypper install git gcc make autoconf automake libtool pkg-config glib2-devel \'''
'''Arch'''
  '''libzip-devel libusb-1_0-devel libftdi1-devel check python3-devel'''


'''Building:'''
$ '''sudo pacman -S git gcc make autoconf autoconf-archive automake libtool \'''
  '''pkg-config glib2 glibmm libzip libusb libftdi check doxygen python-numpy \'''
  '''python-setuptools swig jdk8-openjdk'''
 
==== Building ====


  $ '''git clone git://sigrok.org/libsigrok'''
  $ '''git clone git://sigrok.org/libsigrok'''
Line 53: Line 64:
  $ '''make'''
  $ '''make'''
  $ '''sudo make install'''
  $ '''sudo make install'''
==== Device access ====
Please read [[Building#Cannot_access_USB_.2F_serial_.2F_other_device|this FAQ entry]] for any extra steps you may need to take to get your specific device working.
<div style="background-color:#ff6666">
Please see [[Building#FAQ]] if you are sure that you installed all requirements properly but still encounter some issues.
</div>


=== libsigrokdecode ===
=== libsigrokdecode ===


'''Installing the [[Building#Build_requirements|requirements]]:'''
==== Installing the [[Building#Build_requirements|requirements]] ====
 
Example on Debian/Ubuntu (please check your respective distro's package manager tool if you use other distros):


'''Debian/Ubuntu/Mint'''
  $ '''sudo apt-get install git-core gcc make autoconf automake libtool pkg-config libglib2.0-dev python3-dev'''
  $ '''sudo apt-get install git-core gcc make autoconf automake libtool pkg-config libglib2.0-dev python3-dev'''


Fedora (18, 19, 20):
'''Fedora (18, 19, 20)'''
$ '''sudo yum install git gcc make autoconf automake libtool pkgconfig glib2-devel python3-devel check-devel'''


  $ '''sudo yum install git gcc make autoconf automake libtool pkgconfig glib2-devel python3-devel check-devel'''
'''Arch'''
  $ '''sudo pacman -S git gcc make autoconf automake libtool pkgconfig glib2 python check'''


'''Building:'''
==== Building ====


  $ '''git clone git://sigrok.org/libsigrokdecode'''
  $ '''git clone git://sigrok.org/libsigrokdecode'''
Line 77: Line 97:
=== sigrok-cli ===
=== sigrok-cli ===


'''Installing the [[Building#Build_requirements|requirements]]:'''
==== Installing the [[Building#Build_requirements|requirements]] ====
 
Example on Debian/Ubuntu (please check your respective distro's package manager tool if you use other distros):


'''Debian/Ubuntu/Mint''''
  $ '''sudo apt-get install git-core gcc make autoconf automake libtool pkg-config libglib2.0-dev'''
  $ '''sudo apt-get install git-core gcc make autoconf automake libtool pkg-config libglib2.0-dev'''


Fedora (18, 19):
'''Fedora (18, 19)'''
 
  $ '''sudo yum install git gcc make autoconf automake libtool pkgconfig glib2-devel'''
  $ '''sudo yum install git gcc make autoconf automake libtool pkgconfig glib2-devel'''


OpenSuse (13.1):
'''OpenSuse'''
$ '''sudo zypper install git gcc make autoconf automake libtool pkgconfig glib2-devel'''


  $ '''zypper install git gcc make autoconf automake libtool pkgconfig glib2-devel'''
'''Arch'''
  $ '''sudo pacman -S git gcc make autoconf automake libtool pkgconfig glib2'''


'''Building:'''
==== Building ====


  $ '''git clone git://sigrok.org/sigrok-cli'''
  $ '''git clone git://sigrok.org/sigrok-cli'''
Line 102: Line 122:
=== PulseView ===
=== PulseView ===


'''Installing the [[Building#Build_requirements|requirements]]:'''
==== Installing the [[Building#Build_requirements|requirements]] ====
 
Example on Debian/Ubuntu (please check your respective distro's package manager tool if you use other distros):


'''Debian/Ubuntu/Mint'''
  $ '''sudo apt-get install git-core g++ make cmake libtool pkg-config \'''
  $ '''sudo apt-get install git-core g++ make cmake libtool pkg-config \'''
   '''libglib2.0-dev libqt4-dev libboost-test-dev \'''
   '''libglib2.0-dev libqt4-dev libboost-test-dev libboost-thread-dev\'''
   '''libboost-filesystem-dev libboost-system-dev'''
   '''libboost-filesystem-dev libboost-system-dev libqt5svg5-dev'''


Fedora (18, 19):
'''Fedora (18, 19, 23)'''
$ '''sudo yum install git gcc cmake libtool pkgconfig glib2-devel \'''
  '''boost-devel qt-devel'''


  $ '''sudo yum install git gcc cmake libtool pkgconfig glib2-devel \'''
'''Arch'''
   '''boost-devel qt-devel boost-devel'''
  $ '''sudo pacman -S git gcc make cmake libtool pkgconfig glib2 boost qt5 \'''
   '''qt5-base qt5-svg'''


'''Building:'''
==== Building ====


  $ '''git clone git://sigrok.org/pulseview'''
  $ '''git clone git://sigrok.org/pulseview'''
Line 123: Line 145:
  $ '''sudo make install'''
  $ '''sudo make install'''


== Common problems ==
'''Hint''': if something goes wrong, you can see what cmake is doing by running
 
libsigrok's <tt>'''autogen.sh'''</tt> outputs the following warning:
 
--- Warning: AX_CXX_COMPILE_STDCXX_11 macro not found.
--- You won't be able to build the language bindings!
 
That means that the m4 macro used to detect C++11 support was not found. Use the package manager of your distribution to install the package that included the macro. Most distributions package this file in a package called <tt>'''autoconf-archive'''</tt> or similar.
 
----


libsigrok's <tt>'''autogen.sh'''</tt> outputs the following warning:
$ '''cmake VERBOSE=1'''


--- Warning: AX_CXX_COMPILE_STDCXX_11 macro is too old.
== FAQ ==
--- (found version <version>, at least 4 is required)
--- You won't be able to build the language bindings!


That means that the version of the macro included with your distribution is too old. You can:
=== Cannot open shared object file: No such file or directory ===
* Download the latest version of the macro from [https://www.gnu.org/software/autoconf-archive/ax_cxx_compile_stdcxx_11.html here], and use the <tt>'''ACLOCAL_PATH'''</tt> environment variable to point aclocal to the file:
$ '''ACLOCAL_PATH=/path/to/directory/containing/macro ./autogen.sh'''
* Download the latest version of the macro and overwrite the file included with your distribution, most often located in <tt> /usr/share/aclocal/</tt>.


----
See [[Building#Cannot_open_shared_object_file:_No_such_file_or_directory|here]].


If you get this error:
=== TEST FAILED: .../lib/python2.7/site-packages/ does NOT support .pth files ===


sigrok-cli: error while loading shared libraries: libsigrok.so.0: cannot open shared object file: No such file or directory
See [[Building#TEST_FAILED:_....2Flib.2Fpython2.7.2Fsite-packages.2F_does_NOT_support_.pth_files|here]].


Then you have to rebuild the links to your shared libraries:
=== Cannot access USB / serial / other device ===


$ '''sudo ldconfig /usr/local/lib'''
See [[Building#Cannot_access_USB_.2F_serial_.2F_other_device|here]].

Revision as of 16:24, 4 September 2016

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

Distribution packages

See Downloads.

Building

IMPORTANT: The following sections on installing build requirements are distro-specific examples and may or may not be out of date, depending on which distro you use. Please check the official build requirements list in the wiki or the current libsigrok README for the full list of requirements.

libserialport

Installing the requirements

Debian/Ubuntu/Mint

$ sudo apt-get install git-core gcc make autoconf automake libtool

Arch

$ sudo pacman -S git gcc make autoconf automake libtool

Building

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

libsigrok

Installing the requirements

Debian/Ubuntu/Mint

$ sudo apt-get install git-core gcc g++ make autoconf autoconf-archive \
  automake libtool pkg-config libglib2.0-dev libglibmm-2.4-dev libzip-dev \
  libusb-1.0-0-dev libftdi-dev check doxygen python-numpy\
  python-dev python-gi-dev python-setuptools swig default-jdk

Fedora (18, 19, 20, 21, 22, 23)

$ sudo yum install git gcc make autoconf autoconf-archive automake libtool pkgconfig \
   glib2-devel libzip-devel libusb1-devel libftdi-devel check-devel doxygen
For C++ bindings, add sudo yum install glibmm24-devel.
for Python bindings, add sudo yum install python-devel numpy pygobject3-devel swig.
For Fedora 23, you need as well: redhat-rpm-config and note that libusb1-devel is now libusbx-devel.

Arch

$ sudo pacman -S git gcc make autoconf autoconf-archive automake libtool \
  pkg-config glib2 glibmm libzip libusb libftdi check doxygen python-numpy \
  python-setuptools swig jdk8-openjdk

Building

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

Device access

Please read this FAQ entry for any extra steps you may need to take to get your specific device working.

Please see Building#FAQ if you are sure that you installed all requirements properly but still encounter some issues.

libsigrokdecode

Installing the requirements

Debian/Ubuntu/Mint

$ sudo apt-get install git-core gcc make autoconf automake libtool pkg-config libglib2.0-dev python3-dev

Fedora (18, 19, 20)

$ sudo yum install git gcc make autoconf automake libtool pkgconfig glib2-devel python3-devel check-devel

Arch

$ sudo pacman -S git gcc make autoconf automake libtool pkgconfig glib2 python check

Building

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

sigrok-cli

Installing the requirements

Debian/Ubuntu/Mint'

$ sudo apt-get install git-core gcc make autoconf automake libtool pkg-config libglib2.0-dev

Fedora (18, 19)

$ sudo yum install git gcc make autoconf automake libtool pkgconfig glib2-devel

OpenSuse

$ sudo zypper install git gcc make autoconf automake libtool pkgconfig glib2-devel

Arch

$ sudo pacman -S git gcc make autoconf automake libtool pkgconfig glib2

Building

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

PulseView

Installing the requirements

Debian/Ubuntu/Mint

$ sudo apt-get install git-core g++ make cmake libtool pkg-config \
  libglib2.0-dev libqt4-dev libboost-test-dev libboost-thread-dev\
  libboost-filesystem-dev libboost-system-dev libqt5svg5-dev

Fedora (18, 19, 23)

$ sudo yum install git gcc cmake libtool pkgconfig glib2-devel \
  boost-devel qt-devel

Arch

$ sudo pacman -S git gcc make cmake libtool pkgconfig glib2 boost qt5 \
  qt5-base qt5-svg

Building

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

Hint: if something goes wrong, you can see what cmake is doing by running

$ cmake VERBOSE=1

FAQ

Cannot open shared object file: No such file or directory

See here.

TEST FAILED: .../lib/python2.7/site-packages/ does NOT support .pth files

See here.

Cannot access USB / serial / other device

See here.