Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8075054

Mixed case Windows path break native dependency checks

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 9
    • None
    • infrastructure
    • None
    • b56
    • windows

        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.

              ihse Magnus Ihse Bursie
              vadim Vadim Pakhnushev
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: