Andreas Kasenides | 2 Jan 16:33 2010

LFS 6.5 - bash fails with command substitution: line 5: syntax error near unexpected token `)'

I am using LFS 6.5 on a CentOS 5.4 host.
Everything goes smoothly until I get to
062-creatingdirs

Apparently this is the first script that uses the
newly compiled tools among them /tools/bin/bash
This is where bash begins to fail on command substitutions
of the form $(uname -m) with errors of the form
"command substitution: line 5: syntax error near unexpected token `)'".
Changing from $(uname -m) to `uname -m` corrects this problem.
> From then on it fails on ALL similar commands. Which is very
miserable when you get into 076-util-linux-ng where similar
constructs are used in the configure script with some 20000+ lines!!

In order to test the new bash I created a test file:

#!/home/ank/o-box/tools/bin/bash
DD=$(uname -m)
echo $DD

which fails with
/tmp/tt: command substitution: line 3: syntax error near unexpected
token `)'
/tmp/tt: command substitution: line 3: `uname -m)'

This runs nicely with `uname -m`. Same behavior exists with
the .../bin/bash (instead of ../tools/bin/bash).

Instead the same test file run with the host bash:
#!/bin/bash
(Continue reading)

Lefty (石鏡 | 2 Jan 17:40 2010

Re: LFS 6.5 - bash fails with command substitution: line 5: syntax error near unexpected token `)'

On 1/2/10 7:33 AM, "Andreas Kasenides" <andreas <at> kasenides.org> wrote:
> 
> which fails with
> /tmp/tt: command substitution: line 3: syntax error near unexpected
> token `)'
> /tmp/tt: command substitution: line 3: `uname -m)'

I ran into this problem, and it stemmed from a bad bash build in Chapter 5.
I suspect I logged out and didn't properly set my environment back up when I
restarted at some point, but I haven't been able to pin down the specific
cause.

I backtracked and things worked better the second time around.

--

-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/lfs/faq.html
Unsubscribe: See the above information page

Mikie | 2 Jan 18:39 2010

Stuck at 5.7.1

At 5.7.1 I run:
make
It gives me this:
make: *** No targets specified and no makefile found.  Stop.

Prior to this step I ran:
../glibc-2.10.1/configure --prefix=/tools \
    --host=$LFS_TGT --build=$(../glibc-2.10.1/scripts/config.guess) \
    --disable-profile --enable-add-ons \
    --enable-kernel=2.6.18 --with-headers=/tools/include \
    libc_cv_forced_unwind=yes libc_cv_c_cleanup=yes
and got this:
*** These critical programs are missing or too old: as ld
*** Check the INSTALL file for required versions.

I am truly stuck.

--

-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/lfs/faq.html
Unsubscribe: See the above information page

Bruce Dubbs | 2 Jan 18:52 2010
Picon

Re: Stuck at 5.7.1

Mikie wrote:
> At 5.7.1 I run:
> make
> It gives me this:
> make: *** No targets specified and no makefile found.  Stop.
> 
> 
> 
> 
> Prior to this step I ran:
> ../glibc-2.10.1/configure --prefix=/tools \
>     --host=$LFS_TGT --build=$(../glibc-2.10.1/scripts/config.guess) \
>     --disable-profile --enable-add-ons \
>     --enable-kernel=2.6.18 --with-headers=/tools/include \
>     libc_cv_forced_unwind=yes libc_cv_c_cleanup=yes
> and got this:
> *** These critical programs are missing or too old: as ld
> *** Check the INSTALL file for required versions.

So what do `as --version` and 'ld --version` give you?

   -- Bruce

--

-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/lfs/faq.html
Unsubscribe: See the above information page

Chris Staub | 2 Jan 19:08 2010

Re: Stuck at 5.7.1

On 01/02/2010 12:52 PM, Bruce Dubbs wrote:
> Mikie wrote:
>>
>> Prior to this step I ran:
>> ../glibc-2.10.1/configure --prefix=/tools \
>>      --host=$LFS_TGT --build=$(../glibc-2.10.1/scripts/config.guess) \
>>      --disable-profile --enable-add-ons \
>>      --enable-kernel=2.6.18 --with-headers=/tools/include \
>>      libc_cv_forced_unwind=yes libc_cv_c_cleanup=yes
>> and got this:
>> *** These critical programs are missing or too old: as ld
>> *** Check the INSTALL file for required versions.
>
> So what do `as --version` and 'ld --version` give you?
>
>     -- Bruce
>

