Verifying output of experimental PM

Ken Moffat zarniwhoop at ntlworld.com
Wed Sep 5 18:55:04 PDT 2007


On Wed, Sep 05, 2007 at 02:19:48AM -0700, Walter Barnes wrote:
> From: Walter Barnes <walter_barnes05 at yahoo.com>
> 
> >My question is, how can I verify the output of my PM?
> >
> >I've created binutils in $LFS/tools using my PM then tar'ed it and cleaned tools before building binutils by
> >hand using the instructions in the book. I've tried a somewhat ham-fisted (and possibly niave) comparison
> >by simply checking md5 sums. None of the binaries matched.
> 
[...]
> After fixing up the build script for the package and fixing the PM's environment I rebuilt the package and this time the only differences were due to the different build directories. In particular, there was no difference in the output of configure. However, the md5 sums still do not match.
> 
 Much as I'm reluctant to assist people using package managers
(because I think PMs are more trouble than they are worth)...

 Almost everything in a normal LFS build includes debugging
information - this can include all manner of weird and variable
information (try copying an unstripped program to new_name, then
run strip --only-keep-debug new_name ; strings new_name | less
to see examples).  You seem to be running the tests before
"stripping" or "stripping again", so -

 To answer the "can it build itself" question, I used to use "farce"
http://www.linuxfromscratch.org/~ken/farce-002.tar.bz2 (I no longer
recommend it, there are now several extra "this *sometimes* differs"
files for which I don't have a plausible explanation, but I don't
think any of them are from binutils - consult my postings to lfs-dev
on 6.3-rc for details).  It might help you in identifying what sort
of differences you are seeing (so, for example, strip out all debug
information, and ignore timestamps in gzipped files).  Remember that
md5sum only tells you if two files have the same md5 (and can
therefore be assumed to match - useful for downloads of tarballs, but
not especially helpful when files do indeed differ).

 If there really are differences, you can variously use cmp, diff,
ar, or objdump to try to work out what is different.  You may also find
farce's regexps (convert known variable formats, mostly or all for
date/time/kernel_version, into tokens) helpful.  Some of these
shouldn't apply to you (you have the same host kernel for both
builds), but anything hard-coding the date and time it was compiled
(e.g. in manual pages) will be relevant.  Don't forget to work on
*copies* of the files when you manipulate them to see if they are
identical-enough.

ĸen
-- 
das eine Mal als Tragödie, das andere Mal als Farce



More information about the lfs-support mailing list