[lfs-support] Trouble changing dynamic linker in step 6.9

Dave H thegenrlftw at gmail.com
Tue Jan 31 19:41:18 PST 2012


On Tue, Jan 31, 2012 at 10:26 AM, Firerat <firer4t at googlemail.com> wrote:
> On 31 January 2012 14:50, Dave H <thegenrlftw at gmail.com> wrote:
>>> $(readelf -l /bin/sh | sed -n 's at .*interpret.*/tools\(.*\)]$@\1 at p')
>>
>> with this i get:
>> ===========================================================================
>> $(readelf -l /bin/sh | sed -n 's at .*interpret.*/tools\(.*\)]$@\1 at p')
>>
>> bash: command substitution: line 54: syntax error near unexpected token `)'
>> bash: command substitution: line 54: `readelf -l /bin/sh | sed -n
>> 's at .*interpret.*/tools\(.*\)]$@\1 at p')'
>> ===========================================================================
>>
>>> ` readelf -l /bin/sh | sed -n 's at .*interpret.*/tools\(.*\)]$@\1 at p' `
>>
>> this looks like i get something different (this is still with set -vx)
>> ===========================================================================
>> root:/sources/glibc-2.14.1# ` readelf -l /bin/sh | sed -n
>> 's at .*interpret.*/tools\(.*\)]$@\1 at p' `
>>
>> ` readelf -l /bin/sh | sed -n 's at .*interpret.*/tools\(.*\)]$@\1 at p' `
>>  readelf -l /bin/sh | sed -n 's at .*interpret.*/tools\(.*\)]$@\1 at p'
>> ++ readelf -l /bin/sh
>> ++ sed -n 's at .*interpret.*/tools\(.*\)]$@\1 at p'
>> + /lib64/ld-linux-x86-64.so.2
>> bash: /lib64/ld-linux-x86-64.so.2: No such file or directory
>> ============================================================================
>> it almost looks like it's trying to run something on the result or whatever?
>
> ok, it looks like your bash's Command Substitution  is pooched, it is
> not handling $( <command> )
> but oddly seems fine with  `<command>`
>
> But Yes, I was expecting an error in anycase :)
>
> bash is trying to execute the result of the commands wrapped in the ``
> if you put DL=`<command>`
> DL should be correctly set
>
> Well, I'm still confused as to what went wrong, but it does appear to
> be an issue with your bash
> have you tried logging out of the chroot and entering it again?
> if it is still all screwy and since bash is going to be recompiled
> anyway, you *might* be able to get away with substituting   ` ` for $(
> )
>
> But since I still have no clue as to the cause it could be something
> else entirely
>
> Sorry I couldn't be more definitive
>
>
> --
> Firerat
> Talented, Witty And Thoughtful .. is how most describe me.
> --
> http://linuxfromscratch.org/mailman/listinfo/lfs-support
> FAQ: http://www.linuxfromscratch.org/lfs/faq.html
> Unsubscribe: See the above information page

Hello and thanks very much for your help.  I didn't know I could use `
` as well as ( ) .

I tried continuing on and it was going fine....issued make and it went
for a few minutes, but came across a line that uses $( ) so it failed.
 Looks like I need to figure out the problem.  That or else track down
where these ( ) and change them to use  ` ` , possibly in several
locations, which I'd rather not do without your recommendation.

You mentioned logging out of chroot and then returning?  To do this
properly, I'm guessing I would just enter "exit" then log in again as
described in the process in chapter 6.4 again?

Truly appreciative,

Dave



More information about the lfs-support mailing list