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