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

Firerat firer4t at googlemail.com
Tue Jan 31 07:26:08 PST 2012

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

Talented, Witty And Thoughtful .. is how most describe me.

More information about the lfs-support mailing list