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:
-L/usr/local/dy/openssl/lib -lssl -lcrypto -ldl -lrt -L${libdir} -lmongoc-1.0
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:
Libs: -L${libdir} -lmongoc-1.0 -L/usr/local/dy/openssl/lib -lssl -lcrypto -ldl -lrt
- related to
-
CDRIVER-1171 pkgconfig libmongoc-1.0.pc: fix order of of libraries
- Closed