RFR: JDK-8062618 Create a build failure summary at end of build log
Magnus Ihse Bursie
magnus.ihse.bursie at oracle.com
Mon Aug 31 12:59:49 UTC 2015
When building with multiple parallel jobs, it can be hard to track down
the actual error causing the build to fail.
This patch addresses this in two parts. Firstly, it tries to locate a
sequence of failing make targets, where the first is the initial failing
target, which is usually very specific, and repeats these at the end of
the build. (This will work only on GNU Make 4)
Secondly, if the failure occured during compilation or linking, the
actual output of the failing compilation/link command is repeated. Since
the most likely build failure a common developer will encounter are
compilation or link failures, this will hopefully help to make most
build errors quick to resolve. (This will unfortunately not work for
hotspot code until the new Hotspot build system is integrated.)
An example on how this looks:
----8<-----
make4[2]: *** Waiting for unfinished jobs....
ERROR: Build failed for target 'default' in configuration 'make4' (exit
code 2)
=== Output from failing command(s) repeated here ===
* For target BUILD_LIBINSTRUMENT_Utilities.c:
/localhome/hg/jdk9-dev-DOH/jdk/src/java.instrument/share/native/libinstrument/Utilities.c:37:1:
error: unknown type name ‘intt’
intt apa2;
^
=== End of repeated output ===
=== Make failure sequence repeated here ===
Lib-java.instrument.gmk:59: recipe for target
'/localhome/hg/jdk9-dev-DOH/build/make4/support/native/java.instrument/libinstrument/Utilities.o'
failed
make/Main.gmk:171: recipe for target 'java.instrument-libs' failed
=== End of repeated output ===
Hint: Try searching the build log for the name of the first failed target.
Hint: If caused by a warning, try configure --disable-warnings-as-errors.
----8<-----
In case no failed targets were found, at least some assistance is printed:
----8<-----
make[2]: *** Waiting for unfinished jobs....
ERROR: Build failed for target 'default' in configuration
'linux-x86_64-normal-server-release' (exit code 2)
No indication of failed target found.
Hint: Try searching the build log for '] Error'.
Hint: If caused by a warning, try configure --disable-warnings-as-errors.
----8<-----
Bug: https://bugs.openjdk.java.net/browse/JDK-8062618
WebRev:
http://cr.openjdk.java.net/~ihse/JDK-8062618-failure-summary/webrev.01
/Magnus
More information about the build-dev
mailing list