[CDRIVER-2293] Add zlib and snappy linker flags if needed in CMake and pkg-config files Created: 19/Sep/17  Updated: 28/Oct/23  Resolved: 16/Nov/17

Status: Closed
Project: C Driver
Component/s: None
Affects Version/s: None
Fix Version/s: 1.8.2

Type: Improvement Priority: Major - P3
Reporter: Hannes Magnusson Assignee: A. Jesse Jiryu Davis
Resolution: Fixed Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
is depended on by CXX-1448 Compression related build issues on E... Closed
Related
is related to CDRIVER-2363 Vendor the bundled zlib with the Auto... Closed

 Description   

Our Autotools build system's approach to providing snappy and zlib on systems where they are not already installed, was to vendor their source files, then build the libraries and install them in system library paths along with libmongoc at build time. Eventually we shouldn't do this (CDRIVER-2363). Meanwhile, add linker flags to the installed CMake config files and pkg-config files so programs can automatically link to zlib and snappy when they link to libmongoc.



 Comments   
Comment by Githook User [ 16/Nov/17 ]

Author:

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

Message: CDRIVER-2293 remove snappy test files

Preparing to unbundle snappy entirely. Removing these files, including
binary files, avoids issues patch-testing subsequent changes in
Evergreen.
Branch: r1.8
https://github.com/mongodb/mongo-c-driver/commit/be10562786a4e4515c4aba3a9c59cd055f541a7d

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 fix merge error in config.yml
Branch: r1.8
https://github.com/mongodb/mongo-c-driver/commit/84257d2ebdc87d5ab31c375349186e35510db471

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

Comment by Githook User [ 13/Nov/17 ]

Author:

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

Message: CDRIVER-2293 remove snappy test files

Preparing to unbundle snappy entirely. Removing these files, including
binary files, avoids issues patch-testing subsequent changes in
Evergreen.
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/a9c36c1cdfd47f8b82d09e33fe20b236e638188a

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