Frage

I've been closely following commands from 'Linux from scratch' book version 7.2, and as usual everything was fine until i've reached chapter 6.9, and the problem is when I try to install glibc by 'make' command it throws following error at me.

/bin/sh: command substitution: line 3: syntax error near unexpected token `)'
/bin/sh: command substitution: line 3: `/tools/lib/gcc/i686-pc-linux-gnu/4.7.1/../../../../i686-pc-linux-gnu/bin/ar t ../sunrpc/librpc_compat_pic.a | sed 's/^compat-//')'
make[1]: *** [/sources/glibc-build/linkobj/libc_pic.a] Error 1
make[1]: Leaving directory `/sources/glibc-2.16.0'
make: *** [all] Error 2

So I did some research and surprisingly I wasn't alone with this type of problem but unfortunately I couldn't find good solution (Every thread had a different one). So here are the thing I know so far about this problem.

Bash (4.2.36(1)-release) clearly can't handle brackets especially this type of syntax '$()'
It may have something to do with bash version
other commands which use () don't work as well
And because this is my first time when I went down so deep into linux I honestly have no idea what I'm doing and what to do. So I'd really appreciate your help. Also i've read somewhere that I can remove all $() from make process but I'm not sure how to do it

I'm using Ubuntu 12.10 to compile LFS and yes I have checked with their script and all dependicies are satisfied. And to help here's env output and simple echo check

TERM=xterm
PATH=/bin:/usr/bin:/sbin:/usr/sbin:/tools/bin
PWD=/sources/glibc-build
PS1=\u:\w\$ 
SHLVL=1
HOME=/root
_=/tools/bin/env
OLDPWD=/bin
root:/sources/glibc-build# echo $(test)
bash: command substitution: line 38: syntax error near unexpected token `)'
bash: command substitution: line 38: `test)'
root:/sources/glibc-build# echo $test 
test

Source: http://www.linuxfromscratch.org/lfs/view/stable/index.html

War es hilfreich?

Lösung

Ok so in order to repair this problem i had to rebuild whole LFS system again but this time with as mentioned above bison and yacc installed on my host machine, so if you experience similar problem to mine just simply execute following command and that should do the trick.

sudo apt-get update && apt-get install bison*
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top