Re: net-snmp compilation problem still unresolved

Bart Van Assche <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <[email protected]>
On Fri, May 7, 2010 at 11:59 PM, Group <[email protected]> wrote:

> My Configuration:
>
> net-snmp version: net-snmp-5.4.2.1
> environment: cygwin
> operating system: windows XP
>
> ran configure command:
> $ ./configure --without-perl-modules --disable-embedded-perl
> --without-openssl -with-out-mib-module
> s="snmpv3mibs ucd_snmp mibII notification utilities disman/event agentx
> agent_mibs disman/schedule"
>
> ran make command
> $ make
> I'm getting following warnings...and ending up with undefined references...
>
> Warnings:
>
> /bin/sh ../libtool  --mode=link gcc -g -O2 -Ucygwin -Dcygwin=cygwin  -rpath
> /usr/local/lib -version-
> info 16:2:1 -o libnetsnmpagent.la snmp_agent.lo snmp_vars.lo
> agent_read_config.lo agent_registry.lo
> agent_index.lo agent_trap.lo kernel.lo agent_handler.lo   ../snmplib/
> libnetsnmp.la
>
> *** Warning: This system can not link to static lib archive ../snmplib/
> libnetsnmp.la.
> *** I have the capability to make that library automatically link in when
> *** you link to this library.  But I can only do this if you have a
> *** shared version of the library, which you do not appear to have.
> libtool: link: warning: undefined symbols not allowed in i686-pc-cygwin
> shared libraries
> ar cru .libs/libnetsnmpagent.a  snmp_agent.o snmp_vars.o
> agent_read_config.o agent_registry.o agent_
> index.o agent_trap.o kernel.o agent_handler.o
> ...
> *** Warning: This system can not link to static lib archive helpers/
> libnetsnmphelpers.la.
> *** I have the capability to make that library automatically link in when
> *** you link to this library.  But I can only do this if you have a
> *** shared version of the library, which you do not appear to have.
>
> *** Warning: This system can not link to static lib archive
> libnetsnmpagent.la.
> *** I have the capability to make that library automatically link in when
> *** you link to this library.  But I can only do this if you have a
> *** shared version of the library, which you do not appear to have.
>
> *** Warning: This system can not link to static lib archive ../snmplib/
> libnetsnmp.la.
> *** I have the capability to make that library automatically link in when
> *** you link to this library.  But I can only do this if you have a
> *** shared version of the library, which you do not appear to have.
> libtool: link: warning: undefined symbols not allowed in i686-pc-cygwin
> shared libraries
> ar cru .libs/libnetsnmpmibs.a
> mibgroup/notification-log-mib/notification_log.o mibgroup/notificatio
> n/snmpNotifyTable.o mibgroup/target/snmpTargetAddrEntry.o
> mibgroup/target/snmpTargetParamsEntry.o mi
> bgroup/target/target.o mibgroup/target/target_counters.o
> mibgroup/header_complex.o mibgroup/util_fun
> cs.o mib_modules.o auto_nlist.o
> ranlib .libs/libnetsnmpmibs.a
> creating libnetsnmpmibs.la
> (cd .libs && rm -f libnetsnmpmibs.la && ln -s ../libnetsnmpmibs.la
> libnetsnmpmibs.la)
> : libnetsnmpmibs.la
> /bin/sh ../libtool  --mode=compile gcc -I../include -I. -I../agent
> -I../agent/mibgroup -I../snmplib
>   -g -O2 -Ucygwin -Dcygwin=cygwin  -c -o snmpd.lo snmpd.c
>  gcc -I../include -I. -I../agent -I../agent/mibgroup -I../snmplib -g -O2
> -Ucygwin -Dcygwin=cygwin -c
>  snmpd.c  -DDLL_EXPORT -DPIC -o .libs/snmpd.o
> snmpd.c: In function `main':
> snmpd.c:963: warning: assignment discards qualifiers from pointer target
> type
>  gcc -I../include -I. -I../agent -I../agent/mibgroup -I../snmplib -g -O2
> -Ucygwin -Dcygwin=cygwin -c
>  snmpd.c -o snmpd.o >/dev/null 2>&1
> /bin/sh ../libtool  --mode=link gcc -g -O2 -Ucygwin -Dcygwin=cygwin  -o
> snmpd.exe snmpd.lo  -L../snm
> plib/.libs -L../snmplib -L./.libs -L./helpers/.libs -L./helpers
> libnetsnmpagent.la helpers/libnetsn
> mphelpers.la libnetsnmpmibs.la ../snmplib/libnetsnmp.la  -liphlpapi
> gcc -g -O2 -Ucygwin -Dcygwin=cygwin -o snmpd.exe .libs/snmpd.o
> -L/home/test/net-snmp-5.4.2.1/agen
> t/.libs -L/home/test/net-snmp-5.4.2.1/agent/helpers/.libs
> -L/home/test/net-snmp-5.4.2.1/snmplib/
> .libs -L/home/test/net-snmp-5.4.2.1/snmplib
> -L/home/test/net-snmp-5.4.2.1/agent/helpers ./.libs/
> libnetsnmpagent.a helpers/.libs/libnetsnmphelpers.a
> ./.libs/libnetsnmpmibs.a /home/test/net-snmp-5
> .4.2.1/agent/helpers/.libs/libnetsnmphelpers.a
> /home/test/net-snmp-5.4.2.1/agent/.libs/libnetsnmpa
> gent.a /home/test/net-snmp-5.4.2.1/snmplib/.libs/libnetsnmp.a
> ../snmplib/.libs/libnetsnmp.a -liphl
> papi
> .libs/snmpd.o(.text+0x1ee4): In function `receive':
> /home/test/net-snmp-5.4.2.1/agent/snmpd.c:1112: undefined reference to
> `_sigrelse'
> ./.libs/libnetsnmpagent.a(agent_read_config.o)(.text+0x550): In function
> `update_config':
> /home/test/net-snmp-5.4.2.1/agent/agent_read_config.c:285: undefined
> reference to `_vacm_standard_
> views'
> ./.libs/libnetsnmpmibs.a(util_funcs.o)(.text+0x3d1): In function
> `get_exec_output':
> /home/test/net-snmp-5.4.2.1/agent/mibgroup/util_funcs.c:277: undefined
> reference to `_run_exec_com
> mand'
> ./.libs/libnetsnmpmibs.a(snmpNotifyTable.o)(.text+0x4a): In function
> `_checkFilter':
> /home/test/net-snmp-5.4.2.1/agent/mibgroup/notification/snmpNotifyTable.c:122:
> undefined reference
>  to `_get_FilterProfileName'
>
> ./.libs/libnetsnmpmibs.a(snmpNotifyTable.o)(.text+0x5c):/home/test/net-snmp-5.4.2.1/agent/mibgroup
> /notification/snmpNotifyTable.c:138: undefined reference to
> `_snmpNotifyFilterTable_vacm_view_subtre
> e'
> collect2: ld returned 1 exit status
> make[1]: *** [snmpd.exe] Error 1
> make[1]: Leaving directory `/home/test/net-snmp-5.4.2.1/agent'
> make: *** [subdirs] Error 1
>
> Please help me out in fixing this issue. I'm trying since long time but
> have not yet made any successful attempt.
> Thanks in advance.
>

Does Net-SNMP 5.4.2.1 build OK on your Cygwin setup with "./configure
--with-defaults --without-perl-modules" ?

Regarding your questions:
* The libtool warning is harmless as far as I know.
* The linker error on  _snmpNotifyFilterTable_vacm_view_subtree is reported
because the notification-log-mib is included (implicitly) but the
notification MIB has been excluded (explicitly).
* The linker error on _run_exec_command is reported because a MIB has been
included (implicitly?) that requires agent/mibgroup/utils_funcs.c but the
"utilities" MIB module has been excluded (explicitly).
* The linker error on vacm_standard_views is caused by excluding mibII,
which also excludes mibII/vacm_conf. vacm_standard_views is defined in
mibII/vacm_conf.c.
* The linker error on sigrelse() looks like a Cygwin issue. Are you perhaps
using an old Cygwin version ? Recent Cygwin versions should have sigrelse().
See e.g. http://www.cygwin.com/ml/cygwin/2005-04/msg00660.html and
http://www.mail-archive.com/[email protected]/msg03475.html.

Bart.

------------------------------------------------------------------------------

_______________________________________________
Net-snmp-users mailing list
[email protected]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.