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

Hide libbson symbols in libmongocrypt

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 1.0.1
    • Affects Version/s: None
    • Component/s: Build
    • Labels:
      None

      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

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

              Created:
              Updated:
              Resolved: