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

build-infra: Need to check the architecture of the msvcr*.dll file

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 8
    • None
    • infrastructure

      There are several problems with the current code for detecting locating a proper msvcr100.dll on Windows, which is done in TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV in toolchain_windows.m4. This bug regards how to check the correctness of the file we find.

      As reported in JDK-8001912, with a full VS2010 installation, we have both 32- and 64-bit versions of the file available at
      /cygdrive/c/Program Files (x86)/Microsoft Visual Studio 10.0//VC/redist/x64/Microsoft.VC100.CRT/
      and
      /cygdrive/c/Program Files (x86)/Microsoft Visual Studio 10.0//VC/redist/x86/Microsoft.VC100.CRT/

      However, it is very easy to point out a version of msvcr100.dll that does not match the target architecture. Therefore we should check that the one we finally chose (either due to an user option, or our own search), is correct. I propose using "file". This is the result of using "file" on the two files above:
      ./VC/redist/x64/Microsoft.VC100.CRT/msvcr100.dll: PE32+ executable (DLL) (GUI) x86-64, for MS Windows
      ./VC/redist/x86/Microsoft.VC100.CRT/msvcr100.dll: PE32 executable (DLL) (GUI) Intel 80386, for MS Windows

      So something like "file $MSVCDLL | grep x86-64" should be true for x86_64, and "file $MSVCDLL | grep 386" should be true for x86.

      This is not just a theoretical issue, we had a quite long conversation in build-infra-dev with a user with build problems (Mahesh Pujari) which turned out to be an uncorrect msvcr100.dll.

            ihse Magnus Ihse Bursie
            ihse Magnus Ihse Bursie
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: