Uploaded image for project: 'WiredTiger'
  1. WiredTiger
  2. WT-9478

Extension libraries should be installed in a (versioned) subdir

    • Type: Icon: Bug Bug
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Labels:

      With the current CMake configury, the plugin libraries for extensions are installed into $PREFIX/lib without any kind of versioning. This means (among other things) that while you can have two versions of the main WiredTiger library installed, you cannot have more than one version of the extensions at a time and installing a newer version will overwrite the previous copies.

      This is not really the right thing to do.

      I think the best thing to do is to create a subdirectory of lib/ that includes the version number (e.g. $PREFIX/lib/wiredtiger-10.0.2) and install them in that directory; then each version's plugin libraries can coexist safely.

      On the minus side it becomes necessary to include the WT version in the extension load path; but I think that's inevitable for any robust scheme. (The other option is to install the libraries in $PREFIX/lib with the version number attached to the filename, but I think creating subdirs for plugin libraries is the standard practice.)

      (Is there a default plugin path that can be updated to match, so user code doesn't need to know the version number explicitly? I'm not sure.)

      I don't know how to do this in CMake but I would guess that adding a suffix to the LIBRARY_DESTINATION setting in ext///CMakeLists.txt is a good part of it.

      Also currently the plugin libraries seem to get built with no SONAME – I think this is ok for plugin libraries if they get installed into their own directory, but I wanted to mention it in case it wasn't intended or turns out to be wrong.

      Note that if we want to support two full installs of different versions at once further changes would be required (e.g. handling versioning for the include files) that probably aren't necessary, but I think it's a good idea to have things set up so that installing a new version doesn't immediately break existing binaries linked to the old version, which in general it will if install clobbers the extension libraries. It's reasonably common for packaging systems to support leaving an older version's shared library images in place.

            Assignee:
            backlog-server-storage-engines [DO NOT USE] Backlog - Storage Engines Team
            Reporter:
            dholland+wt@sauclovia.org David Holland
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: