This is a discussion on rfv: fix more lib dependencies within the SNMP Coders forums, part of the Networking and Network Related category; This is a multi-part message in MIME format. --------------070202000603060008030102 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
This is a multi-part message in MIME format.
--------------070202000603060008030102 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Following up the IRC admin meeting, I'm hereby proposing a patch that makes the "as needed" support (fulfill library dependencies at library link time rather than application link time) more complete. It adds libwrap, libnm (HP-UX), libperfstat (AIX) and libadm (Solaris) to the set of candidates formerly represented by libcrypto and libsensors only. Here are a few pointers to the original problems: http://sourceforge.net/tracker/index...94&atid=312694 http://sourceforge.net/tracker/index...94&atid=312694 http://sourceforge.net/mailarchive/m...sg_id=37100401 http://mysqldump.azundris.com/archiv...Pain-SNMP.html (search for libwrap) The attached patch fixes the linking behavior *by default*. It's much easier to understand this way (IMHO) and it'd be pretty straightforward to make it depend on --enable-as-needed once the approach is agreed upon. It passed last night's build testing on the whole range of available build farm machines. I'm calling for votes to include this in 5.4. +Thomas -- Thomas Anders (thomas.anders at blue-cable.de) --------------070202000603060008030102 Content-Type: text/x-patch; name="asneeded2.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="asneeded2.patch" Index: configure.in ================================================== ================= RCS file: /cvsroot/net-snmp/net-snmp/configure.in,v retrieving revision 5.289 diff -u -r5.289 configure.in --- configure.in 26 Oct 2006 11:14:02 -0000 5.289 +++ configure.in 28 Oct 2006 01:16:30 -0000 @@ -3265,27 +3265,15 @@ AC_CHECK_HEADERS(sys/dkio.h sys/diskio.h sys/pstat.h linux/hdreg.h pkglocs.h) # for HostRes (Solaris 2.x at least) AC_CHECK_HEADERS(pkginfo.h, - AC_CHECK_LIB(adm, pkginfo, AC_DEFINE(HAVE_PKGINFO) - LIBS="${LIBS} -ladm" - AGENTLIBS="${AGENTLIBS} -ladm")) - -case $target_os in - aix*) # AIX perfstat library, needed for CPU/memory statistics - AC_CHECK_HEADERS(libperfstat.h, - AC_CHECK_LIB(perfstat, perfstat_cpu_total, AC_DEFINE(HAVE_PERFSTAT) - AGENTLIBS="${AGENTLIBS} -lperfstat"), AC_MSG_ERROR([ - -*** To monitor CPU/memory values in AIX you need to install -*** libperfstat which can be found in bos.perf -])) - ;; - hpux*) # HP-UX agent needs open_mib - AC_CHECK_LIB(nm, open_mib, AC_DEFINE(HAVE_LIBNM) - AGENTLIBS="${AGENTLIBS} -lnm") - ;; - *) - ;; -esac + AC_CHECK_LIB(adm, pkginfo, + AC_DEFINE(HAVE_PKGINFO) + LMIBLIBS="${LMIBLIBS} -ladm")) +AC_CHECK_LIB(perfstat, perfstat_cpu_total, + LMIBLIBS="${LMIBLIBS} -lperfstat") +AC_CHECK_LIB(nm, open_mib, + LMIBLIBS="${LMIBLIBS} -lnm") +AC_SUBST(LMIBLIBS) + # WIN32 # (mingw32 must link winsock explicitly) AC_CHECK_HEADERS(winsock.h,[ Index: agent/Makefile.in ================================================== ================= RCS file: /cvsroot/net-snmp/net-snmp/agent/Makefile.in,v retrieving revision 5.23 diff -u -r5.23 Makefile.in --- agent/Makefile.in 19 Oct 2006 15:50:07 -0000 5.23 +++ agent/Makefile.in 28 Oct 2006 01:16:35 -0000 @@ -79,7 +79,7 @@ LOCAL_LIBS = PERLLDOPTS = @PERLLDOPTS@ LIBS = ../snmplib/libnetsnmp.$(LIB_EXTENSION)$(LIB_VERSION) @AGENTLIBS@ $(PERLLDOPTS) -OUR_AGENT_LIBS = $(INSTALLLIBS) $(HELPERLIB) @WRAPLIBS@ $(LIBS) @DLLIBS@ +OUR_AGENT_LIBS = $(INSTALLLIBS) $(HELPERLIB) $(LIBS) @DLLIBS@ CPPFLAGS = $(TOP_INCLUDES) -I. $(AGENT_INCLUDES) $(MIBGROUP_INCLUDES) \ $(SNMPLIB_INCLUDES) @CPPFLAGS@ @@ -133,11 +133,11 @@ libnetsnmpagent.$(LIB_EXTENSION)$(LIB_VERSION): ${LLIBAGENTOBJS} - $(LIB_LD_CMD) libnetsnmpagent.$(LIB_EXTENSION)$(LIB_VERSION) ${LLIBAGENTOBJS} $(LIB_LD_LIBS) + $(LIB_LD_CMD) libnetsnmpagent.$(LIB_EXTENSION)$(LIB_VERSION) ${LLIBAGENTOBJS} $(LIB_LD_LIBS) @WRAPLIBS@ $(RANLIB) libnetsnmpagent.$(LIB_EXTENSION)$(LIB_VERSION) libnetsnmpmibs.$(LIB_EXTENSION)$(LIB_VERSION): ${LMIBOBJS} - $(LIB_LD_CMD) libnetsnmpmibs.$(LIB_EXTENSION)$(LIB_VERSION) ${LMIBOBJS} $(LIB_LD_LIBS) @SENSORLIBS@ + $(LIB_LD_CMD) libnetsnmpmibs.$(LIB_EXTENSION)$(LIB_VERSION) ${LMIBOBJS} $(LIB_LD_LIBS) @LMIBLIBS@ @SENSORLIBS@ $(RANLIB) libnetsnmpmibs.$(LIB_EXTENSION)$(LIB_VERSION) agentlib: libnetsnmpagent.$(LIB_EXTENSION)$(LIB_VERSION) --------------070202000603060008030102 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=...057&dat=121642 --------------070202000603060008030102 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Net-snmp-coders mailing list Net-snmp-coders@lists.sourceforge.net https://lists.sourceforge.net/lists/...et-snmp-coders --------------070202000603060008030102-- |