delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2005/03/04/15:13:04

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Message-ID: <4228C139.1000103@familiehaase.de>
Date: Fri, 04 Mar 2005 21:12:41 +0100
From: "Gerrit P. Haase" <gp AT familiehaase DOT de>
Organization: Esse keine toten Tiere
User-Agent: Mozilla/5.0 (Windows; U; WinNT4.0; en-US; rv:1.7.3) Gecko/20040910
MIME-Version: 1.0
To: Aparna R <aparnar AT comneti DOT com>
CC: cygwin AT cygwin DOT com
Subject: Re: Buiding net-snmp perl in cygwin - Please anyone help me
References: <BAY19-F159C0F9A67369B39631779B55B0 AT phx DOT gbl> <Pine DOT GSO DOT 4 DOT 61 DOT 0503030307090 DOT 2585 AT slinky DOT cs DOT nyu DOT edu> <002101c51fce$e2d4fb60$a47a6f87 AT comnet64> <4227313B DOT 6060902 AT familiehaase DOT de> <010001c52071$a8f1a850$a47a6f87 AT comnet64>
In-Reply-To: <010001c52071$a8f1a850$a47a6f87@comnet64>
X-IsSubscribed: yes

Hi,

comments below.

> Currently I uninstalled activeperl and I am having cygwin perl alone and
> correspondingly I changed the Path variable to D:\cygwin\bin.
> 
> Herewith I am attcahing the output of "perl Makefile.PL", "make" 
> 
> $ make
> [...snip...]
> 
> LD_RUN_PATH="" ld2  -s -L/usr/local/lib agent.o  -o .../blib/arch/auto/NetSNMP/agent/agent.dll /usr/lib/perl5/5.8/cygwin/CORE/libperl.dll.a -L/usr/local/lib -lnetsnmpagent -lnetsnmpmibs -lnetsnmphelpers -lnetsnmp -lm
> gcc -shared -o agent.dll -Wl,--out-implib=libagent.dll.a -Wl,--export-all-symbols -Wl,--enable-auto-import -Wl,--stack,8388608 \
> -s -L/usr/local/lib agent.o /usr/lib/perl5/5.8/cygwin/CORE/libperl.dll.a -L/usr/local/lib -lnetsnmpagent -lnetsnmpmibs -lnetsnmphelpers -lnetsnmp -lm
> Creating library file: libagent.dll.a
> /usr/local/lib/libnetsnmpmibs.a(udpTable.o)(.text+0x580): In function `udpTable_load':/cygdrive/d/net-snmp-5.2.1/agent/mibgroup/mibII/udpTable.c:568: undefined reference to `_GetUdpTable AT 12'
> /usr/local/lib/libnetsnmpmibs.a(udpTable.o)(.text+0x726):/cygdrive/d/net-snmp-5.2.1/agent/mibgroup/mibII/udpTable.c:575: undefined reference to `_GetUdpTable AT 12'
> /usr/local/lib/libnetsnmpmibs.a(tcpTable.o)(.text+0x65a): In function `tcpTable_load':/cygdrive/d/net-snmp-5.2.1/agent/mibgroup/mibII/tcpTable.c:659: undefined reference to `_GetTcpTable AT 12'
> /usr/local/lib/libnetsnmpmibs.a(tcpTable.o)(.text+0x828):/cygdrive/d/net-snmp-5.2.1/agent/mibgroup/mibII/tcpTable.c:666: undefined reference to `_GetTcpTable AT 12'
> /usr/local/lib/libnetsnmpmibs.a(var_route.o)(.text+0x39e): In function `var_ipRouteEntry':/cygdrive/d/net-snmp-5.2.1/agent/mibgroup/mibII/var_route.c:1492: undefined reference to `_GetIpForwardTable AT 12'
> /usr/local/lib/libnetsnmpmibs.a(var_route.o)(.text+0x5a9):/cygdrive/d/net-snmp-5.2.1/agent/mibgroup/mibII/var_route.c:1499: undefined reference to `_GetIpForwardTable AT 12'
> /usr/local/lib/libnetsnmpmibs.a(extend.o)(.text+0x537): In function `extend_load_cache':/cygdrive/d/net-snmp-5.2.1/agent/mibgroup/agent/extend.c:218: undefined reference to `_run_shell_command'
> /usr/local/lib/libnetsnmpmibs.a(extend.o)(.text+0x6a1):/cygdrive/d/net-snmp-5.2.1/agent/mibgroup/agent/extend.c:220: undefined reference to `_run_exec_command'
> /usr/local/lib/libnetsnmpmibs.a(extensible.o)(.text+0x9b7): In function `var_extensible_shell':/cygdrive/d/net-snmp-5.2.1/agent/mibgroup/ucd-snmp/extensible.c:470: undefined reference to `_run_shell_command'
> /usr/local/lib/libnetsnmpmibs.a(extensible.o)(.text+0xa60):/cygdrive/d/net-snmp-5.2.1/agent/mibgroup/ucd-snmp/extensible.c:467: undefined reference to `_run_exec_command'
> /usr/local/lib/libnetsnmpmibs.a(extensible.o)(.text+0xab4):/cygdrive/d/net-snmp-5.2.1/agent/mibgroup/ucd-snmp/extensible.c:459: undefined reference to `_run_shell_command'
> /usr/local/lib/libnetsnmpmibs.a(extensible.o)(.text+0xaef):/cygdrive/d/net-snmp-5.2.1/agent/mibgroup/ucd-snmp/extensible.c:456: undefined reference to `_run_exec_command'
> /usr/local/lib/libnetsnmpmibs.a(extensible.o)(.text+0xfa3): In function `var_extensible_relocatable':/cygdrive/d/net-snmp-5.2.1/agent/mibgroup/ucd-snmp/extensible.c:597: undefined reference to `_run_shell_command'
> /usr/local/lib/libnetsnmpmibs.a(extensible.o)(.text+0x10d4):/cygdrive/d/net-snmp-5.2.1/agent/mibgroup/ucd-snmp/extensible.c:594: undefined reference to `_run_exec_command'
> /usr/local/lib/libnetsnmpmibs.a(extensible.o)(.text+0x114c):/cygdrive/d/net-snmp-5.2.1/agent/mibgroup/ucd-snmp/extensible.c:587: undefined reference to `_run_shell_command'
> /usr/local/lib/libnetsnmpmibs.a(extensible.o)(.text+0x1193):/cygdrive/d/net-snmp-5.2.1/agent/mibgroup/ucd-snmp/extensible.c:584: undefined reference to `_run_exec_command'
> /usr/local/lib/libnetsnmpmibs.a(udp.o)(.text+0x491): In function `udp_load':/cygdrive/d/net-snmp-5.2.1/agent/mibgroup/mibII/udp.c:462: undefined reference to `_GetUdpStatistics AT 4'
> /usr/local/lib/libnetsnmpmibs.a(icmp.o)(.text+0x541): In function `icmp_load':/cygdrive/d/net-snmp-5.2.1/agent/mibgroup/mibII/icmp.c:669: undefined reference to `_GetIcmpStatistics AT 4'
> /usr/local/lib/libnetsnmpmibs.a(tcp.o)(.text+0x521): In function `tcp_load':/cygdrive/d/net-snmp-5.2.1/agent/mibgroup/mibII/tcp.c:649: undefined reference to `_GetTcpStatistics AT 4'
> /usr/local/lib/libnetsnmpmibs.a(ip.o)(.text+0x811): In function `ip_load':/cygdrive/d/net-snmp-5.2.1/agent/mibgroup/mibII/ip.c:748: undefined reference to `_GetIpStatistics AT 4'
> /usr/local/lib/libnetsnmpmibs.a(interfaces.o)(.text+0x1c3): In function `header_ifEntry':/cygdrive/d/net-snmp-5.2.1/agent/mibgroup/mibII/interfaces.c:2562: undefined reference to `_GetIfTable AT 12'
> /usr/local/lib/libnetsnmpmibs.a(interfaces.o)(.text+0x4ad):/cygdrive/d/net-snmp-5.2.1/agent/mibgroup/mibII/interfaces.c:2573: undefined reference to `_GetIfTable AT 12'
> /usr/local/lib/libnetsnmpmibs.a(interfaces.o)(.text+0x5d9): In function `var_interfaces':/cygdrive/d/net-snmp-5.2.1/agent/mibgroup/mibII/interfaces.c:2621: undefined reference to `_GetNumberOfInterfaces AT 4'
> /usr/local/lib/libnetsnmpmibs.a(interfaces.o)(.text+0x6ed): In function `var_ifEntry':/cygdrive/d/net-snmp-5.2.1/agent/mibgroup/mibII/interfaces.c:2654: undefined reference to `_GetIfEntry AT 4'
> /usr/local/lib/libnetsnmpmibs.a(interfaces.o)(.text+0x9f2): In function `writeIfEntry':/cygdrive/d/net-snmp-5.2.1/agent/mibgroup/mibII/interfaces.c:2797: undefined reference to `_SetIfEntry AT 4'
> /usr/local/lib/libnetsnmpmibs.a(at.o)(.text+0x19f): In function `var_atEntry':/cygdrive/d/net-snmp-5.2.1/agent/mibgroup/mibII/at.c:855: undefined reference to `_GetIpNetTable AT 12'
> /usr/local/lib/libnetsnmpmibs.a(at.o)(.text+0x5dd):/cygdrive/d/net-snmp-5.2.1/agent/mibgroup/mibII/at.c:862: undefined reference to `_GetIpNetTable AT 12'
> /usr/local/lib/libnetsnmpmibs.a(at.o)(.text+0x95d): In function `write_arp':/cygdrive/d/net-snmp-5.2.1/agent/mibgroup/mibII/at.c:1135: undefined reference to `_SetIpNetEntry AT 4'
> /usr/local/lib/libnetsnmpmibs.a(at.o)(.text+0x9bb):/cygdrive/d/net-snmp-5.2.1/agent/mibgroup/mibII/at.c:1119: undefined reference to `_SetIpNetEntry AT 4'
> /usr/local/lib/libnetsnmpmibs.a(at.o)(.text+0x9e6):/cygdrive/d/net-snmp-5.2.1/agent/mibgroup/mibII/at.c:1124: undefined reference to `_SetIpNetEntry AT 4'
> /usr/local/lib/libnetsnmpmibs.a(at.o)(.text+0xa5a):/cygdrive/d/net-snmp-5.2.1/agent/mibgroup/mibII/at.c:1091: undefined reference to `_SetIpNetEntry AT 4'
> /usr/local/lib/libnetsnmpmibs.a(at.o)(.text+0xacb):/cygdrive/d/net-snmp-5.2.1/agent/mibgroup/mibII/at.c:1192: undefined reference to `_CreateIpNetEntry AT 4'
> /usr/local/lib/libnetsnmpmibs.a(at.o)(.text+0xb7e):/cygdrive/d/net-snmp-5.2.1/agent/mibgroup/mibII/at.c:1172: undefined reference to `_SetIpNetEntry AT 4'
> /usr/local/lib/libnetsnmpmibs.a(at.o)(.text+0xbbd):/cygdrive/d/net-snmp-5.2.1/agent/mibgroup/mibII/at.c:1162: undefined reference to `_SetIpNetEntry AT 4'
> /usr/local/lib/libnetsnmpmibs.a(route_write.o)(.text+0x40e): In function `write_rte':/cygdrive/d/net-snmp-5.2.1/agent/mibgroup/mibII/route_write.c:756: undefined reference to `_CreateIpForwardEntry AT 4'
> /usr/local/lib/libnetsnmpmibs.a(route_write.o)(.text+0x444):/cygdrive/d/net-snmp-5.2.1/agent/mibgroup/mibII/route_write.c:729: undefined reference to `_SetIpForwardEntry AT 4'
> /usr/local/lib/libnetsnmpmibs.a(route_write.o)(.text+0x47d):/cygdrive/d/net-snmp-5.2.1/agent/mibgroup/mibII/route_write.c:743: undefined reference to `_SetIpForwardEntry AT 4'
> /usr/local/lib/libnetsnmpmibs.a(ipAddr.o)(.text+0x93): In function `var_ipAddrEntry':/cygdrive/d/net-snmp-5.2.1/agent/mibgroup/mibII/ipAddr.c:977: undefined reference to `_GetIpAddrTable AT 12'
> /usr/local/lib/libnetsnmpmibs.a(ipAddr.o)(.text+0x358):/cygdrive/d/net-snmp-5.2.1/agent/mibgroup/mibII/ipAddr.c:981: undefined reference to `_GetIpAddrTable AT 12'
> 
> collect2: ld returned 1 exit status
> perlld: *** system() failed to execute
> gcc -shared -o
>  agent.dll -Wl,--out-implib=libagent.dll.a -Wl,--export-all-symbo
> ls -Wl,--enable-auto-import -Wl,--stack,8388608 \
> -s -L/usr/local/lib agent.o
>  /usr/lib/perl5/5.8/cygwin/CORE/libperl.dll.a -L/usr
> /local/lib -lnetsnmpagent -lnetsnmpmibs -lnetsnmphelpers -lnetsnmp -lm
> 
> make[1]: *** [../blib/arch/auto/NetSNMP/agent/agent.dll] Error 1
> make[1]: Leaving directory `/cygdrive/d/net-snmp-5.2.1/perl/agent'
> make: *** [subdirs] Error 2


So this is the full error message.  Alright, at first figure out where 
the missing symbols are defined, e.g.:

$ find /usr/local/lib -name "*.a" | xargs grep _SetIpNetEntry

Maybe in one of the snmp libraries, ie. libnetsnmpagent.a

than try to change the link order from:
-lnetsnmpagent -lnetsnmpmibs -lnetsnmphelpers -lnetsnmp
to:
-lnetsnmpmibs -lnetsnmpagent -lnetsnmphelpers -lnetsnmp

Issue the command manually in the directory where the object files are
and see if it works:
$ gcc -shared -o agent.dll \
    -Wl,--out-implib=libagent.dll.a \
    -Wl,--export-all-symbols \
    -Wl,--enable-auto-import \
    -Wl,--stack,8388608 \
    -s -L/usr/local/lib agent.o \
    usr/lib/perl5/5.8/cygwin/CORE/libperl.dll.a \
    -L/usr/local/lib -lnetsnmpmibs \
    -lnetsnmpagent -lnetsnmphelpers -lnetsnmp

If so, try to figure out what to change in Makefile.PL to reorder the
link command.

If this all fails, the submit a bug report to the address which should
be included in the README file.


Gerrit

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019