RFR: 8213736: Build fails with LOG=debug on F28 after JDK-8210958 (original) (raw)

Severin Gehwolf sgehwolf at redhat.com
Wed Nov 14 11:27:53 UTC 2018


Hi,

Thanks for Erik Joelsson for contributing this temporary?! fix for a build issue with LOG=debug.

The actual issue is that on some systems with make 4.x when building with LOG=debug MAKE_TEST_TARGETS receives debug output from the shell'ed make invocation. This in turn changes ALL_NAMED_TESTS which is iterated over in Main.gmk so as to produce test- targets. This fails for some of the supposed test names of: "gmake[1]:", "Leaving", "directory" or "''". All of them are bogus.

In other words, MAKE_TEST_TARGETS gets value:

make-base java-compilation copy-files idea compile-commands gmake[1]: Leaving directory ''

instead of:

make-base java-compilation copy-files idea compile-commands

This only happens the second time TestMake.gmk's print-targets is executed. Why is it executed (at least) twice? The chain is something like this:

Init.gmk => InitSupport.gmk (include) => Main.gmk (create-main-targets-include) => FindTests.gmk (include) => TestMake.gmk (print-targets) => Modules.gmk (include) => ??? => FindTests.gmk (include) => TestMake.gmk (print-targets)

As to where Modules.gmk depends on FindTests.gmk (or includes it) is a mystery to me.

The proposed fix is to add --no-print-directory flag to the main make invocation (Main.gmk).

Bug: https://bugs.openjdk.java.net/browse/JDK-8213736 webrev: http://cr.openjdk.java.net/~sgehwolf/webrevs/JDK-8213736/webrev.01/

This allows me to build with LOG=debug again.

Thoughts?

Thanks, Severin



More information about the build-dev mailing list