a bug in the perl patch

Bruce Dubbs bruce.dubbs at gmail.com
Sun Jun 26 18:34:12 PDT 2011

Aleksandar Kuktin wrote:
>> On Sun, 26 Jun 2011 13:13:18 -0500
>> Bruce Dubbs <bruce.dubbs at gmail.com> wrote:
>> Andrew Benton wrote:
>>> The current patch tests if ${prefix}/lib/libc.so.6 exists and then
>>> it gets the version of libc from /lib/libc.so.6, the one installed
>>> on the host...
>> I'm not sure why the change was made in 2008, but it has worked fine 
>> since then.  The patch is only used in Chapter 5.  What problem are
>> we solving by making a change?
>>    -- Bruce
> The problem with the current patch, perl-5.{whatever}-libc-1.patch,
> is that it wants to check the version of libc installed in $prefix, as
> opposed to checking the version of libc in /lib, which perl does by
> default.
> But it does not do that.
> -if test -L /lib/libc.so.6; then
> +if test -L ${prefix}/lib/libc.so.6; then            # 1
>      libc=`ls -l /lib/libc.so.6 | awk '{print $NF}'` # 2
> -    libc=/lib/$libc
> +    libc=${prefix}/lib/$libc                        # 3
>  fi
> In 1, it checks to see if there is a libc in $prefix. Then, in 2 it
> checks the version of /lib/libc (!), and uses that knowledge in 3 to
> build a path to $prefix libc.

I think you are right.

It looks like the change was made by Robert three years ago (between 
perl-5.8.8 and perl-5.10.0) and then propagated to newer versions of the 

I also see a change in
by Matt.

I'll be glad to change this if it was an inadvertent change, but I'd 
like to confirm that first.


   -- Bruce

More information about the lfs-dev mailing list