RFR: JDK-8205942: Build failure on macosx after JDK-8189429

Erik Joelsson erik.joelsson at oracle.com
Wed Jun 27 22:29:46 UTC 2018


For some users, the build fails with:

dirname: illegal option -- s
usage: dirname path
usage: basename string [suffix]
        basename [-a] [-s suffix] string [...]
error: cannot read file 
/Users/danielfuchs/workspaces/jdk/jdk-dev/build/macosx-x64/support/gensrc/jdk.hotspot.agent/mach_excServer.c 

Gensrc-jdk.hotspot.agent.gmk:52: recipe for target 
'/Users/danielfuchs/workspaces/jdk/jdk-dev/build/macosx-x64/support/gensrc/jdk.hotspot.agent/mach_excServer.c' 
failed
make[3]: *** 
[/Users/danielfuchs/workspaces/jdk/jdk-dev/build/macosx-x64/support/gensrc/jdk.hotspot.agent/mach_excServer.c] 
Error 1
make/Main.gmk:112: recipe for target 'jdk.hotspot.agent-gensrc-src' failed
make[2]: *** [jdk.hotspot.agent-gensrc-src] Error 2
make[2]: *** Waiting for unfinished jobs....

I have identified two reasons for failures here and this patch makes it 
work for at least one reporter of the problem. The missing MakeTargetDir 
caues a race where the target directory may not exist yet. It seems mig 
on newer Macos handles this anyway. For some configurations, the SDKROOT 
variable does not have a value. In that case, we should not set the 
-isysroot parameter to mig. (I also changed the MKDIR in the other 
recipe to the now preferred MakeTargetDir macro)

Bug: https://bugs.openjdk.java.net/browse/JDK-8205942

Webrev: http://cr.openjdk.java.net/~erikj/8205942/webrev.01/

/Erik




More information about the build-dev mailing list