Requirements (Debugging with GDB)
Next: Running Configure, Up: Installing GDB [Contents][Index]
C.1 Requirements for Building GDB
Building GDB requires various tools and packages to be available. Other packages will be used only if they are found.
Tools/Packages Necessary for Building GDB
- C++11 compiler
- GDB is written in C++11. It should be buildable with any recent C++11 compiler, e.g. GCC.
- GNU make
- GDB’s build system relies on features only found in the GNU make program. Other variants of
make
will not work. - GMP (The GNU Multiple Precision Arithmetic Library)
- GDB now uses GMP to perform some of its arithmetics. This library may be included with your operating system distribution; if it is not, you can get the latest version from https://gmplib.org/. If GMP is installed at an unusual path, you can use the
--with-libgmp-prefix
option to specify its location.
Tools/Packages Optional for Building GDB
- Expat
GDB can use the Expat XML parsing library. This library may be included with your operating system distribution; if it is not, you can get the latest version from http://expat.sourceforge.net. The
configure
script will search for this library in several standard locations; if it is installed in an unusual path, you can use the--with-libexpat-prefix
option to specify its location.Expat is used for:
- Remote protocol memory maps (see Memory Map Format)
- Target descriptions (see Target Descriptions)
- Remote shared library lists (See Library List Format, or alternatively see Library List Format for SVR4 Targets)
- MS-Windows shared libraries (see Shared Libraries)
- Traceframe info (see Traceframe Info Format)
- Branch trace (see Branch Trace Format, see Branch Trace Configuration Format)
- Guile
GDB can be scripted using GNU Guile. See Guile. By default, GDB will be compiled if the Guile libraries are installed and are found by
configure
. You can use the--with-guile
option to request Guile, and pass either the Guile version number or the file name of the relevantpkg-config
program to choose a particular version of Guile.- iconv
GDB’s features related to character sets (see Character Sets) require a functioning
iconv
implementation. If you are on a GNU system, then this is provided by the GNU C Library. Some other systems also provide a workingiconv
.If GDB is using the
iconv
program which is installed in a non-standard place, you will need to tell GDB where to find it. This is done with--with-iconv-bin
which specifies the directory that contains theiconv
program. This program is run in order to make a list of the available character sets.On systems without
iconv
, you can install GNU Libiconv. If Libiconv is installed in a standard place, GDB will automatically use it if it is needed. If you have previously installed Libiconv in a non-standard place, you can use the--with-libiconv-prefix
option toconfigure
.GDB’s top-level
configure
andMakefile
will arrange to build Libiconv if a directory namedlibiconv
appears in the top-most source directory. If Libiconv is built this way, and if the operating system does not provide a suitableiconv
implementation, then the just-built library will automatically be used by GDB. One easy way to set this up is to download GNU Libiconv, unpack it inside the top-level directory of the GDB source tree, and then rename the directory holding the Libiconv source code to ‘libiconv
’.- lzma
GDB can support debugging sections that are compressed with the LZMA library. See MiniDebugInfo. If this library is not included with your operating system, you can find it in the xz package at http://tukaani.org/xz/. If the LZMA library is available in the usual place, then the
configure
script will use it automatically. If it is installed in an unusual path, you can use the--with-lzma-prefix
option to specify its location.- MPFR
GDB can use the GNU MPFR multiple-precision floating-point library. This library may be included with your operating system distribution; if it is not, you can get the latest version from http://www.mpfr.org. The
configure
script will search for this library in several standard locations; if it is installed in an unusual path, you can use the--with-libmpfr-prefix
option to specify its location.GNU MPFR is used to emulate target floating-point arithmetic during expression evaluation when the target uses different floating-point formats than the host. If GNU MPFR it is not available, GDB will fall back to using host floating-point arithmetic.
- Python
GDB can be scripted using Python language. See Python. By default, GDB will be compiled if the Python libraries are installed and are found by
configure
. You can use the--with-python
option to request Python, and pass either the file name of the relevantpython
executable, or the name of the directory in which Python is installed, to choose a particular installation of Python.- zlib
GDB will use the ‘
zlib
’ library, if available, to read compressed debug sections. Some linkers, such as GNU gold, are capable of producing binaries with compressed debug sections. If GDB is compiled with ‘zlib
’, it will be able to read the debug information in such binaries.The ‘
zlib
’ library is likely included with your operating system distribution; if it is not, you can get the latest version from http://zlib.net.
Next: Running Configure, Up: Installing GDB [Contents][Index]