Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-99854

[MSVC] gzlib failed due to error C2065: 'O_RDONLY': undeclared identifier

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P2: Important
    • Resolution: Invalid
    • Affects Version/s: 6.2.0
    • Fix Version/s: None
    • Component/s: Build System: CMake
    • Labels:
      None
    • Platform/s:
      Windows

      Description

      The MSVC's recently changes broken zlib when building QT6, the CRT does not define those macros because they are not standard C, can you help look? Our workaround: add "/D_CRT_DECLARE_NONSTDC_NAMES" to define them. The next version of VS will have this behavior.

      Repro steps:

      1. open VS 2019 x64 Tools command
      2. git clone git://code.qt.io/qt/qt5 F:\gitP\qt\qt6
      3. cd F:\gitP\qt\qt6
      4. git checkout 6.2
      5. perl init-repository
      6. mkdir F:\gitP\qt\qt6\build_amd64
      7. cd F:\gitP\qt\qt6\build_amd64
      8. ..\configure -developer-build -release -confirm-license -opensource -nomake tests
      9. cmake --build . --parallel --verbose

      Error info:
      F:\gitP\qt\qt6\qtbase\src\3rdparty\zlib\src\gzlib.c
      F:\gitP\qt\qt6\qtbase\src\3rdparty\zlib\src\gzlib.c(231): error C2065: 'O_RDONLY': undeclared identifier
      F:\gitP\qt\qt6\qtbase\src\3rdparty\zlib\src\gzlib.c(232): error C2065: 'O_WRONLY': undeclared identifier
      F:\gitP\qt\qt6\qtbase\src\3rdparty\zlib\src\gzlib.c(232): error C2065: 'O_CREAT': undeclared identifier
      F:\gitP\qt\qt6\qtbase\src\3rdparty\zlib\src\gzlib.c(237): error C2065: 'O_TRUNC': undeclared identifier
      F:\gitP\qt\qt6\qtbase\src\3rdparty\zlib\src\gzlib.c(238): error C2065: 'O_APPEND': undeclared identifier

        Attachments

        For Gerrit Dashboard: QTBUG-99854
        # Subject Branch Project Status CR V

          Activity

            People

            Assignee:
            qtbuildsystem Qt Build System Team
            Reporter:
            quellazhang Quella Zhang
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes