Menu

#2825 Do not propagate $NSC_LDFLAGS in net-snmp-config.in

linux
open
nobody
None
5
2018-02-02
2018-02-01
No

Attached patch removes propagating $NSC_LDFLAGS in net-snmp-config when this script is called with --libs, --netsnmp-libs, --external-libs, --agent-libs and --external-agent-libs

1 Attachments

Discussion

  • Wes Hardaker

    Wes Hardaker - 2018-02-02

    I fail to see how this won't break existing builds that use that script for compiling. The whole point of that script is to make it easy for people to link in all the needed libraries based on the build, especially when compiling agent modules. In other words, those libraries are in there intentionally.

    If you need a different argument with less libraries that isn't there now, I'd be happy to consider adding a new option instead!

     
    • Tomasz Kłoczko

      It does not break anything straight.
      Simple for example if some SNMP client program will be using --libs output such binary will be linked with all librares whic libs SNMP client library.
      By thi for example dependecies generators which will checking "objdump -x <snmp_client_dso> | grep NEEDED" will have all libraries on such list.
      Of course it is possible to use in such case -Wl,--as-needed linker option but it will be nothing more like only trying to fix what net-nmp-configs --libs gives wringli.</snmp_client_dso>

      If SNMP client program needs use libnetsnmp functions all what it needs is -lnetsnmp in linker options.

       
      • Bill Fenner

        Bill Fenner - 2018-02-06

        Wouldn't it just be better to use net-snmp-config --netsnmp-libs in your example?

         

Log in to post a comment.

MongoDB Logo MongoDB