This is a discussion on Re: STILL A PROBLEM: (Re: Tons of errors-> "snmpd.o:1: error: stray within the SNMP Coders forums, part of the Networking and Network Related category; --===============0212496671== Content-Type: multipart/alternative; boundary="0-1194154455-1183133997=:10398" Content-Transfer-Encoding: 8bit --0-1194154455-1183133997=:10398 ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
--===============0212496671==
Content-Type: multipart/alternative; boundary="0-1194154455-1183133997=:10398" Content-Transfer-Encoding: 8bit --0-1194154455-1183133997=:10398 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Ok I am using the "-x none" as the --with-ldflags option and I have applied the patches to the Makefile.in files as you have recommended. The "error stray" errors are now gone, but I am now receiving the following linker errors: /bin/sh ../libtool --mode=compile mipsel-uclibc-g++ -I../include -I/export/home/rosent1/vegasCC/1.97/buildsys/A506/netsnmp/include -I. -I../agent -I/export/home/rosent1/vegasCC/1.97/buildsys/A506/netsnmp/agent -I../agent/mibgroup -I/export/home/rosent1/vegasCC/1.97/buildsys/A506/netsnmp/agent/mibgroup -I../snmplib -I/export/home/rosent1/vegasCC/1.97/buildsys/A506/netsnmp/snmplib -x c -Ulocalhost -Dlocalhost=localhost -c -o snmpd.lo snmpd.c mipsel-uclibc-g++ -I../include -I/export/home/rosent1/vegasCC/1.97/buildsys/A506/netsnmp/include -I. -I../agent -I/export/home/rosent1/vegasCC/1.97/buildsys/A506/netsnmp/agent -I../agent/mibgroup -I/export/home/rosent1/vegasCC/1.97/buildsys/A506/netsnmp/agent/mibgroup -I../snmplib -I/export/home/rosent1/vegasCC/1.97/buildsys/A506/netsnmp/snmplib -x c -Ulocalhost -Dlocalhost=localhost -c snmpd.c -o snmpd.o snmpd.c: In function `main': snmpd.c:948: warning: assignment discards qualifiers from pointer target type /bin/sh ../libtool --mode=link mipsel-uclibc-g++ -x c -Ulocalhost -Dlocalhost=localhost -x none -o snmpd snmpd.lo libnetsnmpmibs.la libnetsnmpagent.la helpers/libnetsnmphelpers.la ../snmplib/libnetsnmp.la -ldl -lm mipsel-uclibc-g++ -x c -Ulocalhost -Dlocalhost=localhost -x none -o snmpd snmpd.o ./.libs/libnetsnmpmibs.a ./.libs/libnetsnmpagent.a helpers/.libs/libnetsnmphelpers.a ../snmplib/.libs/libnetsnmp.a -ldl -lm ../.libs/libnetsnmpmibs.a(at.o): In function `ARP_Scan_Init': mibgroup/mibII/at.c:(.text+0xe30): undefined reference to `netsnmp_access_interface_index_find' ../.libs/libnetsnmpmibs.a(interfaces.o): In function `getIfSpeed': mibgroup/mibII/interfaces.c:(.text+0x130c): undefined reference to `netsnmp_linux_interface_get_if_speed' ../.libs/libnetsnmpmibs.a(ipAddr.o): In function `Address_Scan_Next': mibgroup/mibII/ipAddr.c:(.text+0xe68): undefined reference to `netsnmp_access_interface_index_find' ../.libs/libnetsnmpmibs.a(var_route.o): In function `Route_Scan_Reload': mibgroup/mibII/var_route.c:(.text+0xea4): undefined reference to `netsnmp_access_interface_index_find' ../.libs/libnetsnmpmibs.a(arp_linux.o): In function `_load_v4': mibgroup/ip-mib/data_access/arp_linux.c:(.text+0x574): undefined reference to `netsnmp_access_interface_index_find' ../.libs/libnetsnmpmibs.a(route_linux.o): In function `_load_ipv4': mibgroup/ip-forward-mib/data_access/route_linux.c:(.text+0x5b0): undefined reference to `netsnmp_access_interface_ioctl_ifindex_get' ../.libs/libnetsnmpmibs.a(ipaddress_ioctl.o): In function `_netsnmp_ioctl_ipaddress_container_load_v4': mibgroup/ip-mib/data_access/ipaddress_ioctl.c:(.text+0xb10): undefined reference to `netsnmp_access_interface_ioctl_ifindex_get' collect2: ld returned 1 exit status make[2]: *** [snmpd] Error 1 make[2]: Leaving directory `/export/home/rosent1/vegasCC/1.97/buildsys/A506/netsnmp/agent' make[1]: *** [subdirs] Error 1 make[1]: Leaving directory `/export/home/rosent1/vegasCC/1.97/buildsys/A506/netsnmp' make: *** [net-snmp-make] Error 2 Any ideas what these could be? Magnus Fromreide <magfr@lysator.liu.se> wrote: On Fri, Jun 29, 2007 at 09:17:59AM +0100, Dave Shield wrote: > On 28/06/07, Need Help wrote: > > 3) We also noticed this interesting bit as well. We started from scratch > > by uncompressing Net-SNMP-v5.4 and then performed a "./configure" (with the > > options shown in the post below). We then looked into the "config.log" file > > and noticed the same type errors were seen (see below), so we get these > > errors before doing a "make" at all: > > > > part of the "config.log" file: > > > > configure:7263: mipsel-uclibc-g++ -o conftest -x c conftest.c conftstm.o > > >&5 > > conftstm.o:1: error: stray '\177' in program > > conftstm.o:1: error: stray '\1' in program > > > Any ideas what is goign on here? Any recommendations you can make for our > > build team here to look into? We are using the "mips-uclibc-g++" compiler > > so perhaps this could be a problem? > > That's certainly my immediate reaction. In a way it is true, but the main problem is that he tries to use a C++ compiler to build C source. Consider a classic hello.c. This gives a working binary: g++ -x c hello.c This gives similar errors to NeedHelps: g++ -x c -c hello.c g++ -x c hello.o The problem is that in the link step you tell the compiler to treat hello.o as a C file. That fails. I have already given NeedHelp a solution/workaround in the thread "Configure "-x c" options with "--with-cflags" does not work for me." /MF --------------------------------- We won't tell. Get more on shows you hate to love (and love to hate): Yahoo! TV's Guilty Pleasures list. --------------------------------- Don't be flakey. Get Yahoo! Mail for Mobile and always stay connected to friends. --0-1194154455-1183133997=:10398 Content-Type: text/html; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Ok I am using the "-x none" as the --with-ldflags option and I have applied the patches to the Makefile.in files as you have recommended. The "error stray" errors are now gone, but I am now receiving the following linker errors:<br><br>/bin/sh ../libtool --mode=compile mipsel-uclibc-g++ -I../include -I/export/home/rosent1/vegasCC/1.97/buildsys/A506/netsnmp/include -I. -I../agent -I/export/home/rosent1/vegasCC/1.97/buildsys/A506/netsnmp/agent -I../agent/mibgroup -I/export/home/rosent1/vegasCC/1.97/buildsys/A506/netsnmp/agent/mibgroup -I../snmplib -I/export/home/rosent1/vegasCC/1.97/buildsys/A506/netsnmp/snmplib -x c -Ulocalhost -Dlocalhost=localhost -c -o snmpd.lo snmpd.c<br> mipsel-uclibc-g++ -I../include -I/export/home/rosent1/vegasCC/1.97/buildsys/A506/netsnmp/include -I. -I../agent -I/export/home/rosent1/vegasCC/1.97/buildsys/A506/netsnmp/agent -I../agent/mibgroup -I/export/home/rosent1/vegasCC/1.97/buildsys/A506/netsnmp/agent/mibgroup -I../snmplib -I/export/home/rosent1/vegasCC/1.97/buildsys/A506/netsnmp/snmplib -x c -Ulocalhost -Dlocalhost=localhost -c snmpd.c -o snmpd.o<br>snmpd.c: In function `main':<br>snmpd.c:948: warning: assignment discards qualifiers from pointer target type<br>/bin/sh ../libtool --mode=link mipsel-uclibc-g++ -x c -Ulocalhost -Dlocalhost=localhost -x none -o snmpd snmpd.lo libnetsnmpmibs.la libnetsnmpagent.la helpers/libnetsnmphelpers.la ../snmplib/libnetsnmp.la -ldl -lm<br>mipsel-uclibc-g++ -x c -Ulocalhost -Dlocalhost=localhost -x none -o snmpd snmpd.o ./.libs/libnetsnmpmibs.a ./.libs/libnetsnmpagent.a helpers/.libs/libnetsnmphelpers.a ../snmplib/.libs/libnetsnmp.a -ldl -lm<br>./.libs/libnetsnmpmibs.a(at.o): In function `ARP_Scan_Init':<br>mibgroup/mibII/at.c:(.text+0xe30): undefined reference to `netsnmp_access_interface_index_find'<br>./.libs/libnetsnmpmibs.a(interfaces.o): In function `getIfSpeed':<br>mibgroup/mibII/interfaces.c:(.text+0x130c): undefined reference to `netsnmp_linux_interface_get_if_speed'<br>./.libs/libnetsnmpmibs.a(ipAddr.o): In function `Address_Scan_Next':<br>mibgroup/mibII/ipAddr.c:(.text+0xe68): undefined reference to `netsnmp_access_interface_index_find'<br>./.libs/libnetsnmpmibs.a(var_route.o): In function `Route_Scan_Reload':<br>mibgroup/mibII/var_route.c:(.text+0xea4): undefined reference to `netsnmp_access_interface_index_find'<br>./.libs/libnetsnmpmibs.a(arp_linux.o): In function `_load_v4':<br>mibgroup/ip-mib/data_access/arp_linux.c:(.text+0x574): undefined reference to `netsnmp_access_interface_index_find'<br>./.libs/libnetsnmpmibs.a(route_linux.o): In function `_load_ipv4':<br>mibgroup/ip-forward-mib/data_access/route_linux.c:(.text+0x5b0): undefined reference to `netsnmp_access_interface_ioctl_ifindex_get'<br>./.libs/libnetsnmpmibs.a(ipaddress_ioctl.o): In function `_netsnmp_ioctl_ipaddress_container_load_v4':<br>m ibgroup/ip-mib/data_access/ipaddress_ioctl.c:(.text+0xb10): undefined reference to `netsnmp_access_interface_ioctl_ifindex_get'<br>co llect2: ld returned 1 exit status<br>make[2]: *** [snmpd] Error 1<br>make[2]: Leaving directory `/export/home/rosent1/vegasCC/1.97/buildsys/A506/netsnmp/agent'<br>make[1]: *** [subdirs] Error 1<br>make[1]: Leaving directory `/export/home/rosent1/vegasCC/1.97/buildsys/A506/netsnmp'<br>make: *** [net-snmp-make] Error 2<br><br><br>Any ideas what these could be? <br><br><br><br><br><b><i>Magnus Fromreide <magfr@lysator.liu.se></i></b> wrote:<blockquote class="replbq" style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;"> On Fri, Jun 29, 2007 at 09:17:59AM +0100, Dave Shield wrote:<br>> On 28/06/07, Need Help <snmpnoob@yahoo.com> wrote:<br>> > 3) We also noticed this interesting bit as well. We started from scratch<br>> > by uncompressing Net-SNMP-v5.4 and then performed a "./configure" (with the<br>> > options shown in the post below). We then looked into the "config.log" file<br>> > and noticed the same type errors were seen (see below), so we get these<br>> > errors before doing a "make" at all:<br>> ><br>> > part of the "config.log" file:<br>> ><br>> > configure:7263: mipsel-uclibc-g++ -o conftest -x c conftest.c conftstm.o<br>> > >&5<br>> > conftstm.o:1: error: stray '\177' in program<br>> > conftstm.o:1: error: stray '\1' in program<br>> <br>> > Any ideas what is goign on here? Any recommendations you can make for our<br>> > build team here to look into? We are using the "mips-uclibc-g++" compiler<br>> > so perhaps this could be a problem?<br>> <br>> That's certainly my immediate reaction.<br><br>In a way it is true, but the main problem is that he tries to use a<br>C++ compiler to build C source.<br><br>Consider a classic hello.c.<br><br>This gives a working binary:<br><br>g++ -x c hello.c<br><br>This gives similar errors to NeedHelps:<br><br>g++ -x c -c hello.c<br>g++ -x c hello.o<br><br>The problem is that in the link step you tell the compiler to treat hello.o as<br>a C file. That fails.<br><br>I have already given NeedHelp a solution/workaround in the thread<br>"Configure "-x c" options with "--with-cflags" does not work for me."<br><br>/MF<br></snmpnoob@yahoo.com></blockquote><br><p> <hr size=1>We won't tell. Get more on <a href="http://us.rd.yahoo.com/evt=49980/*http://tv.yahoo.com/collections/265 ">shows you hate to love</a><br>(and love to hate): <a href="http://us.rd.yahoo.com/evt=49980/*http://tv.yahoo.com/collections/265 ">Yahoo! TV's Guilty Pleasures list.</a><p> <hr size=1>Don't be flakey. <a href="http://us.rd.yahoo.com/evt=43909/*http://mobile.yahoo.com/mail">Get Yahoo! Mail for Mobile</a> and <br><a href="http://us.rd.yahoo.com/evt=43909/*http://mobile.yahoo.com/mail">always stay connected</a> to friends. --0-1194154455-1183133997=:10398-- --===============0212496671== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ --===============0212496671== 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 --===============0212496671==-- |
![]() |
| Thread Tools | |
| Display Modes | |
|
|