http://bugs.winehq.org/show_bug.cgi?id=13532
--- Comment #4 from David Earle davidearlenz@gmail.com 2008-09-18 03:24:17 --- I also had this problem using Fedora - see duplicate bug.
The advise of the fedora site worked - i.e. run the following before compiling:
ulimit -s unlimited
also - just re-starting the compiling may be enough on its own, as it runs through and starts up from where it left off. (the issue is to do with gcc and stack limits)