ExportXMLWordPrintableJSON

    • Not Needed
    • None
    • Fully Compatible
    • C Drivers
    • Not Needed
    • None
    • None
    • None
    • None
    • None
    • None

      Cross-compiling the MongoDB C Driver for Windows x64 on Linux with MinGW-w64 fails because several Windows header and library references use mixed-case names. These do not match the lowercase filenames provided by MinGW-w64 on a case-sensitive filesystem.

      Affected references:

      • Headers: WinDNS.h, Windows.h, Mstcpip.h
      • Libraries: Bcrypt.lib, Shlwapi.lib, Dnsapi, DbgHelp.lib

      Steps to reproduce:
      1. Configure CMake on Linux with a MinGW-w64 toolchain targeting Windows x64.
      2. Enable Windows native TLS, SSPI, SRV, and tests:

      • ENABLE_SSL=WINDOWS
      • ENABLE_SASL=SSPI
      • ENABLE_SRV=ON
      • ENABLE_TESTS=ON
        3. Build the libraries and the test-libmongoc target.

      Actual result:
      Compilation fails with missing-header errors. After correcting the header names, linking fails to locate the mixed-case library names. The BCryptDeriveKeyPBKDF2 feature check also incorrectly reports the function as unavailable because it cannot link Bcrypt.lib.

      Expected result:
      The project builds successfully using the Windows headers and import libraries supplied by MinGW-w64.

      Proposed fix:
      Use lowercase Windows header and library names compatible with MinGW-w64 on case-sensitive filesystems.

      Validation:
      With these changes, Windows x64 static libraries, DLLs, and test-libmongoc build successfully with both the native Windows TLS backend and an existing MinGW OpenSSL installation. Each configuration passes 46 selected tests under Wine; four server-dependent authentication tests are skipped. The full test suite and native Windows runtime behavior have not been verified.

            Assignee:
            Unassigned
            Reporter:
            绍钱 黄 (EXT)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: