Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 184360 - Gawk broken on OS X i686, ppc, as well as Solaris.
Summary: Gawk broken on OS X i686, ppc, as well as Solaris.
Status: RESOLVED FIXED
Alias: None
Product: Gentoo/Alt
Classification: Unclassified
Component: Mac OSX (show other bugs)
Hardware: All All
: High blocker
Assignee: osx porters
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-07-05 22:19 UTC by Thomas Kjosmoen
Modified: 2007-08-26 17:22 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Kjosmoen 2007-07-05 22:19:22 UTC
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.
Comment 1 Thomas Kjosmoen 2007-07-06 11:36:42 UTC
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.
Comment 2 Thomas Kjosmoen 2007-07-07 19:47:05 UTC
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.
Comment 3 Fabian Groffen gentoo-dev 2007-07-08 20:28:33 UTC
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.
Comment 4 Elias Pipping (RETIRED) gentoo-dev 2007-07-09 04:32:03 UTC
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)
Comment 5 Fabian Groffen gentoo-dev 2007-07-09 07:46:30 UTC
(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.
Comment 6 Fabian Groffen gentoo-dev 2007-08-26 17:22:54 UTC
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.