Difference between revisions of "Linux"

From sigrok
Jump to navigation Jump to search
(AX_CXX_COMPILE_STDCXX_11 warnings)
(Moved some parts to Building, rework some others.)
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 ===
Line 53: Line 57:
  $ '''make'''
  $ '''make'''
  $ '''sudo make install'''
  $ '''sudo make install'''
<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 ===
Line 123: Line 131:
  $ '''sudo make install'''
  $ '''sudo make install'''


== Common problems ==
== FAQ ==
 
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:
 
--- Warning: AX_CXX_COMPILE_STDCXX_11 macro is too old.
--- (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:
=== Warning: AX_CXX_COMPILE_STDCXX_11 macro not found ===
* 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#Warning:_AX_CXX_COMPILE_STDCXX_11_macro_not_found]].


If you get this error:
=== Warning: AX_CXX_COMPILE_STDCXX_11 macro is too old ===


sigrok-cli: error while loading shared libraries: libsigrok.so.0: cannot open shared object file: No such file or directory
See [[Building#Warning:_AX_CXX_COMPILE_STDCXX_11_macro_is_too_old]].


Then you have to rebuild the links to your shared libraries:
=== Cannot open shared object file: No such file or directory ===


$ '''sudo ldconfig /usr/local/lib'''
See [[Building#Cannot_open_shared_object_file:_No_such_file_or_directory]].

Revision as of 17:35, 3 January 2015

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:

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

$ sudo apt-get install git-core 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:

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

$ 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-dev python-gi-dev python-setuptools swig default-jdk

Fedora (18, 19):

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

OpenSuSE (12.2):

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

Building:

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

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

libsigrokdecode

Installing the requirements:

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

$ 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

Building:

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

sigrok-cli

Installing the requirements:

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

$ 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 (13.1):

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

Building:

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

PulseView

Installing the requirements:

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

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

Fedora (18, 19):

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

Building:

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

FAQ

Warning: AX_CXX_COMPILE_STDCXX_11 macro not found

See Building#Warning:_AX_CXX_COMPILE_STDCXX_11_macro_not_found.

Warning: AX_CXX_COMPILE_STDCXX_11 macro is too old

See Building#Warning:_AX_CXX_COMPILE_STDCXX_11_macro_is_too_old.

Cannot open shared object file: No such file or directory

See Building#Cannot_open_shared_object_file:_No_such_file_or_directory.