Uploaded image for project: 'C Driver'
  1. C Driver
  2. CDRIVER-3805

Build fails with system zlib in non-standard location

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • None
    • 1.18.0, 1.17.3, 1.18.0-alpha
    • build, cmake
    • None

    Description

      As reported by a user in the Community Forum, when zlib is installed to a non-standard location and the C driver build is given the option -DENABLE_ZLIB=SYSTEM, the build fails because it cannot find zlib.h. This happens even if -DZLIB_ROOT=<path to>/zlib is specified as suggested in the CMake error message. For example, on Windows (which does not have "standard" locations like /usr, /usr/local, etc.), installing zlib to C:\zlib and specifying -DENABLE_ZLIB=SYSTEM -DZLIB_ROOT="C:\zlib" will result in the build failing with this error:

      [<path to>\mongo-c-driver\source\src\libmongoc\src\mongoc\mongoc-compression.c(26): fatal error C1083: Cannot open include file: 'zlib.h': No such file or directory [<path to>\mongo-c-driver\build\src\libmongoc\mongoc_shared.vcxproj]
      

      Attachments

        Activity

          People

            roberto.sanchez@mongodb.com Roberto Sanchez
            roberto.sanchez@mongodb.com Roberto Sanchez
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: