[CDRIVER-2603] Remove shared lib dependencies from pkg-config link line Created: 10/Apr/18 Updated: 28/Oct/23 Resolved: 25/Apr/18 |
|
| Status: | Closed |
| Project: | C Driver |
| Component/s: | libmongoc |
| Affects Version/s: | 1.9.4 |
| Fix Version/s: | 1.10.0 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Remi Collet | Assignee: | A. Jesse Jiryu Davis |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Description |
|
/usr/lib64/pkgconfig/libmongoc-1.0.pc contains:
But applications linked against libmongoc probably don't need these library. Reported as https://bugzilla.redhat.com/1560611 |
| Comments |
| Comment by Githook User [ 25/Apr/18 ] | ||||||
|
Author: {'email': 'jesse@mongodb.com', 'username': 'ajdavis', 'name': 'A. Jesse Jiryu Davis'}Message: | ||||||
| Comment by A. Jesse Jiryu Davis [ 18/Apr/18 ] | ||||||
|
"private" does not, in my experience, actually work for static libraries. So for static libs we ship an entirely separate pkg-config file, libmongoc-static-1.0. | ||||||
| Comment by Remi Collet [ 18/Apr/18 ] | ||||||
|
> ... we can remove the dependency libraries .... Rather move them to "private" (as in libzip example above), so people can use them for static build With
You can use
| ||||||
| Comment by A. Jesse Jiryu Davis [ 17/Apr/18 ] | ||||||
|
Thanks for the explanation, it seems we can remove the dependency libraries from the pkg-config output for libmongoc-1.0. Thanks. | ||||||
| Comment by Remi Collet [ 17/Apr/18 ] | ||||||
|
From a quick try, manually changing libmongoc-1.0.pc to
Then building pecl/mongdb extension
Build is ok, and test suite passes. | ||||||
| Comment by Remi Collet [ 17/Apr/18 ] | ||||||
|
> Fedora packages should depend on OpenSSL, zLib, SASL, and Snappy. Indeed, this is now fixed. But having some library used by mongo-c-driver, doesn't mean that every client application will use symbols from this library, so that the have to be linked against this "private" library. | ||||||
| Comment by A. Jesse Jiryu Davis [ 13/Apr/18 ] | ||||||
|
OK, I think the answer is, our Fedora packages should depend on OpenSSL, zLib, SASL, and Snappy. I don't think this is a bug in our code. See Roberto's explanation in the linked ticket, his comment here: | ||||||
| Comment by A. Jesse Jiryu Davis [ 12/Apr/18 ] | ||||||
|
Remi, our latest Debian package configuration does depend on zlib and snappy: https://github.com/mongodb/mongo-c-driver/blob/debian/debian/control It maybe should also depend on libresolv (I've opened | ||||||
| Comment by A. Jesse Jiryu Davis [ 10/Apr/18 ] | ||||||
|
Thanks Remi, we'll take a look. | ||||||
| Comment by Remi Collet [ 10/Apr/18 ] | ||||||
|
Same issue affects some other projects, for ex, see how this was fixed in libzip |