From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16171 invoked by alias); 6 Aug 2009 11:17:22 -0000 Received: (qmail 16132 invoked by uid 48); 6 Aug 2009 11:17:10 -0000 Date: Thu, 06 Aug 2009 11:17:00 -0000 Subject: [Bug ada/40984] New: Build failure in oscons stage not detected. X-Bugzilla-Reason: CC Message-ID: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "davek at gcc dot gnu dot org" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2009-08/txt/msg00620.txt.bz2 In the build log pasted below, there is a failure when running "make oscons" in $objdir/$target/libada, which is not detected, and the build process continues: > Checking multilib configuration for libada... > mkdir -p -- i686-pc-cygwin/libada > Configuring in i686-pc-cygwin/libada [ ... snip ... ] > updating cache ./config.cache > configure: creating ./config.status > config.status: creating Makefile > config.status: executing default-1 commands > Adding multilib support to Makefile in /gnu/gcc/gcc-patched/libada > multidirs= > with_multisubdir= > make[2]: Entering directory `/gnu/gcc/obj-patched-gnat5/i686-pc-cygwin/libada' > make -C ../.././gcc "MAKEOVERRIDES=" "LDFLAGS=" "LN_S=ln -s" "SHELL=/bin/sh" "GNATLIBFLAGS=-W -Wall -gnatpg " "GNATLIBCFLAGS=-g -O2 " "TARGET_LIBGCC2_CFLAGS=" "THREAD_KIND=native" "TRACE=no" "MULTISUBDIR=" "libsubdir=/opt/gcc-tools/lib/gcc/i686-pc-cygwin/4.5.0" "objext=.o" "prefix=/opt/gcc-tools" "exeext=.exeext.should.not.be.used " 'CC=the.host.compiler.should.not.be.needed' "GCC_FOR_TARGET=/gnu/gcc/obj-patched-gnat5/./gcc/xgcc -B/gnu/gcc/obj-patched-gnat5/./gcc/ -B/opt/gcc-tools/i686-pc-cygwin/bin/ -B/opt/gcc-tools/i686-pc-cygwin/lib/ -isystem /opt/gcc-tools/i686-pc-cygwin/include -isystem /opt/gcc-tools/i686-pc-cygwin/sys-include " "CFLAGS=-g -O2 -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes" ada/s-oscons.ads > make[3]: Entering directory `/gnu/gcc/obj-patched-gnat5/gcc' > mkdir -p ada/bldtools/oscons > rm -f ada/bldtools/oscons/s-oscons-tmplt.c ada/bldtools/oscons/gsocket.h ada/bldtools/oscons/xoscons.adb ada/bldtools/oscons/xutil.ads ada/bldtools/oscons/xutil.adb > cp -p /gnu/gcc/gcc-patched/gcc/ada/s-oscons-tmplt.c /gnu/gcc/gcc-patched/gcc/ada/gsocket.h /gnu/gcc/gcc-patched/gcc/ada/xoscons.adb /gnu/gcc/gcc-patched/gcc/ada/xutil.ads /gnu/gcc/gcc-patched/gcc/ada/xutil.adb ada/bldtools/oscons > (cd ada/bldtools/oscons ; gnatmake -q xoscons ; \ > rm -f s-oscons-tmplt.i s-oscons-tmplt.s ; \ > `echo "/gnu/gcc/obj-patched-gnat5/./gcc/xgcc -B/gnu/gcc/obj-patched-gnat5/./gcc/ -B/opt/gcc-tools/i686-pc-cygwin/bin/ -B/opt/gcc-tools/i686-pc-cygwin/lib/ -isystem /opt/gcc-tools/i686-pc-cygwin/include -isystem /opt/gcc-tools/i686-pc-cygwin/sys-include " | sed -e 's^\./xgcc^../../../xgcc^' -e 's^-B./^-B../../../^'` -g -O2 -E -C -DTARGET=\"i686-pc-cygwin\" s-oscons-tmplt.c > s-oscons-tmplt.i ; \ > `echo "/gnu/gcc/obj-patched-gnat5/./gcc/xgcc -B/gnu/gcc/obj-patched-gnat5/./gcc/ -B/opt/gcc-tools/i686-pc-cygwin/bin/ -B/opt/gcc-tools/i686-pc-cygwin/lib/ -isystem /opt/gcc-tools/i686-pc-cygwin/include -isystem /opt/gcc-tools/i686-pc-cygwin/sys-include " | sed -e 's^\./xgcc^../../../xgcc^' -e 's^-B./^-B../../../^'` -S s-oscons-tmplt.i ; \ > ./xoscons ; \ > rm -f ../../s-oscons.ads ; \ > cp -p s-oscons.ads s-oscons.h ../../) > s-oscons-tmplt.c: In function 'main': > s-oscons-tmplt.c:1273:98: error: 'WSASYSNOTREADY' undeclared (first use in this function) > s-oscons-tmplt.c:1273:98: error: (Each undeclared identifier is reported only once > s-oscons-tmplt.c:1273:98: error: for each function it appears in.) > s-oscons-tmplt.c:1274:107: error: 'WSAVERNOTSUPPORTED' undeclared (first use in this function) > s-oscons-tmplt.c:1275:108: error: 'WSANOTINITIALISED' undeclared (first use in this function) > s-oscons-tmplt.c:1276:90: error: 'WSAEDISCON' undeclared (first use in this function) > make[3]: Leaving directory `/gnu/gcc/obj-patched-gnat5/gcc' > test -f stamp-libada || \ > make -C ../.././gcc/ada "MAKEOVERRIDES=" "LDFLAGS=" "LN_S=ln -s" "SHELL=/bin/sh" "GNATLIBFLAGS=-W -Wall -gnatpg " "GNATLIBCFLAGS=-g -O2 " "TARGET_LIBGCC2_CFLAGS=" "THREAD_KIND=native" "TRACE=no" "MULTISUBDIR=" "libsubdir=/opt/gcc-tools/lib/gcc/i686-pc-cygwin/4.5.0" "objext=.o" "prefix=/opt/gcc-tools" "exeext=.exeext.should.not.be.used " 'CC=the.host.compiler.should.not.be.needed' "GCC_FOR_TARGET=/gnu/gcc/obj-patched-gnat5/./gcc/xgcc -B/gnu/gcc/obj-patched-gnat5/./gcc/ -B/opt/gcc-tools/i686-pc-cygwin/bin/ -B/opt/gcc-tools/i686-pc-cygwin/lib/ -isystem /opt/gcc-tools/i686-pc-cygwin/include -isystem /opt/gcc-tools/i686-pc-cygwin/sys-include " "CFLAGS=-g -O2 -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes" gnatlib-shared \ > && touch stamp-libada > make[3]: Entering directory `/gnu/gcc/obj-patched-gnat5/gcc/ada' > make \ > GNATLIBFLAGS="-W -Wall -gnatpg " \ > GNATLIBCFLAGS="-g -O2 " \ > MULTISUBDIR="" \ > THREAD_KIND="native" \ > TARGET_LIBGCC2_CFLAGS="" \ > gnatlib-shared-win32 The build carries on regardless until some time later, when the malformed/partial s-oscons.ads is finally referenced, while compiling g-socket.ads in $objdir/gcc/ada/rts: > /gnu/gcc/obj-patched-gnat5/./gcc/xgcc -B/gnu/gcc/obj-patched-gnat5/./gcc/ -B/opt/gcc-tools/i686-pc-cygwin/bin/ -B/opt/gcc-tools/i686-pc-cygwin/lib/ -isystem /opt/gcc-tools/i686-pc-cygwin/include -isystem /opt/gcc-tools/i686-pc-cygwin/sys-include -c -g -O2 -W -Wall -gnatpg g-soccon.ads -o g-soccon.o > g-socket.ads:432:46: "SIZEOF_tv_sec" not declared in "OS_Constants" > g-socket.ads:434:53: expected type "Standard.Duration" > g-socket.ads:434:53: found type universal integer > g-socket.ads:1134:58: "SIZEOF_fd_set" not declared in "OS_Constants" > s-oscons.ads:48:01: (style) multiple blank lines > s-oscons.ads:53:01: (style) multiple blank lines > s-oscons.ads:58:01: (style) multiple blank lines > s-oscons.ads:63:01: (style) multiple blank lines > s-oscons.ads:68:01: (style) multiple blank lines > s-oscons.ads:75:01: (style) multiple blank lines > s-oscons.ads:80:01: (style) multiple blank lines > s-oscons.ads:85:01: (style) multiple blank lines > s-oscons.ads:90:01: (style) multiple blank lines > s-oscons.ads:95:01: (style) multiple blank lines > s-oscons.ads:100:01: (style) multiple blank lines > s-oscons.ads:111:01: (style) multiple blank lines > s-oscons.ads:132:01: (style) multiple blank lines > make[6]: *** [g-soccon.o] Error 1 > make[6]: Leaving directory `/gnu/gcc/obj-patched-gnat5/gcc/ada/rts' > make[5]: *** [gnatlib] Error 2 > make[5]: Leaving directory `/gnu/gcc/obj-patched-gnat5/gcc/ada' > make[4]: *** [gnatlib-shared-win32] Error 2 > make[4]: Leaving directory `/gnu/gcc/obj-patched-gnat5/gcc/ada' > make[3]: *** [gnatlib-shared] Error 2 > make[3]: Leaving directory `/gnu/gcc/obj-patched-gnat5/gcc/ada' > make[2]: *** [gnatlib-shared] Error 2 > make[2]: Leaving directory `/gnu/gcc/obj-patched-gnat5/i686-pc-cygwin/libada' > make[1]: *** [all-target-libada] Error 2 > make[1]: Leaving directory `/gnu/gcc/obj-patched-gnat5' > make: *** [all] Error 2 At a first glance, I think this is happening because 'oscons' is a .PHONY target in libada/Makefile.in, and there is no stamp or other sentinel to make sure the sub-make succeeded. The sub-make doesn't pass an error back because the error occurs in the middle of a long shell pipeline at the end of which is a command "$(CP) s-oscons.ads s-oscons.h ../../" that succeeds because xoscons still generates a fragmentary s-oscons.ads despite there being an error. Either xoscons should delete its output in case of an error, or the Makefile rule: $(ADA_GEN_SUBDIR)/s-oscons.ads : $(ADA_GEN_SUBDIR)/s-oscons-tmplt.c $(ADA_GEN_SUBDIR)/gsocket.h $(ADA_GEN_SUBDIR)/xoscons.adb $(ADA_GEN_SUBDIR)/xutil.ads $(ADA_GEN_SUBDIR)/xutil.adb -$(MKDIR) $(ADA_GEN_SUBDIR)/bldtools/oscons $(RM) $(addprefix $(ADA_GEN_SUBDIR)/bldtools/oscons/,$(notdir $^)) $(CP) $^ $(ADA_GEN_SUBDIR)/bldtools/oscons (cd $(ADA_GEN_SUBDIR)/bldtools/oscons ; gnatmake -q xoscons ; \ $(RM) s-oscons-tmplt.i s-oscons-tmplt.s ; \ $(OSCONS_CPP) ; \ $(OSCONS_EXTRACT) ; \ ./xoscons ; \ $(RM) ../../s-oscons.ads ; \ $(CP) s-oscons.ads s-oscons.h ../../) should be changed something along the lines (untested): $(ADA_GEN_SUBDIR)/s-oscons.ads : $(ADA_GEN_SUBDIR)/s-oscons-tmplt.c $(ADA_GEN_SUBDIR)/gsocket.h $(ADA_GEN_SUBDIR)/xoscons.adb $(ADA_GEN_SUBDIR)/xutil.ads $(ADA_GEN_SUBDIR)/xutil.adb -$(MKDIR) $(ADA_GEN_SUBDIR)/bldtools/oscons $(RM) $(addprefix $(ADA_GEN_SUBDIR)/bldtools/oscons/,$(notdir $^)) $(CP) $^ $(ADA_GEN_SUBDIR)/bldtools/oscons (cd $(ADA_GEN_SUBDIR)/bldtools/oscons ; gnatmake -q xoscons ; \ $(RM) s-oscons-tmplt.i s-oscons-tmplt.s ; \ $(OSCONS_CPP) ; \ $(OSCONS_EXTRACT) ; \ ./xoscons || $(RM) s-oscons.ads ; \ $(RM) ../../s-oscons.ads ; \ $(CP) s-oscons.ads s-oscons.h ../../) ... which would hopefully let the copy (and as a result the entire sub-make) fail. -- Summary: Build failure in oscons stage not detected. Product: gcc Version: 4.5.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: ada AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: davek at gcc dot gnu dot org 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=40984