I think you mean "$LFS_TGT-as --version" and "$LFS_TGT_-ld --version".
--

-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/lfs/faq.html
Unsubscribe: See the above information page

Ken Moffat | 2 Jan 19:29 2010

ch5 perl linked to /lib

The story so far - a few fubars and syntax errors in my scripts,
which I eventually sorted.  Got into chapter 6 and failed in
the headers check with
/bin/sh: /usr/bin/perl: No such file or directory

Investigation showed that /tools/bin/perl and the symlink were
in place, but /tools/bin/perl was linked to /lib.

At first, I assumed this was another error in my script, and
probably I'd barfed the toolchain adjustments, but everything
else in /tools/bin looks to be correctly linked.

Then, I guessed it was an error in my script, but the patch
is being applied.  Configure correctly determines that it is
on linux, but I'm wondering if something causes it to
ignore the linux hint (which is what we patch).  Unfortunately,
I don't really understand perl's configurey.

ISTR somebody had a miscompiled perl recently, but I
can't find that thread (google is less than useful today)
and I'm out of ideas for diagnosing how to fix this.

Supporting evidence after latest attempt to rebuild perl:
lfs <at> bluesbreaker ~$ ldd /mnt/lfs/building/perl-5.10.1/perl
	linux-vdso.so.1 =>  (0x00007fff27fff000)
	libnsl.so.1 => /lib/libnsl.so.1 (0x00007fd0996ed000)
	libdl.so.2 => /lib/libdl.so.2 (0x00007fd0994e9000)
	libm.so.6 => /lib/libm.so.6 (0x00007fd099267000)
	libcrypt.so.1 => /lib/libcrypt.so.1 (0x00007fd099030000)
	libutil.so.1 => /lib/libutil.so.1 (0x00007fd098e2d000)
(Continue reading)

Alexander Kozlov | 2 Jan 20:57 2010
Picon
Picon

bash 4.1 needs readline 6.1

On my machine, bash 4.1 builds happily with new readline and fails 
with the 'old' 6.0. If it's not me only, this should be mentioned 
in the "Host System Requirements", I think.

Alex.
--

-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/lfs/faq.html
Unsubscribe: See the above information page

Mikie | 2 Jan 22:35 2010

RE: Stuck at 5.7.1

> So what do `as --version` and 'ld --version` give you?
>
>     -- Bruce
>

I think you mean "$LFS_TGT-as --version" and "$LFS_TGT_-ld --version".
[K. Mike Bradley] 

ubuntu <at> ubuntu:~$ $LFS_TGT-as --version
i686-lfs-linux-gnu-as: command not found
ubuntu <at> ubuntu:~$

ubuntu <at> ubuntu:~$ $LFS_TGT-ld --version
i686-lfs-linux-gnu-ld: command not found
ubuntu <at> ubuntu:~$

--

-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/lfs/faq.html
Unsubscribe: See the above information page

Mikie | 2 Jan 22:38 2010

RE: Stuck at 5.7.1

So what do `as --version` and 'ld --version` give you?

   -- Bruce

[K. Mike Bradley] 

ubuntu <at> ubuntu:~$ as --version
GNU assembler (GNU Binutils for Ubuntu) 2.20
Copyright 2009 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms
of
the GNU General Public License version 3 or later.
This program has absolutely no warranty.
This assembler was configured for a target of `i486-linux-gnu'.

ubuntu <at> ubuntu:~$ ld --version
GNU ld (GNU Binutils for Ubuntu) 2.20
Copyright 2009 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms
of
the GNU General Public License version 3 or (at your option) a later
version.
This program has absolutely no warranty.
ubuntu <at> ubuntu:~$

--

-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/lfs/faq.html
Unsubscribe: See the above information page

(Continue reading)

Ken Moffat | 2 Jan 22:47 2010

Re: Stuck at 5.7.1

2010/1/2 Mikie <kmb <at> mikienet.com>:
> I think you mean "$LFS_TGT-as --version" and "$LFS_TGT_-ld --version".
> [K. Mike Bradley]
>
> ubuntu <at> ubuntu:~$ $LFS_TGT-as --version
> i686-lfs-linux-gnu-as: command not found
> ubuntu <at> ubuntu:~$
>
 Please try again as user lfs (LFS_TGT should have been set
in that user's environment).

ĸen
-- 
After tragedy, and farce, "OMG poneys!"
--

-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/lfs/faq.html
Unsubscribe: See the above information page

Gmane