When running a compound make line such as "make reconfigure clean
jdk-image test-image", make will first single out the "sequential"
targets reconfigure and clean, and execute them single-threaded, in
sequence, and then it will build the remaining targets in parallel.
However, the macro PrepareFailureLogs was called before this sequential
calling, meaning that the directories created by it will be destroyed
moments after by the clean target. The result is that if there is a
compile error, the build will exit with something along these lines:
/bin/cp: cannot create regular file
`/export/users/dh198349/jdk-dev2/build/linux-x64-debug/make-support/failure-logs/hotspot_variant-server_libjvm_objs_thread.o.log':
No such file or directory
lib/CompileJvm.gmk:149: recipe for target
'/export/users/dh198349/jdk-dev2/build/linux-x64-debug/hotspot/variant-server/libjvm/objs/thread.o'
failed
Bug: https://bugs.openjdk.java.net/browse/JDK-8204664
Patch inline:
diff --git a/make/Init.gmk b/make/Init.gmk
--- a/make/Init.gmk
+++ b/make/Init.gmk
@@ -298,7 +298,6 @@
main: $(INIT_TARGETS)
ifneq ($(SEQUENTIAL_TARGETS)$(PARALLEL_TARGETS), )
$(call RotateLogFiles)
- $(call PrepareFailureLogs)
$(PRINTF) "Building $(TARGET_DESCRIPTION)\n" $(BUILD_LOG_PIPE)
ifneq ($(SEQUENTIAL_TARGETS), )
# Don't touch build output dir since we might be cleaning.
That
@@ -308,6 +307,7 @@
$(SEQUENTIAL_TARGETS) )
endif
ifneq ($(PARALLEL_TARGETS), )
+ $(call PrepareFailureLogs)
$(call StartGlobalTimer)
$(call PrepareSmartJavac)
# JOBS will only be empty for a bootcycle-images recursive
call
/Magnus