Uploaded image for project: 'C Driver'
  1. C Driver
  2. CDRIVER-1343

Incorrect pkgconfig files produced when linking with static OpenSSL library

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Minor - P4 Minor - P4
    • 1.4.0
    • 1.3.5
    • libmongoc
    • Linux, clang

    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:

      -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
      

      Attachments

        Activity

          People

            bjori Hannes Magnusson
            jwang Jonathan Wang
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: