-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
None
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]