[CDRIVER-3805] Build fails with system zlib in non-standard location Created: 01/Oct/20  Updated: 28/Oct/23  Resolved: 06/Oct/20

Status: Closed
Project: C Driver
Component/s: Build, cmake
Affects Version/s: None
Fix Version/s: 1.18.0, 1.17.3, 1.18.0-alpha

Type: Bug Priority: Major - P3
Reporter: Roberto Sanchez Assignee: Roberto Sanchez
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 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]



 Comments   
Comment by Githook User [ 24/Nov/20 ]

Author:

{'name': 'Roberto C. Sánchez', 'email': 'roberto@connexer.com', 'username': 'rcsanchez97'}

Message: CDRIVER-3805 fix build with system zlib in non-standard location
Branch: r1.17
https://github.com/mongodb/mongo-c-driver/commit/a6af7522a55d2743e272c82d068d22853e7c0e30

Comment by Githook User [ 06/Oct/20 ]

Author:

{'name': 'Roberto C. Sánchez', 'email': 'roberto@connexer.com', 'username': 'rcsanchez97'}

Message: CDRIVER-3805 fix build with system zlib in non-standard location
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/9a6b6006910c29689f3b8cdf997a0a0cb73c5802

Generated at Wed Feb 07 21:19:05 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.