-
Type: Bug
-
Resolution: Done
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: Build
-
Fully Compatible
-
ALL
-
-
Platforms 2017-03-06
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.