-
Bug
-
Resolution: Fixed
-
P4
-
None
-
None
-
b56
-
windows
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8081898 | emb-9 | Magnus Ihse Bursie | P4 | Resolved | Fixed | b56 |
If the top-level directory of the forest contains mixed case elements in the path, then the script which checks for native C/C++ headers dependencies doesn't work properly.
This happens because Visual Studio compiler sometimes (?) produce lower-case only paths when invoked with the -showIncludes option used in the dependency tracking, and the script doesn't match these paths with the mixed case paths produced from the top-level directory.
For example, if the top-level directory is /cygdrive/c/Vadim/jdk9, then the cl.exe invocation cmdline looks like this:
/cygdrive/c/Vadim/jdk9/.../fixpath.exe -c ...cl ... -c -showIncludes ... /cygdrive/c/Vadim/jdk9/...foo.cpp | tee ... foo.d.raw
The .d.raw file contains these lines (note the lowercase path):
Note: including file: c:\vadim\jdk9-cpu\jdk\src\java.desktop\share\native\foo.h
Then the script process .d.raw file like this:
sed -e '/^Note: including file:/!d' \
-e 's|Note: including file: *||' \
-e 's|\\|/|g' \
-e 's|^\([a-zA-Z]\):|/cygdrive/\1|g' \
-e '/\/cygdrive\/c\/Vadim\/jdk9/!d' \
-e 's|$$$$| \\|g' \
foo.d.raw > foo.d
and so the part which contains mixed case "/cygrive/c/Vadim" doesn't match "/cygdrive/c/vadim" processed from the file.
The workaround for this is to use lowercase path in the cygwin shell and reconfigure.
This happens because Visual Studio compiler sometimes (?) produce lower-case only paths when invoked with the -showIncludes option used in the dependency tracking, and the script doesn't match these paths with the mixed case paths produced from the top-level directory.
For example, if the top-level directory is /cygdrive/c/Vadim/jdk9, then the cl.exe invocation cmdline looks like this:
/cygdrive/c/Vadim/jdk9/.../fixpath.exe -c ...cl ... -c -showIncludes ... /cygdrive/c/Vadim/jdk9/...foo.cpp | tee ... foo.d.raw
The .d.raw file contains these lines (note the lowercase path):
Note: including file: c:\vadim\jdk9-cpu\jdk\src\java.desktop\share\native\foo.h
Then the script process .d.raw file like this:
sed -e '/^Note: including file:/!d' \
-e 's|Note: including file: *||' \
-e 's|\\|/|g' \
-e 's|^\([a-zA-Z]\):|/cygdrive/\1|g' \
-e '/\/cygdrive\/c\/Vadim\/jdk9/!d' \
-e 's|$$$$| \\|g' \
foo.d.raw > foo.d
and so the part which contains mixed case "/cygrive/c/Vadim" doesn't match "/cygdrive/c/vadim" processed from the file.
The workaround for this is to use lowercase path in the cygwin shell and reconfigure.
- backported by
-
JDK-8081898 Mixed case Windows path break native dependency checks
-
- Resolved
-