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

Avoid converting path to vcruntime140.dll to short-style path

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: P3
    • Resolution: Unresolved
    • Affects Version/s: openjdk8u
    • Fix Version/s: None
    • Component/s: infrastructure
    • Labels:
      None

      Description

      On Windows, the path to the vcruntime140.dll library might be converted to a short-style path and the dll will be copied to the JDK image as vcrunt~1.dll

      Encountered the issue when building with VS 2017, the configure log:

      configure:49364: Found vcruntime140.dll at /cygdrive/c/progra~2/micros~1/2017/profes~1/vc/Redist/MSVC/14.16.27012/x64/Microsoft.VC141.CRT/vcruntime140.dll using well-known location in VCINSTALLDIR
      configure:49368: checking found vcruntime140.dll architecture
      configure:49387: result: ok
      configure:49448: Rewriting MSVC_DLL to "/cygdrive/c/progra~2/micros~1/2017/profes~1/vc/redist/msvc/1416~1.270/x64/micros~1.crt/vcrunt~1.dll"
      configure:49512: checking for vcruntime140.dll
      configure:49514: result: /cygdrive/c/progra~2/micros~1/2017/profes~1/vc/redist/msvc/1416~1.270/x64/micros~1.crt/vcrunt~1.dll

      In JDK 11, this issue is fixed as a part of JDK-8201267 (https://mail.openjdk.java.net/pipermail/build-dev/2018-April/021563.html)

      Applying the change in toolchain_windows.m4 to 8u fixes this issue:

      common/autoconf/toolchain_windows.m4
           if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
             AC_MSG_RESULT([ok])
             MSVC_DLL="$POSSIBLE_MSVC_DLL"
      - BASIC_FIXUP_PATH(MSVC_DLL)
             AC_MSG_CHECKING([for $DLL_NAME])
             AC_MSG_RESULT([$MSVC_DLL])
           else

      new configure log from the patched build:

      configure:49120: Found vcruntime140.dll at /cygdrive/c/progra~2/micros~1/2017/profes~1/vc/Redist/MSVC/14.16.27012/x64/Microsoft.VC141.CRT/vcruntime140.dll using well-known location in VCINSTALLDIR
      configure:49124: checking found vcruntime140.dll architecture
      configure:49143: result: ok
      configure:49146: checking for vcruntime140.dll
      configure:49148: result: /cygdrive/c/progra~2/micros~1/2017/profes~1/vc/Redist/MSVC/14.16.27012/x64/Microsoft.VC141.CRT/vcruntime140.dll

        Attachments

          Activity

            People

            Assignee:
            dcherepanov Dmitry Cherepanov
            Reporter:
            dcherepanov Dmitry Cherepanov
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated: