From: <no...@so...> - 2002-06-24 21:05:59
|
Bugs item #565769, was opened at 2002-06-07 07:26 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=112694&aid=565769&group_id=12694 Category: library Group: None Status: Open Resolution: None Priority: 5 Submitted By: Nobody/Anonymous (nobody) Assigned to: Nobody/Anonymous (nobody) Summary: tm_gmtoff not a valid member Initial Comment: Hi... When I try to compile on an IBM RS/6000 running AIX 4.x I'm getting a abort saying that tm_gmtoff is not a valid member. I have searched through my libraries and can't find tm_gmtoff anywhere. I've also looked on some other platforms that we have here (Sun / Solaris 7 & 8). Any help would be much appreciated. Thanks ---------------------------------------------------------------------- Comment By: Bob Bothwell (rjbothwell) Date: 2002-06-24 17:05 Message: Logged In: YES user_id=558527 Dave - I was out of the office last week. The change to snmp-tc.c fixed the compilation errors, thanks. I am still getting the errors described originally when trying to run snmpd. The anonymous user offered some suggestions that I am working with now. Bob ---------------------------------------------------------------------- Comment By: Dave Shield (dts12) Date: 2002-06-14 05:29 Message: Logged In: YES user_id=88893 OK - I've fixed the mismatched quotes in the configure script. Thanks for spotting that. As far as the tm_gmtoff problem is concerned, the equivalent code in the 4.2 line checked for 'aix4' rather than 'aix'. The simplest fix is probably to change the test in snmp-tc.c back to 'aix4'. Does that fix things? Dave ---------------------------------------------------------------------- Comment By: Bob Bothwell (rjbothwell) Date: 2002-06-13 15:57 Message: Logged In: YES user_id=558527 My gcc is compiled locally - I could never get the bull stuff to install correctly. I have visual age c/c++ version 4.4 installed. I changed the compiler to xlc and ran configure again like this: ./configure --with-sys-contact="Bob" --with-sys-location="second floor" --with-persistent-directory="/var/net-snmp" --with- logfile="/usr/adm/snmpd.log" --with-cc=xlc Configure ran fine. When I ran make, it bailed out with the following: xlc -g -Daix4 -I../../include -I. -I .. -I../.. -I./../mibgroup -I./../.. -I./.. /../snmplib -I/usr/local/ssl/include -c instance.c -qlist -qlinedebug - qshowinc -qsource -o instance.o "instance.c", line 297.24: 1506-196 (E) Initialization between types "long*" and "unsigned long*" is not allowed. "instance.c", line 372.24: 1506-196 (E) Initialization between types "int*" and "unsigned int*" is not allowed. "instance.c", line 507.1: 1506-251 (S) Static function netsnmp_request_get_list_data is undefined. "instance.c", line 507.1: 1506-251 (S) Static function netsnmp_request_add_list_data is undefined. "instance.c", line 507.1: 1506-251 (S) Static function netsnmp_create_data_list is undefined. Some of these 'undefined' functions are identified as "inline void's" inside of agent_handler.h like this: inline void *netsnmp_request_get_list_data (netsnmp_request_info *request, const char *name); Something is mucked up, I just can't find it... ---------------------------------------------------------------------- Comment By: Nobody/Anonymous (nobody) Date: 2002-06-13 09:42 Message: Logged In: NO rjbothwell, I used xlc (visual age c/c++) to compile net-snmp, that works great. Did you compile gcc on your local machine, or get the rte's from bull? I've got a locally compiled gcc (ver 3.0.1). The configure script works great. I've had problems in the past with pre- complied version of gcc on AIX, usually with problems in libs and includes. You need to compile gcc yourself to make sure it actually uses the gnu libc and headers b/c the system headers shipped with AIX are not 100% compatible with gcc (they're written for xlc). Bull's rte did not link to the correct headers for gcc. I tried to make net-snmp with my gcc, and it worked. I got very few warning (4 or 5 pointer type warnings, thats it). Checked the snmpwalk exe, and i can snmp without error. Fyi, I did have to make the same changes to aix.h and disk.c that i did in my other post. ---------------------------------------------------------------------- Comment By: Bob Bothwell (rjbothwell) Date: 2002-06-13 09:14 Message: Logged In: YES user_id=558527 I've had similar issues. AIX=4.3.2, netsnmp=5.0.1, gcc version 2.95.2 19991024 (release) When I run config.guess, I get: powerpc-ibm-aix4.3.2.0 It looks like config.guess takes the output from /usr/bin/oslevel (4.3.2.0 for me) and appends it to ${IBM_ARCH}-ibm-aix I ran configure this way: ./configure --with-sys-contact="Bob" --with-sys-location="second floor" --with-persistent-directory="/var/net-snmp" --with- logfile="/usr/adm/snmpd.log" First, it appears there is a bug in configure around the check for shared libraries. Output from configure: <snip> checking if gcc supports -c -o file.lo... checking if gcc supports -fno-rtti -fno-exceptions... yes checking whether the linker (/usr/bin/ld) supports shared libraries... ./configure[4187]: shared: not found yes checking how to hardcode library paths into programs... relink checking whether stripping libraries is possible... no <snip> I fixed configure this way: 4185c4185 < allow_undefined_flag='${wl}-berok' --- > allow_undefined_flag='${wl}-berok" Output from configure looks better: <snip> checking if gcc supports -c -o file.lo... checking if gcc supports -fno-rtti -fno-exceptions... yes checking whether the linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... relink checking whether stripping libraries is possible... no <snip> I chose 3 for my default version of snmp when prompted. I cd'd into net-snmp-5.0.1 and ran make. I got this several times: gcc -g -O2 -Daix4 -I../include -I../include -I. -I.. -I. -I./.. -c snmp_client.c -o snmp_client.o In file included from snmp_client.c:64: /usr/include/arpa/inet.h:152: warning: `struct ether_addr' declared inside parameter list /usr/include/arpa/inet.h:152: warning: its scope is only this definition or declaration, which is probably not what you want. /usr/include/arpa/inet.h:153: warning: `struct ether_addr' declared inside parameter list /usr/include/arpa/inet.h:154: warning: `struct ether_addr' declared inside parameter list /usr/include/arpa/inet.h:159: warning: `struct sockaddr_dl' declared inside parameter list /usr/include/arpa/inet.h:160: warning: `struct sockaddr_dl' declared inside parameter list /usr/include/arpa/inet.h:161: warning: `struct sockaddr_dl' declared inside parameter list I'm not sure how serious this is, but it occurs whenever gcc finds an include for inet.h. Here is where make bails out: /bin/sh ../libtool --mode=compile gcc -g -O2 -Daix4 -I../include - I../include - I. -I.. -I. -I./.. -c -o snmp-tc.lo snmp-tc.c gcc -g -O2 -Daix4 -I../include -I../include -I. -I.. -I. -I./.. -c snmp- tc.c -o snmp-tc.o snmp-tc.c: In function `date_n_time': snmp-tc.c:85: structure has no member named `tm_gmtoff' snmp-tc.c:89: structure has no member named `tm_gmtoff' snmp-tc.c:90: structure has no member named `tm_gmtoff' make[1]: *** [snmp-tc.lo] Error 1 make[1]: Leaving directory `/source/utils/snmp/net-snmp- 5.0.1/snmplib' make: *** [subdirs] Error 1 If I go back and run configure this way: ./configure --with-sys-contact="Bob" --with-sys-location="second floor" --with-persistent-directory="/var/net-snmp" --with- logfile="/usr/adm/snmpd.log" --host=rs6000-ibm-aix I can successfully run make, but I noticed that the -D option for gcc on each compile changed from -Daix4 to -Daix I ran configure again without the --host option, then I added this line to aix.h (no quotes): "#define aix 1" and ran make again. I received the same compiler warnings. The -D option for gcc changed back to -Daix4. The make cruised through, but I get weird errors when I try to fire up and use snmpd. Started snmpd like this: /usr/local/sbin/snmpd -a -A -l /var/adm/snmpdt.log Here is the output from the log file: /var/adm> more snmpdt.log nlist err: neither ipforwarding nor _ipforwarding found. nlist err: neither tcpDefaultTTL nor _tcpDefaultTTL found. nlist err: neither rt_table nor _rt_table found. nlist err: neither rthashsize nor _rthashsize found. nlist err: neither rthost nor _rthost found. nlist err: neither rtnet nor _rtnet found. NET-SNMP version 5.0.1 Received SNMP packet(s) from udp:192.168.1.1:33824 Received SNMP packet(s) from udp:127.0.0.1:33825 nlist err: neither arptab_size nor _arptab_size found. nlist err: neither arptab nor _arptab found. Any thoughts or suggestions? I have an AIX system that I can experiment with if necessary Thanks! ---------------------------------------------------------------------- Comment By: Nobody/Anonymous (nobody) Date: 2002-06-11 10:07 Message: Logged In: NO Hey, the problem here is that something in the defines doesnt seem to get set properly. If you look at the file snmp-tc.c, you'll see the following: #if !defined(SYSV) && !defined(aix) && !defined(WIN32) #define timezone tm_p->tm_gmtoff #endif I assume that "aix" should be defined, seeing as we're using aix here. If you add the line: #define aix 1 to the end of include/net-snmp/system/aix.h, you won't get the error. However, there are other problems with net-snmp on AIX 4.3.3. setnmtent on AIX seems to return an int instead of a FILE *. I was able to get around this by commenting out everything in agent/mibgroup/ucd-snmp/disk.c from line 229 to line 339, and the #endif on 341. This is not really a good solution, but i was able to get net-snmp to compile after that. Make test failed, but i've tried snmpget, snmpset, and snmpwalk manually, and they all seem to work. Anyone with more insite know a real (good) solution to the AIX problems? Thanks Scott Baker ---------------------------------------------------------------------- Comment By: John Naylon (jbpn) Date: 2002-06-10 03:03 Message: Logged In: YES user_id=93926 Which version of the package are you talking about? Please cut and paste the exact error meessage from the make. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=112694&aid=565769&group_id=12694 |