1 <qandaentry id="glibc-awk-fail">
2 <question><para>Glibc fails and mentions BEGIN and END.</para></question>
3 <answer><para>If glibc fails to build with an error like this:
4 <screen>'BEGIN { subdirs = ""; inhibit = "" }; \
6 ^[^-] { subdirs = subdirs " " $0 }; \
7 ^- { inhibit = inhibit " " substr($0, 2) }; \
8 END { printf "sysdep-subdirs =%s\n", subdirs; \
9 printf "sysdep-inhibit-subdirs =%s\n", inhibit; \
10 print "sysd-dirs-done = t" }' \
11 /dev/null linuxthreads/sysdeps/pthread/Subdirs
12 sysdeps/unix/inet/Subdirs sysdeps/unix/Subdirs >
13 /usr/src/glibc-build/sysd-dirs-tmp
14 /bin/sh: line 1: BEGIN { subdirs = ""; inhibit = "" };
16 ^[^-] { subdirs = subdirs " " $0 }; ^- { inhibit =
17 inhibit " " substr($0, 2) }; END
20 The key is the BEGIN and END in the output.
21 The probable reason is that it's not statically linked
22 which you can fix by going back to Chapter 5 and recompiling it.