source: general/prog/valgrind.xml@ d6c6562

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 8.1 8.2 8.3 8.4 9.0 9.1 basic bdubbs/svn elogind kea ken/TL2024 ken/inkscape-core-mods ken/tuningfonts lazarus lxqt perl-modules plabs/newcss plabs/python-mods python3.11 qt5new rahul/power-profiles-daemon renodr/vulkan-addition trunk upgradedb xry111/intltool xry111/llvm18 xry111/soup3 xry111/test-20220226 xry111/xf86-video-removal
Last change on this file since d6c6562 was d6c6562, checked in by Bruce Dubbs <bdubbs@…>, 7 years ago

Remove gcc7 entity

git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@19032 af4574ff-66df-0310-9fd7-8a98e5e911e0

  • Property mode set to 100644
File size: 11.8 KB
Line 
1<?xml version="1.0" encoding="ISO-8859-1"?>
2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
3 "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
4 <!ENTITY % general-entities SYSTEM "../../general.ent">
5 %general-entities;
6
7 <!ENTITY valgrind-download-http "https://sourceware.org/ftp/valgrind/valgrind-&valgrind-version;.tar.bz2">
8 <!ENTITY valgrind-download-ftp "ftp://sourceware.org/pub/valgrind/valgrind-&valgrind-version;.tar.bz2">
9 <!ENTITY valgrind-md5sum "817dd08f1e8a66336b9ff206400a5369">
10 <!ENTITY valgrind-size "14 MB">
11 <!ENTITY valgrind-buildsize "347 MB (additional 228 MB for tests)">
12 <!ENTITY valgrind-time "1.1 SBU (additional 5.1 SBU for tests)">
13]>
14
15<sect1 id="valgrind" xreflabel="Valgrind-&valgrind-version;">
16 <?dbhtml filename="valgrind.html"?>
17
18 <sect1info>
19 <othername>$LastChangedBy$</othername>
20 <date>$Date$</date>
21 </sect1info>
22
23 <title>Valgrind-&valgrind-version;</title>
24
25 <indexterm zone="valgrind">
26 <primary sortas="a-Valgrind">Valgrind</primary>
27 </indexterm>
28
29 <sect2 role="package">
30 <title>Introduction to Valgrind</title>
31
32 <para>
33 <application>Valgrind</application> is an instrumentation framework for
34 building dynamic analysis tools. There are Valgrind tools that can
35 automatically detect many memory management and threading bugs, and
36 profile programs in detail. Valgrind can also be used to build new
37 tools.
38 </para>
39
40 &lfs80_checked;
41
42 <bridgehead renderas="sect3">Package Information</bridgehead>
43 <itemizedlist spacing="compact">
44 <listitem>
45 <para>
46 Download (HTTP): <ulink url="&valgrind-download-http;"/>
47 </para>
48 </listitem>
49 <listitem>
50 <para>
51 Download (FTP): <ulink url="&valgrind-download-ftp;"/>
52 </para>
53 </listitem>
54 <listitem>
55 <para>
56 Download MD5 sum: &valgrind-md5sum;
57 </para>
58 </listitem>
59 <listitem>
60 <para>
61 Download size: &valgrind-size;
62 </para>
63 </listitem>
64 <listitem>
65 <para>
66 Estimated disk space required: &valgrind-buildsize;
67 </para>
68 </listitem>
69 <listitem>
70 <para>
71 Estimated build time: &valgrind-time;
72 </para>
73 </listitem>
74 </itemizedlist>
75
76 <bridgehead renderas="sect3">Valgrind Dependencies</bridgehead>
77
78 <bridgehead renderas="sect4">Optional</bridgehead>
79 <para role="optional">
80 <xref linkend="bind"/> or <xref linkend="bind-utils"/> (for tests),
81 <xref linkend="boost"/>,
82 <xref linkend="gdb"/> (for tests),
83 <xref linkend="llvm"/> (with Clang), and
84 <xref linkend="which"/> (for tests)
85 </para>
86
87<!-- See "maintainer note", below
88 <bridgehead renderas="sect4">Optional for regenerating the documentation</bridgehead>
89 <para role="optional">
90 <xref linkend="libxslt"/> and
91 <xref linkend="texlive"/> (or <xref linkend="tl-installer"/>)
92 </para>
93-->
94 <para condition="html" role="usernotes">User Notes:
95 <ulink url="&blfs-wiki;/valgrind"/>
96 </para>
97 </sect2>
98
99 <sect2 role="installation">
100 <title>Installation of Valgrind</title>
101
102 <para>
103 Install <application>Valgrind</application> by running the following
104 commands:
105 </para>
106
107<screen><userinput>sed -i 's|/doc/valgrind||' docs/Makefile.in &amp;&amp;
108
109./configure --prefix=/usr \
110 --datadir=/usr/share/doc/valgrind-&valgrind-version; &amp;&amp;
111make</userinput></screen>
112
113 <note>
114 <para>
115 To run the tests for this package, valgrind requires a version of the
116 /lib/ld-2.24.so (or later) library with debugging symbols present.
117 Normally in LFS these debugging symbols are stripped at the end of
118 Chapter 6. To get this library, glibc must be rebuilt with the current
119 glibc version using the same compiler that was used to build LFS. The
120 ld.so can then be renamed to ld-2.24.so.dbg and copied to /lib.
121 Then a symlink needs to be changed:</para>
122
123<screen role="nodump"><userinput>ln -sfv ld-2.24.so.dbg /lib/ld-linux-x86-64.so.2</userinput></screen>
124
125 <para>
126 Adjust the above instruction as needed for a 32-bit system or for a
127 different version of glibc.
128 </para>
129
130 <para>
131 In addition, other glibc libraries with debugging symbols present
132 may be needed for some tests.
133 </para>
134 </note>
135
136 <para>
137 To test the results, issue: <command>make regtest</command>. The tests
138 may hang forever if <xref linkend="gdb"/> is not installed. Some tests
139 are known to hang also, depending on the version of glibc. Problematic
140 tests can be disabled by changing the <userinput>prereq:</userinput> line
141 in the corresponding <filename>.vgtest</filename> file to
142 <userinput>prereq: false</userinput>. For example:
143 </para>
144
145<!-- For valgrind-3.12.0, the pth_cond_destroy_busy test hangs forever because
146 of some change in glibc-2.25. Should be fixed in next versions of
147 valgrind.-->
148<screen><userinput>sed -e 's@prereq:.*@prereq: false@' \
149 -i {helgrind,drd}/tests/pth_cond_destroy_busy.vgtest</userinput></screen>
150
151 <note>
152 <para>
153 The <application>OpenMP</application> tests are skipped if libgomp
154 has been compiled with <option>--enable-linux-futex</option> (the
155 default). If needed, just recompile the libgomp library from
156 the gcc build tree, passing <option>--disable-linux-futex</option>
157 to configure, storing the library to some place and changing the link
158 from <filename>/usr/lib/libgomp.so.1</filename> to point to the new
159 library.
160 </para>
161 </note>
162
163<!-- Note to maintainer: there is a long thread in ticket #5882 explaining
164 why we do not provide instructions to rebuild the documentation.
165 (still broken with TeXLive 2016) -->
166
167 <para>
168 Now, as the <systemitem class="username">root</systemitem> user:
169 </para>
170
171<screen role="root"><userinput>make install</userinput></screen>
172
173 </sect2>
174
175 <sect2 role="commands">
176 <title>Command Explanations</title>
177
178 <para>
179 <command>sed -i ... docs/Makefile.in </command>: This sed provides for
180 installing the documentation in a versioned directory.
181 </para>
182
183 </sect2>
184
185 <sect2 role="content">
186 <title>Contents</title>
187
188 <segmentedlist>
189 <segtitle>Installed Programs</segtitle>
190 <segtitle>Installed Library</segtitle>
191 <segtitle>Installed Directories</segtitle>
192
193 <seglistitem>
194 <seg>
195 callgrind_annotate,
196 callgrind_control,
197 cg_annotate,
198 cg_diff,
199 cg_merge,
200 ms_print,
201 valgrind,
202 valgrind-di-server,
203 valgrind-listener, and
204 vgdb
205 </seg>
206 <seg>
207 libcoregrind-&lt;Arch&gt;-linux.a,
208 libreplacemalloc_toolpreload-&lt;Arch&gt;-linux.a,
209 libvex-&lt;Arch&gt;-linux.a,
210 libvexmultiarch-amd64-linux.a,
211 vgpreload_core-&lt;Arch&gt;-linux.so,
212 vgpreload_drd-&lt;Arch&gt;-linux.so,
213 vgpreload_exp-dhat-&lt;Arch&gt;-linux.so,
214 vgpreload_exp-sgcheck-&lt;Arch&gt;-linux.so,
215 vgpreload_helgrind-&lt;Arch&gt;-linux.so,
216 vgpreload_massif-&lt;Arch&gt;-linux.so, and
217 vgpreload_memcheck-&lt;Arch&gt;-linux.so, where
218 &lt;Arch&gt; is x86 or amd64
219 </seg>
220 <seg>
221 /usr/lib/valgrind,
222 /usr/include/valgrind, and
223 /usr/share/doc/valgrind-&valgrind-version;
224 </seg>
225 </seglistitem>
226 </segmentedlist>
227
228 <variablelist>
229 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
230 <?dbfo list-presentation="list"?>
231 <?dbhtml list-presentation="table"?>
232
233 <varlistentry id="valgrind-prog">
234 <term><command>valgrind</command></term>
235 <listitem>
236 <para>
237 is a program for debugging and profiling Linux executables.
238 </para>
239 <indexterm zone="valgrind valgrind-prog">
240 <primary sortas="b-valgrind">valgrind</primary>
241 </indexterm>
242 </listitem>
243 </varlistentry>
244
245 <varlistentry id="callgrind_annotate">
246 <term><command>callgrind_annotate</command></term>
247 <listitem>
248 <para>
249 takes an output file produced by the
250 <application>Valgrind</application> tool Callgrind and prints the
251 information in an easy-to-read form.
252 </para>
253 <indexterm zone="callgrind_annotate">
254 <primary sortas="b-callgrind_annotate">callgrind_annotate</primary>
255 </indexterm>
256 </listitem>
257 </varlistentry>
258
259 <varlistentry id="callgrind_control">
260 <term><command>callgrind_control</command></term>
261 <listitem>
262 <para>
263 controls programs being run by the <application>Valgrind</application>
264 tool Callgrind.
265 </para>
266 <indexterm zone="valgrind callgrind_control">
267 <primary sortas="b-callgrind_control">callgrind_control</primary>
268 </indexterm>
269 </listitem>
270 </varlistentry>
271
272 <varlistentry id="cg_annotate">
273 <term><command>cg_annotate</command></term>
274 <listitem>
275 <para>
276 is a post-processing tool for the <application>Valgrind</application>
277 tool Cachegrind.
278 </para>
279 <indexterm zone="valgrind cg_annotate">
280 <primary sortas="b-cg_annotate">cg_annotate</primary>
281 </indexterm>
282 </listitem>
283 </varlistentry>
284
285 <varlistentry id="cg_diff">
286 <term><command>cg_diff</command></term>
287 <listitem>
288 <para>
289 compares two Cachegrind output files.
290 </para>
291 <indexterm zone="valgrind cg_diff">
292 <primary sortas="b-cg_diff">cg_diff</primary>
293 </indexterm>
294 </listitem>
295 </varlistentry>
296
297 <varlistentry id="cg_merge">
298 <term><command>cg_merge</command></term>
299 <listitem>
300 <para>
301 merges multiple Cachegrind output files into one.
302 </para>
303 <indexterm zone="valgrind cg_merge">
304 <primary sortas="b-cg_merge">cg_merge</primary>
305 </indexterm>
306 </listitem>
307 </varlistentry>
308
309 <varlistentry id="ms_print">
310 <term><command>ms_print</command></term>
311 <listitem>
312 <para>
313 takes an output file produced by the <application>Valgrind</application>
314 tool Massif and prints the information in an easy-to-read form.
315 </para>
316 <indexterm zone="valgrind ms_print">
317 <primary sortas="b-ms_print">ms_print</primary>
318 </indexterm>
319 </listitem>
320 </varlistentry>
321
322 <varlistentry id="valgrind-di-server">
323 <term><command>valgrind-di-server</command></term>
324 <listitem>
325 <para>
326 is a server that reads debuginfo from objects stored on a
327 different machine.
328 </para>
329 <indexterm zone="valgrind valgrind-di-server">
330 <primary sortas="b-valgrind-di-server">valgrind-di-server</primary>
331 </indexterm>
332 </listitem>
333 </varlistentry>
334
335 <varlistentry id="valgrind-listener">
336 <term><command>valgrind-listener</command></term>
337 <listitem>
338 <para>
339 listens on a socket for Valgrind commentary.
340 </para>
341 <indexterm zone="valgrind valgrind-listener">
342 <primary sortas="b-valgrind-listener">valgrind-listener</primary>
343 </indexterm>
344 </listitem>
345 </varlistentry>
346
347 <varlistentry id="vgdb">
348 <term><command>vgdb</command></term>
349 <listitem>
350 <para>
351 is an intermediary between Valgrind and GDB or a shell.
352 </para>
353 <indexterm zone="valgrind vgdb">
354 <primary sortas="b-vgdb">vgdb</primary>
355 </indexterm>
356 </listitem>
357 </varlistentry>
358
359 </variablelist>
360
361 </sect2>
362
363</sect1>
Note: See TracBrowser for help on using the repository browser.