building 5.3rc1 on OSX 10.4.3 w/
\--with-out-mib-modules=" mibII/mta\_sendmail" \ \--with-mib-modules="host agentx disman/event-mib smux
ucd_snmp examples/example" \ ^^^^
./configure complete fine, but 'make' fails at:
mv -f host/.libs/hr_system.lo host/hr_system.lo
/bin/sh ../../libtool --mode=compile gcc
-I../../include -I. -I../../agent
-I../../agent/mibgroup -I../../snmplib
-I/usr/local/ssl/include
-I/usr/local/berkeley-db/include
-I/usr/local/ssl/include -fno-common -DPERL_DARWIN
-no-cpp-precomp -fno-strict-aliasing -pipe
-I/usr/local/berkeley-db/include -I/usr/local/include
-I/usr/local/perl_libs/privlib/darwin-thread-multi-2level/CORE
-g -O2 -Ddarwin8 -c -o host/hr_storage.lo
host/hr_storage.c
rm -f host/.libs/hr_storage.lo
gcc -I../../include -I. -I../../agent
-I../../agent/mibgroup -I../../snmplib
-I/usr/local/ssl/include
-I/usr/local/berkeley-db/include
-I/usr/local/ssl/include -fno-common -DPERL_DARWIN
-no-cpp-precomp -fno-strict-aliasing -pipe
-I/usr/local/berkeley-db/include -I/usr/local/include
-I/usr/local/perl_libs/privlib/darwin-thread-multi-2level/CORE
-g -O2 -Ddarwin8 -c host/hr_storage.c -fno-common
-DPIC -o host/.libs/hr_storage.lo
host/hr_storage.c: In function 'var_hrstore':
host/hr_storage.c:583: warning: passing argument 3 of
'host_statistics' from incompatible pointer type
host/hr_storage.c:583: warning: pointer targets in
passing argument 4 of 'host_statistics' differ in
signedness
host/hr_storage.c:764: error: duplicate case value
host/hr_storage.c:736: error: previously used here
make[2]: *** [host/hr_storage.lo] Error 1
make[1]: *** [subdirs] Error 1
make: *** [subdirs] Error 1
removing 'host' from --with-mib-modules, 'make' &
install complete correctly.
richard
Logged In: YES
user_id=76148
try this patch
remove dup case
Logged In: YES
user_id=1401559
robert,
ok, as i was digging in storage for a fresh bottle of olive
oil, i saw your 'patch this' ...
a quick try yields:
% patch -p0 < ../darwin-mbuf.pat
patching file agent/mibgroup/host/hr_storage.c
Hunk #1 FAILED at 732.
1 out of 1 hunk FAILED -- saving rejects to file
agent/mibgroup/host/hr_storage.c.rej
% cat agent/mibgroup/host/hr_storage.c.rej
***************
*** 732,742 ****
case HRS_TYPE_SWAP:
long_return = -1;
break;
- #if defined(MBSTAT_SYMBOL)
- case HRS_TYPE_MBUF:
- long_return = mbstat.m_mbufs;
- break;
- #endif
#elif defined(TOTAL_MEMORY_SYMBOL) || defined(USE_SYSCTL_VM)
case HRS_TYPE_MEM:
long_return = memory_totals.t_rm;
--- 732,737 ----
case HRS_TYPE_SWAP:
long_return = -1;
break;
#elif defined(TOTAL_MEMORY_SYMBOL) || defined(USE_SYSCTL_VM)
case HRS_TYPE_MEM:
long_return = memory_totals.t_rm;
i'll take a closer look at what's munged a bit later ....
richard
Logged In: YES
user_id=1401559
robert,
applied your patch to a fresh copy, and got the same error
as above.
so i manually made the changes, created my own patch,
applied it, and all's OK.
for the life of me, staring at it, i can't (immediately) see
the difference between mine and yours ... must be blatanly
obvious, or something :-/ if anyone cares, i've uploaded my
patch as "mypaatch.pat".
moving on ...
with patch "mypatch.pat" applied, 5.3rc1 config'd w/:
ucd_snmp examples/example" \ --with-out-mib-modules=" mibII/mta_sendmail" \
now 'make' fails at:
...
mv -f host/.libs/hr_proc.lo host/hr_proc.lo
/bin/sh ../../libtool --mode=compile gcc -I../../include
-I. -I../../agent -I../../agent/mibgroup -I../../snmplib
-I/usr/local/ssl/include -I/usr/local/berkeley-db/include
-I/usr/local/ssl/include -fno-common -DPERL_DARWIN
-no-cpp-precomp -fno-strict-aliasing -pipe
-I/usr/local/berkeley-db/include -I/usr/local/include
-I/usr/local/perl_libs/privlib/darwin-thread-multi-2level/CORE
-g -O2 -Ddarwin8 -c -o host/hr_network.lo host/hr_network.c
rm -f host/.libs/hr_network.lo
gcc -I../../include -I. -I../../agent -I../../agent/mibgroup
-I../../snmplib -I/usr/local/ssl/include
-I/usr/local/berkeley-db/include -I/usr/local/ssl/include
-fno-common -DPERL_DARWIN -no-cpp-precomp
-fno-strict-aliasing -pipe -I/usr/local/berkeley-db/include
-I/usr/local/include
-I/usr/local/perl_libs/privlib/darwin-thread-multi-2level/CORE
-g -O2 -Ddarwin8 -c host/hr_network.c -fno-common -DPIC -o
host/.libs/hr_network.lo
host/hr_network.c: In function 'Save_HR_Network_Info':
host/hr_network.c:250: error: invalid use of undefined type
'struct ifnet'
host/hr_network.c:251: error: invalid use of undefined type
'struct ifnet'
host/hr_network.c:251: error: invalid use of undefined type
'struct ifnet'
make[2]: *** [host/hr_network.lo] Error 1
make[1]: *** [subdirs] Error 1
make: *** [subdirs] Error 1
richard
openmacnews' attempt at darwin-mbuf.pat
Logged In: YES
user_id=1401559
hi all,
fyi, with 5.3-RELEASE "out of the box", make still fails on
OSX 10.4.3 with ...
.libs/hr_storage.lo
host/hr_storage.c: In function 'var_hrstore':
host/hr_storage.c:583: warning: passing argument 3 of
'host_statistics' from incompatible pointer type
host/hr_storage.c:583: warning: pointer targets in passing
argument 4 of 'host_statistics' differ in signedness
host/hr_storage.c:764: error: duplicate case value
host/hr_storage.c:736: error: previously used here
make[2]: *** [host/hr_storage.lo] Error 1
make[1]: *** [subdirs] Error 1
make: *** [subdirs] Error 1
cheers!
Logged In: YES
user_id=848638
The host mib is not yet fully supported on OS X. Lowering prio .
Logged In: YES
user_id=76148
This patch fixes 10.4, but might break 10.3.
http://sourceforge.net/tracker/index.php?func=detail&aid=1431832&group_id=12694&atid=312694
Logged In: YES
user_id=1401559
revisiting building net-snmp v5.3.0.1 on OSX 10.4.5 ...
per
https://sourceforge.net/tracker/?func=detail&atid=112694&aid=1378570&group_id=12694
successfully applying "darwin-mbuf.pat"
(http://sourceforge.net/tracker/download.php?group_id=12694&atid=312694&file_id=167472&aid=1431832)
to "fix" host mib issues,
config w/:
./configure \ --prefix=/usr/local/net-snmp-53 \ --with-logfile=/var/Logs/snmpd.log \ --sysconfdir=/var/Conf/NetSNMPd \ --mandir=/var/Documentation/man \ --with-persistent-directory=/var/Conf/NetSNMPd \ --with-defaults \ --disable-mini-agent \ --enable-shared --enable-static \ --with-libwrap \ --with-default-snmp-version=3 \ --with-openssl=/usr/local/ssl \ --with-sys-contact=nobody@no.where \ --with-perl-modules --enable-embedded-perl \ --without-rpm \ --with-transports="UDP TCP Unix Callback" \ --with-mib-modules="host agentx disman/event smux ucd_snmp
examples/example" \ --with-out-mib-modules="mibII/mta_sendmail" \ --disable-ipv6
completes OK:
---------------------------------------------------------
Net-SNMP configuration summary:
---------------------------------------------------------
SNMP Versions Supported: 1 2c 3
Net-SNMP Version: 5.3.0.1
Building for: darwin8
Network transport support: UDP TCP Unix Callback
SNMPv3 Security Modules: usm
Agent MIB code: mibII ucd_snmp snmpv3mibs
notification notification-log-mib target agent_mibs agentx
disman/event-mib disman/schedule utilities host agentx
disman/event smux ucd_snmp examples/example
SNMP Perl modules: building -- embeddable
Embedded perl support: enabled
Authentication support: MD5 SHA1
Encryption support: DES AES
WARNING: New version of the Event MIB which may be subtly
different from the original implementation - configure with
'disman/old-event-mib' for the previous version
---------------------------------------------------------
but 'make' now fails at:
...
mv -f host/.libs/hr_proc.lo host/hr_proc.lo
/bin/sh ../../libtool --mode=compile gcc -I../../include
-I. -I../../agent -I../../agent/mibgroup -I../../snmplib
-I/usr/local/ssl/include -I/usr/local/berkeley-db/include
-I/usr/local/ssl/include -fno-common -DPERL_DARWIN
-no-cpp-precomp -fno-strict-aliasing -pipe
-Wdeclaration-after-statement
-I/usr/local/berkeley-db/include -I/usr/local/include
-I/usr/local/perl_libs/privlib/darwin-thread-multi-2level/CORE
-g -O2 -Ddarwin8 -c -o host/hr_network.lo host/hr_network.c
rm -f host/.libs/hr_network.lo
gcc -I../../include -I. -I../../agent -I../../agent/mibgroup
-I../../snmplib -I/usr/local/ssl/include
-I/usr/local/berkeley-db/include -I/usr/local/ssl/include
-fno-common -DPERL_DARWIN -no-cpp-precomp
-fno-strict-aliasing -pipe -Wdeclaration-after-statement
-I/usr/local/berkeley-db/include -I/usr/local/include
-I/usr/local/perl_libs/privlib/darwin-thread-multi-2level/CORE
-g -O2 -Ddarwin8 -c host/hr_network.c -fno-common -DPIC -o
host/.libs/hr_network.lo
host/hr_network.c: In function 'Save_HR_Network_Info':
host/hr_network.c:250: error: invalid use of undefined type
'struct ifnet'
host/hr_network.c:251: error: invalid use of undefined type
'struct ifnet'
host/hr_network.c:251: error: invalid use of undefined type
'struct ifnet'
make[2]: *** [host/hr_network.lo] Error 1
make[1]: *** [subdirs] Error 1
make: *** [subdirs] Error 1
stickin' w/ 522 ...
richard