source: general/prog/valgrind.xml@ ec67287

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 ec67287 was ec67287, checked in by Bruce Dubbs <bdubbs@…>, 7 years ago

Update to libgweather-3.24.1.
Update to GeoClue-2.4.7.
Update to valgrind-3.13.0.
Update to gjs-1.48.4.
Update to bind9-9.11.1-P1.
Update to postfix-3.2.1.

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