On 16/08/2015 15:24, Bruce Dubbs wrote: > Rick Houkes wrote: >> For me the result is for awk --version | head -n1 is: GNU Awk 4.1.1, API: >> 1.1 (GNU MPFR 3.1.2-p11, GNU MP 6.0.0) >> So it looks like I did replace mawk with gawk on the Kubuntu host. However >> I did notice mawk is still present on the system, >> >> So I did some more digging I came to conclusion it was mawk after all. It >> seems that ncurses prefers to use mawk even when awk points to gawk and >> even when there is an awk or gawk earlier in $PATH. The only way to get >> ncurses to build without the patch was to ensure there is no mawk in $PATH >> what so ever. >> However on my fresh LFS build, I did try an ncurses build with mawk in >> $PATH. That was no problem was so ever without the patch. Heck it even >> compiled with only mawk present an no gawk. >> >> That leaves me puzzling why ncurses is giving issues on a Kubuntu host when >> mawk is present next to gawk. Might be there is some 'feature' in the mawk >> Kubuntu. On my fresh LFS dev build with gawk next to mawk or pure mawk >> seems to make ncurses build regardless. I even retried this with the temp >> toolchain within the chroot. The mawk used is the latest from the mawk >> website. >> >> After all this I came to the conlusion that is is a host system problem. It >> seems to be having mawk present in $PATH on a *ubuntu 15.04 host is giving >> issues. If mawk is not present in $PATH on *ubuntu 15.04 ncurses will >> compile happily. > > Thanks for the research. I note in configure there is: > > for ac_prog in mawk gawk nawk awk > do > ... > break > done > > So we can fix this in several different ways: > > 1. Remove mawk from the host > 2. Use the sed on the source > sed -i 's/.:space:./ \t/g' ncurses/base/MKlib_gen.sh > 3. Add AWK=gawk ./configure ... > 4. sed s/mawk// configure > > I do not know where the mawk comes from in configure. It is not in > configure.in. Perhaps the line: > > CF_PROG_AWK > > When I run autoconf on ncurses, the order of the search for awk is changed to > > for ac_prog in gawk mawk nawk awk > > so upstream is using an old, or at least different, version of autoconf.
Well, ncurses upstream dev is the same person as mawk upstream dev, as far as I understand... He may have done some custom modification to have mawk used first. Actually, Debian has a package "autoconf-dickey", whose description is: ---- This hacked version of autoconf is required to bootstrap ncurses and some other packages maintained upstream by Thomas Dickey. It should not be used for other purposes. ---- Also Debian still uses a very old version of mawk (1.3.3 from 1996), while Th Dickey has been improving it since 2009. Interesting story at https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=554167 actually... > > I'm inclined to go with option 4 above, but would like other opinions. > > -- Bruce > Agreed Pierre -- http://lists.linuxfromscratch.org/listinfo/lfs-dev FAQ: http://www.linuxfromscratch.org/faq/ Unsubscribe: See the above information page
