The current approach to building libmongocrypt statically links it to libbson. However, this creates problems for users who link their applications to both libmongocrypt and also directly to libbson. The problems result from potential symbol collisions between the libbson symbols which are in libmongocrypt via the static linking and the libbson symbols from the attempt to link directly to libbson.
The solution is to switch libmongocrypt to dynamically link to libbson. However, to prevent collisions with files which might be installed by the libbson package included in various distribution repositories, the libbson used by libmongocrypt must be located in a private subdirectory (e.g., /usr/lib/mongocrypt) and linkage from libmongocrypt to that particular libbson will need to be managed with rpath. Additionally, the libbson to which libmongocrypt links will need to be added to the libmongocrypt package which is provided via the PPA.
divjot.arora, could you take a look at what is proposed here and let me know if you think it might negatively affect the Go driver?
CC: kevin.albertson