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

Fix tcmalloc library path in elf file when tcmalloc is enabled in evergreen

    • Type: Icon: Improvement Improvement
    • Resolution: Gone away
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Build-compile
    • Labels:
    • 8
    • StorEng - Defined Pipeline
    • Not Needed

      As follow-on work from WT-7885, we have recently enabled tcmalloc in our evergreen testing. This required a local tcmalloc library to be built per machine. On a local development machine, we would need to export LD_LIBRARY_PATH to the path of the local tcmalloc library once before compiling wiredtiger binaries. However evergreen works a little differently. Evergreen copies over wiredtiger binaries into different machines, and starts to perform testing on them. The problem appears because we export the LD_LIBRARY_PATH to the local tcmalloc library in a different machine we are testing on. Because the path of the tcmalloc library installed is now different on another machine, can't find the location of the library. Therefore this forced us to update each variant's LD_LIBRARY_PATH to the location of the built tcmalloc when running each test.

      This ticket aims to remove the repetitive setting of LD_LIBRARY_PATH environment variable, through manually patching the wiredtiger libraries (elf files) post compilation. The idea is to patch the tcmalloc path within the wiredtiger libraries into a relative path. Both patchelf and install_name_tool --change (darwin machines) commands can be used for this purpose.

      Note: patchelf is not installed in the evergreen machines, and will need to consult build team to install the command.

            Assignee:
            backlog-server-storage-engines [DO NOT USE] Backlog - Storage Engines Team
            Reporter:
            jie.chen@mongodb.com Jie Chen
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: