I am compiling on WinXP using Cygwin's Bash - I compiled 4.1.1 OK but not 4.2.0 (CVS). The makefile works away for a long time and finally stops - unfinished.
What I did to fix it: After you run the ./configure script there will be a makefile in your build directory. Open it in wordpad and also open the makefile from your 4.1.1 build in another wordpad window. Goto the wordpad with the 4.1.1 Makefile and search for the text "stage1-start::" . Do the same with the 4.2.0 Makefile. Rename the 4.2.0 "stage?-start::" sections to "Origonal-stage?-start::" and the 4.2.0 "stage?-end::" sections to "Origonal-stage?-end::". Now copy the 4.1.1 "stage?-start::" and 0 "stage?-end::" sections into the 4.2.0 Makefile at each appropriate place. Hope that is clear. You _could_ also fixup "stageprofile-start::" while you are there, I did in my Makefile but have not yet typed "make stageprofile" to test if profiled building is working in 4.2.0. Don't forget that 4.2.0 has an extra directory that is not in 4.1.1 (libdecnumber) so in each of the "stage?-start/end" sections you will need to add a couple of lines for the libdecnumber directory. I found that the 4.1.1 Makefile worked perfectly (for 4.1.1) and adding those sections into the 4.2.0 Makefile caused it to work correctly. Prior to making this fix I was unable to get make to build properly. It kept trying to coping the directories into each other instead of renaming them and shuffling them (if that is how it could best be described). The 4.2.0 Makefile says "We use mv on platforms where symlinks to directories do not work or are not reliable." I've not got to running down why the configure script chose the "mv method" but it breaks on Windows XP (for me). Other people claim to have done a cygwin build (with far fewer things enabled) but they might not have built it on Windows XP (where "ln" works fine and "mv" copies into the directory instead of overwriting the directory - it is not "dos" "copy"). If the maintainers where to use the 4.1.1 release version "style of operation" for the stages of the 4.2.0 (CVS) make then it would work properly (for me and I imagine for others too - not a lot of WinXP builds reported). Here is a tiny portion of one stage of the 4.2.0 makefile to further demonstrate: # * We build only C (and possibly Ada). .PHONY: stage1-start stage1-end Origonal-stage1-start:: @: $(MAKE); $(stage); \ echo stage1 > stage_current ; \ echo stage1 > stage_last; \ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR) @cd $(HOST_SUBDIR); [ -d stage1-gcc ] || \ mkdir stage1-gcc; \ mv stage1-gcc gcc @cd $(HOST_SUBDIR); [ -d stage1-intl ] || \ mkdir stage1-intl; \ mv stage1-intl intl @cd $(HOST_SUBDIR); [ -d stage1-libcpp ] || \ mkdir stage1-libcpp; \ mv stage1-libcpp libcpp @cd $(HOST_SUBDIR); [ -d stage1-libdecnumber ] || \ mkdir stage1-libdecnumber; \ mv stage1-libdecnumber libdecnumber @cd $(HOST_SUBDIR); [ -d stage1-libiberty ] || \ mkdir stage1-libiberty; \ mv stage1-libiberty libiberty @cd $(HOST_SUBDIR); [ -d stage1-zlib ] || \ mkdir stage1-zlib; \ mv stage1-zlib zlib @[ -d stage1-$(TARGET_SUBDIR) ] || \ mkdir stage1-$(TARGET_SUBDIR); \ mv stage1-$(TARGET_SUBDIR) $(TARGET_SUBDIR) Origonal-stage1-end:: @if test -d $(HOST_SUBDIR)/gcc ; then \ cd $(HOST_SUBDIR); mv gcc stage1-gcc ; \ fi @if test -d $(HOST_SUBDIR)/intl ; then \ cd $(HOST_SUBDIR); mv intl stage1-intl ; \ fi @if test -d $(HOST_SUBDIR)/libcpp ; then \ cd $(HOST_SUBDIR); mv libcpp stage1-libcpp ; \ fi @if test -d $(HOST_SUBDIR)/libdecnumber ; then \ cd $(HOST_SUBDIR); mv libdecnumber stage1-libdecnumber ; \ fi @if test -d $(HOST_SUBDIR)/libiberty ; then \ cd $(HOST_SUBDIR); mv libiberty stage1-libiberty ; \ fi @if test -d $(HOST_SUBDIR)/zlib ; then \ cd $(HOST_SUBDIR); mv zlib stage1-zlib ; \ fi @if test -d $(TARGET_SUBDIR) ; then \ mv $(TARGET_SUBDIR) stage1-$(TARGET_SUBDIR) ; \ fi rm -f stage_current stage1-start:: @: $(MAKE); $(stage); \ echo stage1 > stage_current ; \ echo stage1 > stage_last; \ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR) $(TARGET_SUBDIR) @cd $(HOST_SUBDIR); [ -d stage1-gcc ] || \ mkdir stage1-gcc; \ set stage1-gcc gcc ; \ ln -s $$1 $$2 @cd $(HOST_SUBDIR); [ -d stage1-intl ] || \ mkdir stage1-intl; \ set stage1-intl intl ; \ ln -s $$1 $$2 @cd $(HOST_SUBDIR); [ -d stage1-libcpp ] || \ mkdir stage1-libcpp; \ set stage1-libcpp libcpp ; \ ln -s $$1 $$2 @cd $(HOST_SUBDIR); [ -d stage1-libdecnumber ] || \ mkdir stage1-libdecnumber; \ set stage1-libdecnumber libdecnumber ; \ ln -s $$1 $$2 @cd $(HOST_SUBDIR); [ -d stage1-libiberty ] || \ mkdir stage1-libiberty; \ set stage1-libiberty libiberty ; \ ln -s $$1 $$2 @cd $(HOST_SUBDIR); [ -d stage1-zlib ] || \ mkdir stage1-zlib; \ set stage1-zlib zlib ; \ ln -s $$1 $$2 stage1-end:: @rm -f stage_current @cd $(HOST_SUBDIR); set gcc stage1-gcc ; \ rm -f $$1 @cd $(HOST_SUBDIR); set intl stage1-intl ; \ rm -f $$1 @cd $(HOST_SUBDIR); set libcpp stage1-libcpp ; \ rm -f $$1 @cd $(HOST_SUBDIR); set libdecnumber stage1-libdecnumber ; \ rm -f $$1 @cd $(HOST_SUBDIR); set libiberty stage1-libiberty ; \ rm -f $$1 @cd $(HOST_SUBDIR); set zlib stage1-zlib ; \ rm -f $$1 # Bubble a bugfix through all the stages up to stage 1. They are -- Summary: Makefile using mv instead of ln not working on WinXP Cygwin Bash Product: gcc Version: 4.2.0 Status: UNCONFIRMED Severity: major Priority: P3 Component: bootstrap AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: rob1weld at aol dot com GCC build triplet: i686-pc-cygwin GCC host triplet: i686-pc-cygwin GCC target triplet: i686-pc-cygwin http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30341