Details
-
Bug
-
Resolution: Fixed
-
Unknown
-
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
|