1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135
|
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>7.README_PACKAGERS</title>
<link rel="stylesheet" type="text/css" href="vg_basic.css">
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="index.html" title="Valgrind Documentation">
<link rel="up" href="dist.html" title="Valgrind Distribution Documents">
<link rel="prev" href="dist.readme-developers.html" title="6.README_DEVELOPERS">
<link rel="next" href="dist.readme-s390.html" title="8.README.S390">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<div><table class="nav" width="100%" cellspacing="3" cellpadding="3" border="0" summary="Navigation header"><tr>
<td width="22px" align="center" valign="middle"><a accesskey="p" href="dist.readme-developers.html"><img src="images/prev.png" width="18" height="21" border="0" alt="Prev"></a></td>
<td width="25px" align="center" valign="middle"><a accesskey="u" href="dist.html"><img src="images/up.png" width="21" height="18" border="0" alt="Up"></a></td>
<td width="31px" align="center" valign="middle"><a accesskey="h" href="index.html"><img src="images/home.png" width="27" height="20" border="0" alt="Up"></a></td>
<th align="center" valign="middle">Valgrind Distribution Documents</th>
<td width="22px" align="center" valign="middle"><a accesskey="n" href="dist.readme-s390.html"><img src="images/next.png" width="18" height="21" border="0" alt="Next"></a></td>
</tr></table></div>
<div class="chapter">
<div class="titlepage"><div><div><h1 class="title">
<a name="dist.readme-packagers"></a>7.README_PACKAGERS</h1></div></div></div>
<div class="literallayout"><p><br>
<br>
Greetings,packagingperson!Thisinformationisaimedatpeople<br>
buildingbinarydistributionsofValgrind.<br>
<br>
Thanksfortakingthetimeandefforttomakeabinarydistributionof<br>
Valgrind.Thefollowingnotesmaysaveyousometrouble.<br>
<br>
<br>
--DonotshipyourLinuxdistrowithacompletelystripped<br>
/lib/ld.so.Atleastleavethedebuggingsymbolnameson--line<br>
numberinfoisn'tnecessary.Ifyoudon'twanttoleavesymbolson<br>
ld.so,alternativelyyoucanhaveyourdistroinstallld.so's<br>
debuginfopackagebydefault,ormakeld.so.debuginfobea<br>
requirementofyourValgrindRPM/DEB/whatever.<br>
<br>
ReasonforthisisthatValgrind'sMemchecktoolneedstointercept<br>
callsto,andprovidereplacementsfor,somesymbolsinld.soat<br>
startup(mostimportantlystrlen).Ifitcannotdothat,Memcheck<br>
showsalargenumberoffalsepositivesduetothehighlyoptimised<br>
strlen(etc)routinesinld.so.Thishascausedsometroublein<br>
thepast.Asofversion3.3.0,onsometargets(ppc32-linux,<br>
ppc64-linux),Memcheckwillsimplystopatstartup(andprintan<br>
errormessage)ifsuchsymbolsarenotpresent,becauseitis<br>
infeasibletocontinue.<br>
<br>
It'snotlikethisisgoingtocostyoumuchspace.Weonlyneed<br>
thesymbolsforld.so(afewKatmost).Notthedebuginfoand<br>
notanydebuginfoorextrasymbolsforanyotherlibraries.<br>
<br>
<br>
--(Unfortunatebuttrue)Whenyouconfiguretobuildwiththe<br>
--prefix=/foo/bar/xyzzyoption,theprefix/foo/bar/xyzzygets<br>
bakedintovalgrind.Theconsequenceisthatyou_must_install<br>
valgrindatthelocationspecifiedintheprefix.Ifyoudon't,<br>
itmayappeartowork,butwillbreakdoingsomeobscurethings,<br>
particularlydoingfork()andexec().<br>
<br>
Soyoucan'tbuildarelocatableRPM/whateverfromValgrind.<br>
<br>
<br>
--Don'tstripthedebuginfoofflib/valgrind/$platform/vgpreload*.so<br>
intheinstallationtree.EitherValgrindwon'tworkatall,orit<br>
willstillworkifyoudo,butwillgeneratelesshelpfulerror<br>
messages.Here'sanexample:<br>
<br>
Mismatchedfree()/delete/delete[]<br>
at0x40043249:free(vg_clientfuncs.c:171)<br>
by0x4102BB4E:QGArray::~QGArray(void)(tools/qgarray.cpp:149)<br>
by0x4C261C41:PptDoc::~PptDoc(void)(include/qmemarray.h:60)<br>
by0x4C261F0E:PptXml::~PptXml(void)(pptxml.cc:44)<br>
Address0x4BB292A8is0bytesinsideablockofsize64alloc'd<br>
at0x4004318C:__builtin_vec_new(vg_clientfuncs.c:152)<br>
by0x4C21BC15:KLaola::readSBStream(int)const(klaola.cc:314)<br>
by0x4C21C155:KLaola::stream(KLaola::OLENodeconst*)(klaola.cc:416)<br>
by0x4C21788F:OLEFilter::convert(QCStringconst&)(olefilter.cc:272)<br>
<br>
Thistellsyouthatsomememoryallocatedwithnew[]wasfreedwith<br>
free().<br>
<br>
Mismatchedfree()/delete/delete[]<br>
at0x40043249:(insidevgpreload_memcheck.so)<br>
by0x4102BB4E:QGArray::~QGArray(void)(tools/qgarray.cpp:149)<br>
by0x4C261C41:PptDoc::~PptDoc(void)(include/qmemarray.h:60)<br>
by0x4C261F0E:PptXml::~PptXml(void)(pptxml.cc:44)<br>
Address0x4BB292A8is0bytesinsideablockofsize64alloc'd<br>
at0x4004318C:(insidevgpreload_memcheck.so)<br>
by0x4C21BC15:KLaola::readSBStream(int)const(klaola.cc:314)<br>
by0x4C21C155:KLaola::stream(KLaola::OLENodeconst*)(klaola.cc:416)<br>
by0x4C21788F:OLEFilter::convert(QCStringconst&)(olefilter.cc:272)<br>
<br>
Thisisn'tsohelpful.Althoughyoucantellthereisamismatch,<br>
thenamesoftheallocatinganddeallocatingfunctionsarenolonger<br>
visible.Thesamekindofthingoccursinvariousothermessages<br>
fromvalgrind.<br>
<br>
<br>
--Don'tstripsymbolsfromlib/valgrind/*intheinstallationtree.<br>
Doingsowilllikelycauseproblems.Removingthelinenumberinfois<br>
probablyOK(atleastforsomeofthefilesinthatdirectory),although<br>
thathasnotbeentestedbytheValgrinddevelopers.<br>
<br>
<br>
--Pleasetestthefinalinstallationworksbyrunningitonsomething<br>
huge.Isuggestcheckingthatitcanstartandexitsuccessfully<br>
bothFirefoxandOpenOffice.org.Iusetheseastestprograms,andI<br>
knowtheyfairlythoroughlyexerciseValgrind.Thecommandlinestouse<br>
are:<br>
<br>
valgrind-v--trace-children=yesfirefox<br>
<br>
valgrind-v--trace-children=yessoffice<br>
<br>
<br>
Ifyoufindanymorehints/tipsforpackaging,pleasereport<br>
itasabugreport.Seehttp://www.valgrind.orgfordetails.<br>
<br>
</p></div>
</div>
<div>
<br><table class="nav" width="100%" cellspacing="3" cellpadding="2" border="0" summary="Navigation footer">
<tr>
<td rowspan="2" width="40%" align="left">
<a accesskey="p" href="dist.readme-developers.html"><<6.README_DEVELOPERS</a></td>
<td width="20%" align="center"><a accesskey="u" href="dist.html">Up</a></td>
<td rowspan="2" width="40%" align="right"><a accesskey="n" href="dist.readme-s390.html">8.README.S390>></a>
</td>
</tr>
<tr><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td></tr>
</table>
</div>
</body>
</html>
|