The patch "gawk-3.1.5-freewstr.patch" breaks gawk on OS X i686, ppc, and seemingly on Solaris as well. Gawk installs just fine with the patch, though behaves erratically afterwards. Reproducible: Always Steps to Reproduce: 1. Download zsh-4.3.4 and unpack. 2. Enter the Src directory in zsh-4.3.4. 3. Run: ${EPREFIX}/gawk -f makepro.awk glob.c .|grep '\@' There should not, however, be any output at all. Actual Results: Eextern int getmatch _((char**sp@!char*pat,int fl,int n,char*replstr)); Lstatic int qualuid _((UNUSED(char*name),struct stat*buf,off_t uid@!UNUSED(char*dummy))); Lstatic int qualisblk _((UNUSED(char*name),struct stat*buf,UNUSED(off_t junk),UNUSED(char*dummy@>)); Lstatic int qualmodeflags _((UNUSED(char*name),struct stat*buf,off_t mod,UNUSED@<char*dummy))); Lstatic int qualsheval _((char*name,UNUSED(struct stat*buf),UNUSED(off_t days),char*str@}; Expected Results: Empty output. This is achieved by uncommenting the gawk-3.1.5-freewstr.patch in the ebuild. Debugging with grobian on #gentoo-alt, we found that the problem extended to at least three of the supported platforms, but not on Linux. I have not pinpointed exactly what line in the patch which causes the problem, though. The result of this bug caused zsh to not compile, and could cause unknown other problems as well.
After doing some more testing, using the following method: 1. Download zsh-4.3.4 and unpack. 2. Enter the Src directory in zsh-4.3.4. 3. Run (I used zsh here): for file in **.c; do ${EPREFIX}/bin/gawk -f makepro.awk $file .|grep '\@' done It turned out that the removal of the patch just changed the erroneous behavior of gawk a bit.
I have now tested with the gawk that was installed with Macports, which unfortunately also failed to correctly process the Zsh-files. After manually installing the latest stable gawk from cvs, it seems to work properly. I have not, however, sifted through the changes from the official 3.1.5 release and the 3.1.5h version from cvs in order to produce patches.
ok, many thanks for the research. I guess we could just take a diffball against the released stable, and apply that in prefix. When the main tree catches up (most probably the next release) we should be on the safe side.
For some reason or another I appear not to have any of the desribed problems. However, the cvs snapshot appears to be much better than the lastest stable (builds and runs out of the box, contrary to 3.1.5)
(In reply to comment #4) > For some reason or another I appear not to have any of the described problems. That is very well possible, as the problem appears to be memory (mis-)alignment or something. For me it helped to print "!!!!" in front of the problematic substitution to make it work, whereas for the original reporter that had to be "!!!!!!!" or something to make it work. So the error is quite random.
I was able to successfully install zsh using gawk-3.1.5-r5 which has some extra patches "grabbed from Fedora" which seem to help for us.