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

Builds with -fuse-ld=bfd fail in --link-model=dynamic

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 4.8.0
    • Affects Version/s: None
    • Component/s: Build
    • None
    • Fully Compatible
    • ALL
    • v4.4
    • Hide

      scons ... --link-model-dynamic LINKFLAGS=-fuse-ld=bfd install-core

      Show
      scons ... --link-model-dynamic LINKFLAGS=-fuse-ld=bfd install-core
    • Dev Platform 2020-10-05

      This was discovered while working on SERVER-49375. I think we never noticed because we had already made ld.gold preferred over ld.bfd before we started making real use of --link-model=dynamic, and all the platforms on which we build offer ld.gold. So we have no build coverage for this particular mode.

      The issue appears to be that ld.bfd, unlike ld.gold or ld.lld, requires that a search path be provided via --rpath-link such that dynamic libraries referenced by libraries on the link line can be found.

      This is a little awkward for us, as at link time the libraries are found scattered all over the build tree. We would probably need to do something in libdeps.py to accumulate the paths to each referenced library and annotate the node, then extract and merge the paths at link time.

      Alternatively, we could simply require ld.gold and not do this.

            Assignee:
            daniel.moody@mongodb.com Daniel Moody
            Reporter:
            andrew.morrow@mongodb.com Andrew Morrow (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: