[CDRIVER-1343] Incorrect pkgconfig files produced when linking with static OpenSSL library Created: 23/Jun/16 Updated: 13/Jul/16 Resolved: 13/Jul/16 |
|
| Status: | Closed |
| Project: | C Driver |
| Component/s: | libmongoc |
| Affects Version/s: | 1.3.5 |
| Fix Version/s: | 1.4.0 |
| Type: | Bug | Priority: | Minor - P4 |
| Reporter: | Jonathan Wang | Assignee: | Hannes Magnusson |
| Resolution: | Duplicate | Votes: | 0 |
| Labels: | driver | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Linux, clang |
||
| Issue Links: |
|
||||||||
| Description |
|
When building against a static OpenSSL library, the lib/pkgconfig/libmongoc-{1.0,priv}.pc files produced by the make install command contain the incorrect order for the libraries specified by the linker flags. The Libs line of those files looks like this:
However, that link order is incorrect because `mongoc-1.0` requires symbols from the OpenSSL libraries, so the current ordering of the mongoDB library and the OpenSSL libraries is backwards. Therefore, the `Libs` line should look like this instead:
|
| Comments |
| Comment by Hannes Magnusson [ 13/Jul/16 ] | ||
|
This is actually a duplicate of | ||
| Comment by Jonathan Wang [ 27/Jun/16 ] | ||
|
When I tried to build the new C++ driver, it used those flags from the pkgconfig. That caused the C++ driver build to break on the linking steps. | ||
| Comment by Hannes Magnusson [ 27/Jun/16 ] | ||
|
Out of curiosity, how did you discover this? Did it break something? | ||
| Comment by A. Jesse Jiryu Davis [ 23/Jun/16 ] | ||
|
Thanks for the report; we'll fix in the next release. | ||
| Comment by Jonathan Wang [ 23/Jun/16 ] | ||
|
Description with the correct formatting: When building against a static OpenSSL library, the lib/pkgconfig/libmongoc-1.0.pc & lib/pkgconfig/libmongoc-priv.pc files produced by the make install command contain the incorrect order for the libraries specified by the linker flags. The Libs line of the lib/pkgconfig/libmongoc-1.0.pc file looks like this:
However, that link order is incorrect because mongoc-1.0 requires symbols from the OpenSSL libraries, so the current ordering of the mongoDB library and the OpenSSL libraries is backwards. Therefore, the Libs line should look like this instead:
The same goes for the lib/pkgconfig/libmongoc-priv.pc file as well, except with mongoc-priv instead of mongoc-1.0 in the Libs line. |