1<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> 2<html> 3<!-- Copyright (C) 1988-2021 Free Software Foundation, Inc. 4 5Permission is granted to copy, distribute and/or modify this document 6under the terms of the GNU Free Documentation License, Version 1.3 or 7any later version published by the Free Software Foundation; with the 8Invariant Sections being "Free Software" and "Free Software Needs 9Free Documentation", with the Front-Cover Texts being "A GNU Manual," 10and with the Back-Cover Texts as in (a) below. 11 12(a) The FSF's Back-Cover Text is: "You are free to copy and modify 13this GNU Manual. Buying copies from GNU Press supports the FSF in 14developing GNU and promoting software freedom." --> 15<!-- Created by GNU Texinfo 5.1, http://www.gnu.org/software/texinfo/ --> 16<head> 17<title>Debugging with GDB: Requirements</title> 18 19<meta name="description" content="Debugging with GDB: Requirements"> 20<meta name="keywords" content="Debugging with GDB: Requirements"> 21<meta name="resource-type" content="document"> 22<meta name="distribution" content="global"> 23<meta name="Generator" content="makeinfo"> 24<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> 25<link href="index.html#Top" rel="start" title="Top"> 26<link href="Concept-Index.html#Concept-Index" rel="index" title="Concept Index"> 27<link href="index.html#SEC_Contents" rel="contents" title="Table of Contents"> 28<link href="Installing-GDB.html#Installing-GDB" rel="up" title="Installing GDB"> 29<link href="Running-Configure.html#Running-Configure" rel="next" title="Running Configure"> 30<link href="Installing-GDB.html#Installing-GDB" rel="previous" title="Installing GDB"> 31<style type="text/css"> 32<!-- 33a.summary-letter {text-decoration: none} 34blockquote.smallquotation {font-size: smaller} 35div.display {margin-left: 3.2em} 36div.example {margin-left: 3.2em} 37div.indentedblock {margin-left: 3.2em} 38div.lisp {margin-left: 3.2em} 39div.smalldisplay {margin-left: 3.2em} 40div.smallexample {margin-left: 3.2em} 41div.smallindentedblock {margin-left: 3.2em; font-size: smaller} 42div.smalllisp {margin-left: 3.2em} 43kbd {font-style:oblique} 44pre.display {font-family: inherit} 45pre.format {font-family: inherit} 46pre.menu-comment {font-family: serif} 47pre.menu-preformatted {font-family: serif} 48pre.smalldisplay {font-family: inherit; font-size: smaller} 49pre.smallexample {font-size: smaller} 50pre.smallformat {font-family: inherit; font-size: smaller} 51pre.smalllisp {font-size: smaller} 52span.nocodebreak {white-space:nowrap} 53span.nolinebreak {white-space:nowrap} 54span.roman {font-family:serif; font-weight:normal} 55span.sansserif {font-family:sans-serif; font-weight:normal} 56ul.no-bullet {list-style: none} 57--> 58</style> 59 60 61</head> 62 63<body lang="en" bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000"> 64<a name="Requirements"></a> 65<div class="header"> 66<p> 67Next: <a href="Running-Configure.html#Running-Configure" accesskey="n" rel="next">Running Configure</a>, Up: <a href="Installing-GDB.html#Installing-GDB" accesskey="u" rel="up">Installing GDB</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Concept-Index.html#Concept-Index" title="Index" rel="index">Index</a>]</p> 68</div> 69<hr> 70<a name="Requirements-for-Building-GDB"></a> 71<h3 class="section">C.1 Requirements for Building <small>GDB</small></h3> 72<a name="index-building-GDB_002c-requirements-for"></a> 73 74<p>Building <small>GDB</small> requires various tools and packages to be available. 75Other packages will be used only if they are found. 76</p> 77<a name="Tools_002fPackages-Necessary-for-Building-GDB"></a> 78<h3 class="heading">Tools/Packages Necessary for Building <small>GDB</small></h3> 79<dl compact="compact"> 80<dt>C<tt>++</tt>11 compiler</dt> 81<dd><p><small>GDB</small> is written in C<tt>++</tt>11. It should be buildable with any 82recent C<tt>++</tt>11 compiler, e.g. GCC. 83</p> 84</dd> 85<dt>GNU make</dt> 86<dd><p><small>GDB</small>’s build system relies on features only found in the GNU 87make program. Other variants of <code>make</code> will not work. 88</p></dd> 89</dl> 90 91<a name="Tools_002fPackages-Optional-for-Building-GDB"></a> 92<h3 class="heading">Tools/Packages Optional for Building <small>GDB</small></h3> 93<dl compact="compact"> 94<dt>Expat</dt> 95<dd><a name="Expat"></a><p><small>GDB</small> can use the Expat XML parsing library. This library may be 96included with your operating system distribution; if it is not, you 97can get the latest version from <a href="http://expat.sourceforge.net">http://expat.sourceforge.net</a>. 98The <samp>configure</samp> script will search for this library in several 99standard locations; if it is installed in an unusual path, you can 100use the <samp>--with-libexpat-prefix</samp> option to specify its location. 101</p> 102<p>Expat is used for: 103</p> 104<ul> 105<li> Remote protocol memory maps (see <a href="Memory-Map-Format.html#Memory-Map-Format">Memory Map Format</a>) 106</li><li> Target descriptions (see <a href="Target-Descriptions.html#Target-Descriptions">Target Descriptions</a>) 107</li><li> Remote shared library lists (See <a href="Library-List-Format.html#Library-List-Format">Library List Format</a>, 108or alternatively see <a href="Library-List-Format-for-SVR4-Targets.html#Library-List-Format-for-SVR4-Targets">Library List Format for SVR4 Targets</a>) 109</li><li> MS-Windows shared libraries (see <a href="Files.html#Shared-Libraries">Shared Libraries</a>) 110</li><li> Traceframe info (see <a href="Traceframe-Info-Format.html#Traceframe-Info-Format">Traceframe Info Format</a>) 111</li><li> Branch trace (see <a href="Branch-Trace-Format.html#Branch-Trace-Format">Branch Trace Format</a>, 112see <a href="Branch-Trace-Configuration-Format.html#Branch-Trace-Configuration-Format">Branch Trace Configuration Format</a>) 113</li></ul> 114 115</dd> 116<dt>Guile</dt> 117<dd><p><small>GDB</small> can be scripted using GNU Guile. See <a href="Guile.html#Guile">Guile</a>. By 118default, <small>GDB</small> will be compiled if the Guile libraries are 119installed and are found by <samp>configure</samp>. You can use the 120<code>--with-guile</code> option to request Guile, and pass either the Guile 121version number or the file name of the relevant <code>pkg-config</code> 122program to choose a particular version of Guile. 123</p> 124</dd> 125<dt>iconv</dt> 126<dd><p><small>GDB</small>’s features related to character sets (see <a href="Character-Sets.html#Character-Sets">Character Sets</a>) require a functioning <code>iconv</code> implementation. If you are 127on a GNU system, then this is provided by the GNU C Library. Some 128other systems also provide a working <code>iconv</code>. 129</p> 130<p>If <small>GDB</small> is using the <code>iconv</code> program which is installed 131in a non-standard place, you will need to tell <small>GDB</small> where to 132find it. This is done with <samp>--with-iconv-bin</samp> which specifies 133the directory that contains the <code>iconv</code> program. This program is 134run in order to make a list of the available character sets. 135</p> 136<p>On systems without <code>iconv</code>, you can install GNU Libiconv. If 137Libiconv is installed in a standard place, <small>GDB</small> will 138automatically use it if it is needed. If you have previously 139installed Libiconv in a non-standard place, you can use the 140<samp>--with-libiconv-prefix</samp> option to <samp>configure</samp>. 141</p> 142<p><small>GDB</small>’s top-level <samp>configure</samp> and <samp>Makefile</samp> will 143arrange to build Libiconv if a directory named <samp>libiconv</samp> appears 144in the top-most source directory. If Libiconv is built this way, and 145if the operating system does not provide a suitable <code>iconv</code> 146implementation, then the just-built library will automatically be used 147by <small>GDB</small>. One easy way to set this up is to download GNU 148Libiconv, unpack it inside the top-level directory of the <small>GDB</small> 149source tree, and then rename the directory holding the Libiconv source 150code to ‘<samp>libiconv</samp>’. 151</p> 152</dd> 153<dt>lzma</dt> 154<dd><p><small>GDB</small> can support debugging sections that are compressed with 155the LZMA library. See <a href="MiniDebugInfo.html#MiniDebugInfo">MiniDebugInfo</a>. If this library is not 156included with your operating system, you can find it in the xz package 157at <a href="http://tukaani.org/xz/">http://tukaani.org/xz/</a>. If the LZMA library is available in 158the usual place, then the <samp>configure</samp> script will use it 159automatically. If it is installed in an unusual path, you can use the 160<samp>--with-lzma-prefix</samp> option to specify its location. 161</p> 162</dd> 163<dt>MPFR</dt> 164<dd><a name="MPFR"></a><p><small>GDB</small> can use the GNU MPFR multiple-precision floating-point 165library. This library may be included with your operating system 166distribution; if it is not, you can get the latest version from 167<a href="http://www.mpfr.org">http://www.mpfr.org</a>. The <samp>configure</samp> script will search 168for this library in several standard locations; if it is installed 169in an unusual path, you can use the <samp>--with-libmpfr-prefix</samp> 170option to specify its location. 171</p> 172<p>GNU MPFR is used to emulate target floating-point arithmetic during 173expression evaluation when the target uses different floating-point 174formats than the host. If GNU MPFR it is not available, <small>GDB</small> 175will fall back to using host floating-point arithmetic. 176</p> 177</dd> 178<dt>Python</dt> 179<dd><p><small>GDB</small> can be scripted using Python language. See <a href="Python.html#Python">Python</a>. 180By default, <small>GDB</small> will be compiled if the Python libraries are 181installed and are found by <samp>configure</samp>. You can use the 182<code>--with-python</code> option to request Python, and pass either the 183file name of the relevant <code>python</code> executable, or the name of the 184directory in which Python is installed, to choose a particular 185installation of Python. 186</p> 187</dd> 188<dt>zlib</dt> 189<dd><a name="index-compressed-debug-sections"></a> 190<p><small>GDB</small> will use the ‘<samp>zlib</samp>’ library, if available, to read 191compressed debug sections. Some linkers, such as GNU gold, are capable 192of producing binaries with compressed debug sections. If <small>GDB</small> 193is compiled with ‘<samp>zlib</samp>’, it will be able to read the debug 194information in such binaries. 195</p> 196<p>The ‘<samp>zlib</samp>’ library is likely included with your operating system 197distribution; if it is not, you can get the latest version from 198<a href="http://zlib.net">http://zlib.net</a>. 199</p></dd> 200</dl> 201 202<hr> 203<div class="header"> 204<p> 205Next: <a href="Running-Configure.html#Running-Configure" accesskey="n" rel="next">Running Configure</a>, Up: <a href="Installing-GDB.html#Installing-GDB" accesskey="u" rel="up">Installing GDB</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Concept-Index.html#Concept-Index" title="Index" rel="index">Index</a>]</p> 206</div> 207 208 209 210</body> 211</html> 212