Difference between revisions of "Building"

From sigrok
Jump to navigation Jump to search
(Update and extend the libsigrok requirements.)
(Add FAQ section, moved from Linux.)
Line 127: Line 127:
* [[Android]]
* [[Android]]
* [[Embedded]]
* [[Embedded]]
== FAQ ==
=== Warning: AX_CXX_COMPILE_STDCXX_11 macro not found ===
[[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/OS to install the package that included the macro. Most distributions package this file in a package called <tt>'''autoconf-archive'''</tt> or similar.
=== Warning: AX_CXX_COMPILE_STDCXX_11 macro is too old ===
[[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/OS is too old. You can:
* 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>.
=== Cannot open shared object file: No such file or directory ===
You get the following error:
error while loading shared libraries: libsigrok.so.0: cannot open shared object file: No such file or directory
Run '''ldconfig''' with the proper installation '''lib''' directory where you installed the sigrok related libraries, e.g.:
$ '''sudo ldconfig /usr/local/lib'''

Revision as of 18:14, 3 January 2015

This page documents the build requirements for the sigrok subprojects, and contains links to OS-specific instructions to build them from source.

Distribution packages and binaries

See Downloads for distribution packages of the sigrok subprojects and binary builds for various OSes.

See the instructions below if you want to build from source.

Build requirements

libsigrok

Requirements for the C library:

  • git (only needed when building from git)
  • gcc (>= 4.0) or clang
  • make
  • autoconf >= 2.63 (only needed when building from git)
  • automake >= 1.11 (only needed when building from git)
  • libtool (only needed when building from git)
  • pkg-config >= 0.22
    • This is part of the standard OpenBSD install (not an extra package), apparently.
  • libglib >= 2.34.0
  • libzip >= 0.10
  • libserialport >= 0.1.0 (optional, used by some drivers)
  • librevisa >= 0.0.20130812 (optional, used by some drivers)
  • libusb-1.0 >= 1.0.16 (optional, used by some drivers)
    • On FreeBSD, this is an integral part of the FreeBSD libc, not an extra package/library.
    • This is part of the standard OpenBSD install (not an extra package), apparently.
  • libftdi >= 0.16 or libftdi1 >= 1.0 (optional, used by some drivers)
  • libgpib (optional, used by some drivers; only available on Linux)
  • check >= 0.9.4 (optional, only needed to run unit tests)
  • doxygen (optional, only needed for the C API docs)
  • graphviz (optional, only needed for the C API docs)

Requirements for the C++ bindings:

  • libsigrok >= 0.3.0 (the libsigrok C library, see above)
  • A C++ compiler with C++11 support (-std=c++11 option), e.g.
    • g++ (>= 4.7)
    • clang++ (>= 3.1)
  • autoconf-archive (for the macro AX_CXX_COMPILE_STDCXX_11; only needed when building from git)
  • doxygen (required for building the bindings, not only for C++ API docs!)
  • graphviz (optional, only needed for the C++ API docs)
  • Python (2 or 3) executable (development files are not needed)
  • glibmm-2.4 (>= 2.32.0)

Requirements for the Python bindings:

  • libsigrokxx >= 0.3.0 (the libsigrok C++ bindings, see above)
  • Python >= 2.7 or Python >= 3 (including development files!)
  • Python setuptools (for Python 2 or 3)
  • pygobject >= 3.0.0 (for Python 2 or 3), a.k.a python-gi
  • numpy (for Python 2 or 3)
  • SWIG >= 2.0.0
  • doxygen (optional, only needed for the Python API docs)
  • graphviz (optional, only needed for the Python API docs)
  • doxypy (optional, only needed for the Python API docs)

Requirements for the Java bindings:

  • libsigrokxx >= 0.3.0 (the libsigrok C++ bindings, see above)
  • SWIG >= 2.0.0
  • Java JDK (for JNI includes and the javac/jar binaries)
  • doxygen (optional, only needed for the Java API docs)
  • graphviz (optional, only needed for the Java API docs)

libsigrokdecode

  • git
  • gcc (>= 4.0)
  • make
  • autoconf >= 2.63
  • automake >= 1.11
  • libtool
  • pkg-config >= 0.22
    • This is part of the standard OpenBSD install (not an extra package), apparently.
  • libglib >= 2.24.0
  • Python >= 3.2
  • check >= 0.9.4 (optional, only needed to run unit tests)
  • libsigrok >= 0.3.0 (optional, only needed for the developer PD tests)
  • python3-coverage (optional, only needed for the developer PD tests)

sigrok-cli

  • git
  • gcc (>= 4.0)
  • make
  • autoconf >= 2.63
  • automake >= 1.11
  • libtool
  • pkg-config >= 0.22
    • This is part of the standard OpenBSD install (not an extra package), apparently.
  • libglib >= 2.28.0
  • libsigrok >= 0.3.0
  • libsigrokdecode >= 0.3.0

PulseView

  • git
  • g++
  • make
  • libtool
  • pkg-config >= 0.22
    • This is part of the standard OpenBSD install (not an extra package), apparently.
  • cmake >= 2.8.6
  • libglib >= 2.28.0
  • Qt >= 4.5
  • libboost >= 1.42 (including the following libs)
    • libboost-sytem
    • libboost-thread
    • libboost-filesystem
    • libboost-test (optional, only needed to run unit tests)
  • libsigrok >= 0.3.0
  • libsigrokdecode >= 0.3.0

Building from source

See the OS-specific build instructions below if you want to build the sigrok subprojects from source:

FAQ

Warning: AX_CXX_COMPILE_STDCXX_11 macro not found

libsigrok's autogen.sh 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/OS to install the package that included the macro. Most distributions package this file in a package called autoconf-archive or similar.

Warning: AX_CXX_COMPILE_STDCXX_11 macro is too old

libsigrok's autogen.sh 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/OS is too old. You can:

  • Download the latest version of the macro from here, and use the ACLOCAL_PATH 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 /usr/share/aclocal.

Cannot open shared object file: No such file or directory

You get the following error:

error while loading shared libraries: libsigrok.so.0: cannot open shared object file: No such file or directory

Run ldconfig with the proper installation lib directory where you installed the sigrok related libraries, e.g.:

$ sudo ldconfig /usr/local/lib