Cath Fawcet
2008-05-06 00:04:42 UTC
Hi
When installing net-snmp on an hpux 11.31, ia64 box, snmpwalk fails when
I run make test. The following is the process I've followed to get
there, and what I've tried to fix it.
net-snmp 5.4.1, non-modified; gcc 4.2.3:
Get the following errors on installing net-snmp with make (gmake gives
same errors):
-Dhpux11=hpux11 -c host/hr_swrun.c -DPIC -o host/.libs/hr_swrun.o
host/hr_swrun.c: In function 'var_hrswrun':
host/hr_swrun.c:1137: error: 'PGSHIFT' undeclared (first use in this
function)
host/hr_swrun.c:1137: error: (Each undeclared identifier is reported
only once
host/hr_swrun.c:1137: error: for each function it appears in.)
*** Error exit code 1
Stop.
Make the following modifications to hr_swrun.c at line 147:
#define PGSHIFT 12
make (/gmake) again:
-I/opt/perl_32/lib/5.8.8/IA64.ARCHREV_0-thread-multi/CORE -g -O2
-Uhpux11 -Dhpux11=hpux11 -c
mibII/route_write.c -DPIC -o mibII/.libs/route_write.o
mibII/route_write.c: In function 'addRoute':
mibII/route_write.c:122: error: 'struct radix_node' has no member named
'rn_key'
mibII/route_write.c: In function 'delRoute':
mibII/route_write.c:169: error: 'struct radix_node' has no member named
'rn_key'
*** Error exit code 1
Stop.
Make the following modifications route_write.c at line 79
#define rn_key rn_u.rn_leaf.rn_Key
make (/gmake) successful.
Run make test, all tests ok except:
59: testing full snmpwalk (SNMPv2c) against agent (may take time)... .FAIL
Summary: 58 / 59 succeeded.
*** Error exit code 1
Stop.
Tried installing it anyway (just to see how bad things are) and on
running snmpwalk, snmpd dies.
Have also tried gcc 4.1.6 with gmake (make gives same error) - both with
the code I've modified and the original net-snmp code:
gcc -I../include -I. -I../snmplib -D_POSIX_C_SOURCE=199506L
-D_REENTRANT -D_HPUX_SOURCE
-fPIC -DUSE_SITECUSTOMIZE -DNO_HASH_SEED -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64
-fno-strict-aliasing -pipe
-I/opt/perl_32/lib/5.8.8/IA64.ARCHREV_0-thread-multi/CORE -g -O2
-Uhpux11 -Dhpux11=hpux11 -c parse.c -DPIC -o .libs/parse.o
In file included from parse.c:97:
/usr/include/regex.h:118: error: static or type qualifiers in abstract
declarator
parse.c: In function 'add_mibdir':
parse.c:4720: error: storage size of 'dir_stat' isn't known
parse.c:4720: error: storage size of 'idx_stat' isn't known
gmake[1]: *** [parse.lo] Error 1
gmake[1]: Leaving directory `/var/tmp/net-snmp-5.4.1/snmplib'
gmake: *** [subdirs] Error 1
Did not try modifying anything to fix this as I thought it likely I'd be
spending time barking up the wrong tree.
Have also tried cc and can't get the whole way through configure.
Next the plan was to try gcc 3.x as it is less strict than gcc 4.x,
potentially solving compilation issues and hopefully fixing snmpwalk.
However, with make and gmake gcc 3.4.6 and 3.4.5 don't build (source
taken from gnu website rather than hpux depot as later gcc versions were).
Any suggestions for further things I could try would be appreciated. If
a previous version of gcc is likely to be the answer I could do more to
try and get that working.
Note: I've got the same version of snmp working on hpux 11.23 ia64 with
gcc 4.2.3 and make.
Thanks
-------------------------------
This email message and any attachment(s) is intended only for the
person(s) or entity(entities) to whom it is addressed. The
information it contains may be classified as IN CONFIDENCE and may be
legally privileged. If you are not the intended recipient any use,
disclosure or copying of the message or attachment(s) is strictly
prohibited. If you have received this message in error please
notify us immediately and destroy it and any attachment(s).
Thank you. The Ministry of Social Development accepts no
responsibility for changes made to this message or to any
attachment(s) after transmission from the Ministry.
-------------------------------
When installing net-snmp on an hpux 11.31, ia64 box, snmpwalk fails when
I run make test. The following is the process I've followed to get
there, and what I've tried to fix it.
net-snmp 5.4.1, non-modified; gcc 4.2.3:
Get the following errors on installing net-snmp with make (gmake gives
same errors):
-Dhpux11=hpux11 -c host/hr_swrun.c -DPIC -o host/.libs/hr_swrun.o
host/hr_swrun.c: In function 'var_hrswrun':
host/hr_swrun.c:1137: error: 'PGSHIFT' undeclared (first use in this
function)
host/hr_swrun.c:1137: error: (Each undeclared identifier is reported
only once
host/hr_swrun.c:1137: error: for each function it appears in.)
*** Error exit code 1
Stop.
Make the following modifications to hr_swrun.c at line 147:
#define PGSHIFT 12
make (/gmake) again:
-I/opt/perl_32/lib/5.8.8/IA64.ARCHREV_0-thread-multi/CORE -g -O2
-Uhpux11 -Dhpux11=hpux11 -c
mibII/route_write.c -DPIC -o mibII/.libs/route_write.o
mibII/route_write.c: In function 'addRoute':
mibII/route_write.c:122: error: 'struct radix_node' has no member named
'rn_key'
mibII/route_write.c: In function 'delRoute':
mibII/route_write.c:169: error: 'struct radix_node' has no member named
'rn_key'
*** Error exit code 1
Stop.
Make the following modifications route_write.c at line 79
#define rn_key rn_u.rn_leaf.rn_Key
make (/gmake) successful.
Run make test, all tests ok except:
59: testing full snmpwalk (SNMPv2c) against agent (may take time)... .FAIL
Summary: 58 / 59 succeeded.
*** Error exit code 1
Stop.
Tried installing it anyway (just to see how bad things are) and on
running snmpwalk, snmpd dies.
Have also tried gcc 4.1.6 with gmake (make gives same error) - both with
the code I've modified and the original net-snmp code:
gcc -I../include -I. -I../snmplib -D_POSIX_C_SOURCE=199506L
-D_REENTRANT -D_HPUX_SOURCE
-fPIC -DUSE_SITECUSTOMIZE -DNO_HASH_SEED -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64
-fno-strict-aliasing -pipe
-I/opt/perl_32/lib/5.8.8/IA64.ARCHREV_0-thread-multi/CORE -g -O2
-Uhpux11 -Dhpux11=hpux11 -c parse.c -DPIC -o .libs/parse.o
In file included from parse.c:97:
/usr/include/regex.h:118: error: static or type qualifiers in abstract
declarator
parse.c: In function 'add_mibdir':
parse.c:4720: error: storage size of 'dir_stat' isn't known
parse.c:4720: error: storage size of 'idx_stat' isn't known
gmake[1]: *** [parse.lo] Error 1
gmake[1]: Leaving directory `/var/tmp/net-snmp-5.4.1/snmplib'
gmake: *** [subdirs] Error 1
Did not try modifying anything to fix this as I thought it likely I'd be
spending time barking up the wrong tree.
Have also tried cc and can't get the whole way through configure.
Next the plan was to try gcc 3.x as it is less strict than gcc 4.x,
potentially solving compilation issues and hopefully fixing snmpwalk.
However, with make and gmake gcc 3.4.6 and 3.4.5 don't build (source
taken from gnu website rather than hpux depot as later gcc versions were).
Any suggestions for further things I could try would be appreciated. If
a previous version of gcc is likely to be the answer I could do more to
try and get that working.
Note: I've got the same version of snmp working on hpux 11.23 ia64 with
gcc 4.2.3 and make.
Thanks
-------------------------------
This email message and any attachment(s) is intended only for the
person(s) or entity(entities) to whom it is addressed. The
information it contains may be classified as IN CONFIDENCE and may be
legally privileged. If you are not the intended recipient any use,
disclosure or copying of the message or attachment(s) is strictly
prohibited. If you have received this message in error please
notify us immediately and destroy it and any attachment(s).
Thank you. The Ministry of Social Development accepts no
responsibility for changes made to this message or to any
attachment(s) after transmission from the Ministry.
-------------------------------