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

Enabling the enterprise module should not alter link flags or linker search paths

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Gone away
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Build

      Description

      Currently, the build.py for the enterprise module modifies the global environment by calling env.ParseFlags on the result of net-snmp-config --agent-libs.

      The result is that any strange linkflags that netsnmp thinks should be used are propagated to the global link flags.

      On my Ubuntu 16.04 machine, this results in the following flags being parsed:

      net-snmp-config --agent-libs
      -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,now -L/usr/lib/x86_64-linux-gnu -lnetsnmpmibs -lsensors -lpci -ldl -lnetsnmpagent -lwrap -Wl,-E -lnetsnmp -lcrypto -lm
      

      We almost certainly don't want to be building with -Bsymbolic-functions. Nor do we want to be adding a -L argument into a system directory, which can interfere with the library search path for the toolchain.

      This was also the cause of SERVER-23200.

      This also lead to the puzzling fact that it appears that we were getting relro builds, when in fact that was only a side effect of the enterprise module being enabled.

        Attachments

          Activity

            People

            • Votes:
              1 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: