Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-55522

Prefix all shared libraries produced by the server build with libmongo rather than plain lib

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Major - P3
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: 6.0 Desired
    • Component/s: Build
    • Labels:
      None
    • Backwards Compatibility:
      Fully Compatible
    • Sprint:
      Dev Platform 2021-04-19, Dev Platform 2021-05-03

      Description

      In dynamic builds we produce a library called libunwind.so. Things that link to it end up with DT_NEEDED entries that reference libunwind.so. That's not a great idea: the system almost surely has a libunwind.so and it surely isn't the one we intend things to use at load time. Normally, it shouldn't be a problem because our DT_RUNPATH uses $ORIGIN or the macOS analogue, so we will look in our PREFIX_LIBDIR first. But other things can get in the way, like an errant LD_LIBRARY_PATH, since LD_LIBRARY_PATH is searched before DT_RUNPATH. This exact situation has happened to developers and led to great confusion.

      We can leverage the SCons SHLIBPREFIX variable to have all of our libraries come out with a libmongo_ prefix. So we would have libmongo_unwind.so, libmongo_tcmalloc_minimal.so.

      Due to the way libdeps works, we wouldn't need to actually replace any of the library references in our existing LIBDEPS declarations in our SConscripts, so the change required to make this safety improvement is quite small.

        Attachments

          Activity

            People

            Assignee:
            backlog-server-devplatform Backlog - Server Development Platform Team (SDP)
            Reporter:
            acm Andrew Morrow
            Participants:
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated: