[Keystone Slip #26] Chapter 6-Glibc: find out why mtrace isn't build

Gerard Beekmans gerard at linuxfromscratch.org
Thu Mar 15 04:32:44 PST 2001

On March 15, 2001 06:55 am, Thomas 'Balu' Walter wrote:
> +-Gerard Beekmans-(gerard at linuxfromscratch.org)-[15.03.01 11:51]:
> > > Reading this again, I wonder why $(PERL) isn't set correctly?
> >
> > perl isn't detected in chapter 6 because it's not installed yet.
> ehm - and changing $PERL into /usr/bin/perl works even if it's not
> installed?
>     Ba-Am.I.this.stupid?-lu

What Makefile does is a conditional sed of @PERL@ into what $PERL expands 
into. The problem is that an earlier test for perl sets $PERL to no (see the 
glibc-build/config.make file). glibc-2.2.1/malloc/Makefile does a test to see 
if $PERL is set to 'no'. If so, it won't install mtrace. The sed conveniently 
screws up the test in Makefile (instead of testing for $PERL = no, it now 
test for /usr/bin/perl = no which doesn't work so it's not set to 'no' so it 
continues) and voila the sed operation for mtrace replaced @PERL@ with 

Now you wonder, and so do I, why not just sed config.make to set perl = 
/usr/bin/perl. I can understand that Glibc may actually try to use perl to 
build something when it thinks it's present. Right now glibc still knows perl 
isn't present so it won't use it, that one Makefile just doesn't know (it 
doesn't execute any perl, just sed's a file and cp's it).

Neven should be able to provide you with a definite answers; he came up with 

Gerard Beekmans

-*- If Linux doesn't have the solution, you have the wrong problem -*-

More information about the lfs-book mailing list