[15] RFR: JDK-8249255: Build fails if source code in cygwin home dir

Erik Joelsson erik.joelsson at oracle.com
Mon Jul 13 20:47:44 UTC 2020


This is a fix for the problem reported by Ty in this thread: 
https://mail.openjdk.java.net/pipermail/build-dev/2020-July/027917.html

The problem is the --disable-absolute-paths-in-output option, which is 
default set to disable on release builds. When not allowing absolute 
paths, we rewrite absolute paths to relative in several types of build 
command lines. This rewrite relies on the WORKSPACE_ROOT variable to be 
fully resolved. Currently, if the workspace is located inside the cygwin 
root dir, the WORKSPACE_ROOT variable will have a path looking like 
"/home/user/jdk" while all other paths that we resolve files from will 
look like "/cygdrive/c/cygwin64/home/user/jdk". This causes the rewrite 
to fail and results in build errors like this:

c1xx: fatal error C1083: Cannot open source file: 
'../../../..c:/cygwin64/home/young/jdk-master/jdk-master/build/windows-x86_64-server-release/hotspot/variant-server/libjvm/objs/BUILD_LIBJVM_pch.cpp': 
No such file or directory

The fix is to make sure WORKSPACE_ROOT in basics.m4 only gets values 
that have been fixed using UTIL_FIXUP_PATH.

(This issue rarely occurs within Oracle, where Jib is already changing 
the working to be on the /cygdrive format, which is why we haven't seen 
it reported internally so far.)

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

Webrev: http://cr.openjdk.java.net/~erikj/8249255/webrev.01/index.html

/Erik




More information about the build-dev mailing list