[MONGOCRYPT-485] Extra libbson-static-1.0 required in pkg-config Created: 15/Sep/22  Updated: 28/Oct/23  Resolved: 27/Sep/22

Status: Closed
Project: Libmongocrypt
Component/s: None
Affects Version/s: None
Fix Version/s: 1.6.1

Type: Bug Priority: Unknown
Reporter: Kevin Albertson Assignee: Roberto Sanchez
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 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



 Comments   
Comment by Githook User [ 04/Oct/22 ]

Author:

{'name': 'Kevin Albertson', 'email': 'kevin.albertson@mongodb.com', 'username': 'kevinAlbs'}

Message: MONGOCRYPT-485 fix PPA link to libbson-static (#470)
Branch: r1.6
https://github.com/mongodb/libmongocrypt/commit/3c6ed94a78d427cbaf93d2fa078b8b4e305590d1

Comment by Roberto Sanchez [ 27/Sep/22 ]

Fixed by https://github.com/mongodb/libmongocrypt/pull/453

Generated at Thu Feb 08 09:08:47 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.