[CDRIVER-2363] Vendor the bundled zlib with the Autotools build, instead of installing it Created: 10/Nov/17  Updated: 14/Dec/17  Resolved: 14/Dec/17

Status: Closed
Project: C Driver
Component/s: Build, libmongoc
Affects Version/s: None
Fix Version/s: 1.10.0

Type: Bug Priority: Major - P3
Reporter: A. Jesse Jiryu Davis Assignee: Unassigned
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to CDRIVER-2293 Add zlib and snappy linker flags if n... Closed
is related to CDRIVER-1349 Delete Autotools build system, use CM... Closed

 Description   

Our Autotools build system's approach to providing zlib on systems where it is not already installed, is to vendor its source files, then build the library and install it in the system library path along with libmongoc at build time. This is eccentric, and makes problems for users who might install zlib themselves later on.

Let's completely vendor zlib into libmongoc if not provided by the system - compile its code into libmongoc with no link-time visible changes to programs that link to libmongoc.

Once this is done, don't set ZLIB_LIBRARIES to "-lz" when with_zlib=bundled in CheckZlib.m4.

It appears to me that the CMake build system already handles this correctly, so if we do CDRIVER-1349 then this problem might go away.



 Comments   
Comment by A. Jesse Jiryu Davis [ 14/Dec/17 ]

Superseded, we're just going to delete the Autotools build system.

Comment by Githook User [ 16/Nov/17 ]

Author:

{'name': 'A. Jesse Jiryu Davis', 'username': 'ajdavis', 'email': 'jesse@mongodb.com'}

Message: CDRIVER-2293 add snappy/zlib flags to config files

When we bundle zlib and/or snappy, currently the Autotools build system
actually builds and installs the libraries alongside libmongoc. To link
statically to libmongoc in this configuration, you need to include the
full path to zlib and/or snappy in the link line.

This patch adds the full path to zlib/snappy in the CMake config file.

This is a temporary workaround until we fully vendor zlib/snappy in
CDRIVER-2363.
Branch: r1.8
https://github.com/mongodb/mongo-c-driver/commit/4f80ee8d285b1666c6ccc55e36fbf7444fbb4686

Comment by Githook User [ 16/Nov/17 ]

Author:

{'name': 'A. Jesse Jiryu Davis', 'username': 'ajdavis', 'email': 'jesse@mongodb.com'}

Message: CDRIVER-2293 add snappy/zlib flags to config files

When we bundle zlib and/or snappy, currently the Autotools build system
actually builds and installs the libraries alongside libmongoc. To link
statically to libmongoc in this configuration, you need to include the
full path to zlib and/or snappy in the link line.

This patch adds the full path to zlib/snappy in the CMake config file.

This is a temporary workaround until we fully vendor zlib/snappy in
CDRIVER-2363.
Branch: r1.8
https://github.com/mongodb/mongo-c-driver/commit/c10a4824949b3d930682862a5eea592ec98bc905

Comment by Githook User [ 16/Nov/17 ]

Author:

{'name': 'A. Jesse Jiryu Davis', 'username': 'ajdavis', 'email': 'jesse@mongodb.com'}

Message: CDRIVER-2293 add snappy/zlib flags to config files

When we bundle zlib and/or snappy, currently the Autotools build system
actually builds and installs the libraries alongside libmongoc. To link
statically to libmongoc in this configuration, you need to include the
full path to zlib and/or snappy in the link line.

This patch adds the full path to zlib/snappy in the CMake config file.

This is a temporary workaround until we fully vendor zlib/snappy in
CDRIVER-2363.
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/b927fa4a596102e6caa9e451ef72e7d934ae00e6

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