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

visibility_test1 fails to run when compiled with dynamic linking and Bazel

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 8.0.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Build
    • Fully Compatible
    • ALL

      The following command currently fails complaining about missing so files:

      python buildscripts/scons.py --build-profile=fast --ninja=disabled --link-model=dynamic +visibility_test1

      This is caused by a few issues:
      1. When we switched to cc_shared_library, the double dollar sign escape used in the runpath config stopped working and ended up passing both dollar signs to the final rpath
      2. visbility_test1 wasn't configured to use the system allocator. This caused an error because the Bazel binary would try to load tcmalloc, but SCons wouldn't have copied over the necessary tcmalloc binary because the system allocator is used in the SConstruct setup.
      3. The copy step uses copyfile, which isn't specified to copy over permissions. It's unclear why this sometimes works, but its most likely undefined behavior in the case when the destination doesn't already exist.

      Original issue thread: https://mongodb.slack.com/archives/CQDQ9R413/p1708422383657679

            Assignee:
            zack.winter@mongodb.com Zack Winter
            Reporter:
            zack.winter@mongodb.com Zack Winter
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: