Uploaded image for project: 'Libmongocrypt'
  1. Libmongocrypt
  2. MONGOCRYPT-485

Extra libbson-static-1.0 required in pkg-config

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Unknown Unknown
    • 1.6.1
    • None
    • None
    • None

    Description

      Scope

      • Remove unnecessary libbson-static-1.0 dependency in pkg-config.

      Background & Motivation
      Following the installation instructions .rpm Packages (RedHat, Suse, and Amazon) pkg-config reports a dependency on libbson-static-1.0:

      pkg-config --libs --cflags libmongocrypt
      -I/usr/include/mongocrypt  /usr/lib64/libbson-static-1.0.a /usr/lib64/librt.so -pthread -lmongocrypt
      

      The libbson-static-1.0.a is not required to build against the libmongocrypt shared library. libbson-static-1.0.a is not installed with those instructions.

      Attempting to compile this file results in an error:

      // test.c
      #include <mongocrypt/mongocrypt.h>
      #include <stdio.h>
       
      int main () {
          printf ("mongocrypt_version=%s", mongocrypt_version(NULL));
      }
      

      % gcc test.c $(pkg-config --libs --cflags libmongocrypt)
      gcc: error: /usr/lib64/libbson-static-1.0.a: No such file or directory
      

      Removing the dependency of libbson-1.0-static.a succeeds:

      gcc test.c -I/usr/include/mongocrypt  /usr/lib64/librt.so -pthread -lmongocrypt
      

      Attachments

        Activity

          People

            roberto.sanchez@mongodb.com Roberto Sanchez
            kevin.albertson@mongodb.com Kevin Albertson
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: