Extra libbson-static-1.0 required in pkg-config

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: Unknown
    • 1.6.1
    • Affects Version/s: None
    • Component/s: None
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      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
      

            Assignee:
            Roberto Sanchez
            Reporter:
            Kevin Albertson
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: