test failure, glibc make check (chroot pass)

Bob Morgan wb5aoh at wb5aoh.dyndns.org
Fri Feb 20 12:01:23 PST 2004


Ken Moffat writes:
 > On Wed, 18 Feb 2004, Bob Morgan wrote:
 > 
 > >
 > > I am getting repeated failures of the test phase of the glibc make.
 > > >>>>>>>Got one failure, as follows:
 > > -build/crypt:/sources/glibc-build/linuxthreads' \
 > > /sources/glibc-build/libio/
 > > cmp ../iconvdata/testdata/ISO-8859-1..UTF8 /sources/glibc-build/libio/tst-fopenloc.out \
 > >   > /sources/glibc-build/libio/tst-fopenloc.check
 > > /sources/glibc-build/malloc/mtrace /sources/glibc-build/libio/tst-fopenloc.mtrace >> /sources/glibc-build/libio/tst-fopenloc.check
 > > /bin/sh: line 1: /sources/glibc-build/malloc/mtrace: No such file or directory
 > 
 >  I had something very similar (not on i586) the other week.  From
 > memory, malloc/mtrace is a perl script.  It doesn't get created if
 > the configure script doesn't find a working perl (in my case, a typo in
 > the version numbers for the install at the end of chapter 5).  Check the
 > configure.log file (think that's the name) in the build directory using
 > `more', or using 'less' from outside chroot.
 > 
 > Ken
 > -- 

OK, after conversing on lfs-support with Ken Moffat, he said perl
might be missing etc, so I went looking.  Perl 5.6 is the version
on the native host system (hostname=gnome), and perl 5.8 is the version built
under lfs tools.  The new executable 5.8 does run, but apparently can't
find Config.pm in one of the directories it says it is looking in
(I can find it manually from inside or outside of chroot though).

from outside chroot, here are both:
gnome:/mnt/lfs # perl -v

This is perl, v5.6.0 built for i586-linux

gnome:/mnt/lfs # perl -V:xs_apiversion
xs_apiversion='5.005';
gnome:/mnt/lfs # perl -V:pm_apiversion
pm_apiversion='5.005';
gnome:/mnt/lfs # perl -V:apiversion
apiversion='UNKNOWN';

gnome:/mnt/lfs # tools/bin/perl -V:pm_apiversion
Can't locate Config.pm in @INC (@INC contains: /tools/lib/perl5/5.8.0/i586-linux /tools/lib/perl5/5.8.0 /tools/lib/perl5/site_perl/5.8.0/i586-linux /tools/lib/perl5/site_perl/5.8.0 /tools/lib/perl5/site_perl .).
BEGIN failed--compilation aborted.
gnome:/mnt/lfs # tools/bin/perl -v

This is perl, v5.8.0 built for i586-linux

Note above that when I execute the lfs copy of perl (5.8) from outside chroot,
it DOES run the executable, but running a command similar to that which
glibc configure is running to test perl for useability, perl can't find
the Config.pm file it needs to look up the symbols it is being queried for.
Now note I can find things manually:

gnome:/mnt/lfs # ll /tools/bin/perl
-rwxr-xr-x    1 root     root      1053848 Feb 17 01:22 /tools/bin/perl
gnome:/mnt/lfs # ll tools/lib/per15/5.8.0/Config.pm
-rw-r--r--    1 root     root       226117 Jan 25 21:33 tools/lib/per15/5.8.0/Config.pm
gnome:/mnt/lfs # grep -ie apiversion tools/lib/per15/5.8.0/Config.pm
pm_apiversion='5.005'
xs_apiversion='5.8.0'
=item C<pm_apiversion>
>From F<xs_apiversion.U>:
written for $pm_apiversion will still work for the current
back to pm_apiversion.  This is only useful if you have a perl
=item C<xs_apiversion>
>From F<xs_apiversion.U>:
directories across major versions back to xs_apiversion.
gnome:/mnt/lfs #

SO, I can manually find what the perl command cannot.  Again, this is
from outside the chroot jail.  This is sort of pointing out to me
that maybe perl 5.8 didn't get 100% built correctly, but I don't know
what is missing.  And I haven't the slightest idea where @INC lives in
perl, unless it is hardcoded in the executable or a library.  Also
I wonder if perl somehow has an environment different from the shell
that is launching it?
Let's repeat some of this from inside chroot:

root:/sources/glibc-build# ls -l /tools/bin/perl
-rwxr-xr-x    1 root     root      1053848 Feb 17 01:22 /tools/bin/perl
root:/sources/glibc-build# perl -v

This is perl, v5.8.0 built for i586-linux

root:/sources/glibc-build# perl -V:xs_apiversion
Can't locate Config.pm in @INC (@INC contains: /tools/lib/perl5/5.8.0/i586-linux /tools/lib/perl5/5.8.0 /tools/lib/perl5/site_perl/5.8.0/i586-linux /tools/lib/perl5/site_perl/5.8.0 /tools/lib/perl5/site_perl .).
BEGIN failed--compilation aborted.
root:/sources/glibc-build# ls -l /tools/lib/per15/5.8.0/Config.pm
-rw-r--r--    1 root     root       226117 Jan 25 21:33 /tools/lib/per15/5.8.0/Config.pm
root:/sources/glibc-build# grep -ie apiversion /tools/lib/per15/5.8.0/Config.pm
pm_apiversion='5.005'
xs_apiversion='5.8.0'
=item C<pm_apiversion>
>From F<xs_apiversion.U>:
written for $pm_apiversion will still work for the current
back to pm_apiversion.  This is only useful if you have a perl
=item C<xs_apiversion>
>From F<xs_apiversion.U>:
directories across major versions back to xs_apiversion.

AND SO it behaves about the same from inside chroot.
(and of course, I can't see the old host version from inside the jail)

Now, when I get to the make check step in glibc near the beginning of
the chroot build (Ch 6), and pick through the glibc configure script and the
config.log, which are a little above my head anyhow, it eventually
ends up saying perl=no, and like Ken said, the missing glibc test script
mtrace doesn't get built.  Excerpts with the word perl from config.log:

configure:4109: checking for perl
configure:4127: found /usr/bin/perl
configure:4140: result: /usr/bin/perl
ac_cv_path_PERL=/usr/bin/perl
PERL='no'

note the symlink to the real thing here:

lrwxrwxrwx    1 root     root           15 Feb 17 01:47 /usr/bin/perl -> /tools/bin/perl
root:/sources/glibc-build# ls -l /tools/bin/perl
-rwxr-xr-x    1 root     root      1053848 Feb 17 01:22 /tools/bin/perl
root:/sources/glibc-build#


What's next, drop back to the latter stages of the tools build, and
try to rebuild perl, and if so, how to proceed?  Just re-run it and
pay closer attention to typing, or does something have to be completely
wiped to rebuild if not just rebuild over the problem, or what?
Assuming I followed directions OK the first time, what would I do
differently? (no guarantee here that I did that.  Between ch5 and ch6, I
got GPM working and started pasting commands, but during the tools build I
was rekeying stuff in).

As an aside, this looks like something that might make a good sanity
check of the perl tools build, since it is simple to set up, and does
test the ability of perl to find its own config file as well as just
to run the executable:   perl -V:xs_apiversion
Also, I noted that the configure script in glibc actually said
just apiversion, without the xs_ or pm_ prefixes, and don't know
how that is supposed to play out either, again those scripts are
a little over my head for now. Here that is:

if test "$PERL" != no &&
   (eval `$PERL -V:apiversion`; test `expr "$apiversion" \< 5` -ne 0); then
  PERL=no
fi

Note the unknown I get here, testing the old perl installed on the host:

gnome:/mnt/lfs # perl -V:apiversion
apiversion='UNKNOWN';
gnome:/mnt/lfs # perl -V:xs_apiversion
xs_apiversion='5.005';
gnome:/mnt/lfs # perl -V:pm_apiversion
pm_apiversion='5.005';
gnome:/mnt/lfs #

So where do I go now?

Thanks, Bob




More information about the lfs-support mailing list