ash "syntax error: bad substitution" on possibly proper SH script.

Piotr Karbowski piotr.karbowski at gmail.com
Fri May 3 12:50:10 UTC 2013


I am unable to build glibc-2.17 with ash as /bin/sh, It fails in the 
middle of make with

sysdeps/unix/make-syscalls.sh: line 273: syntax error: bad substitution
sysdeps/unix/make-syscalls.sh: line 273: syntax error: bad substitution
sysdeps/unix/make-syscalls.sh: line 273: syntax error: bad substitution
../sysdeps/unix/make-syscalls.sh: line 273: syntax error: bad substitution


The glibc's scripts are full of crap and make does not even fail on 
make-syscalls.sh failure but later due to it, but I am able to build it 
with dash as /bin/sh so possibly the syntax is okay. The 273 line with 
its context

272	# And finally, pipe this all into the compiler.
273	echo '    ) | $(compile-syscall) '"\
274	\$(foreach p,\$(patsubst %$file,%,\$(basename 
\$(@F))),\$(\$(p)CPPFLAGS))"

-- Piotr.


More information about the busybox mailing list