has anyone tried a port for Solaris 2.6/SPARC?

Has anyone done this?
I tried libsmi-0.1.8 and built with bison 1.25, flex 2.5.4, and gcc either 2.7.2.3 or 2.8.1. I've found three items so far.
1. Probably minor. Shouldn't 18446744073709551615 be typed? (And the 0 a couple of lines above just for consistency.) I notice that by 0.1.9-pre9 it acquired UL but my versions of gcc want ULL.
--- lib/parser-smi.y.orig Tue Dec 14 02:54:12 1999 +++ lib/parser-smi.y Thu Jan 27 13:21:40 2000 @@ -1030,9 +1030,9 @@ $4->basetype = SMI_BASETYPE_UNSIGNED64; if ($4->listPtr) { ((Range *)$4->listPtr->ptr)->minValuePtr->basetype = SMI_BASETYPE_UNSIGNED64; - ((Range *)$4->listPtr->ptr)->minValuePtr->value.unsigned64 = 0; + ((Range *)$4->listPtr->ptr)->minValuePtr->value.unsigned64 = 0ULL; ((Range *)$4->listPtr->ptr)->maxValuePtr->basetype = SMI_BASETYPE_UNSIGNED64; - ((Range *)$4->listPtr->ptr)->maxValuePtr->value.unsigned64 = 18446744073709551615; + ((Range *)$4->listPtr->ptr)->maxValuePtr->value.unsigned64 = 18446744073709551615ULL; } setTypeParent($4, NULL, "Unsigned64"); }
2. You can't run "make check" until you have run "make install". It looks like "check" doesn't look for the mib files in the build tree. I suggest:
--- test/Makefile.am.orig Wed Oct 6 16:12:04 1999 +++ test/Makefile.am Thu Jan 27 18:16:20 2000 @@ -11,6 +11,8 @@ # @(#) $Id: Makefile.am,v 1.11 1999/10/06 06:12:04 strauss Exp $ #
+TESTMIBTOPDIR = ../mibs +TESTMIBDIR = $(TESTMIBTOPDIR)/ietf:$(TESTMIBTOPDIR)/iana:$(TESTMIBTOPDIR)/irtf:$(TESTMIBTOPDIR)/site TESTMIBS = SNMPv2-MIB IF-MIB MAU-MIB RMON2-MIB
TESTS = smilint-smiv2.test \ @@ -27,7 +29,7 @@ smidump-corba-oid.test \ parser.test
-TESTS_ENVIRONMENT = SMIPATH="@smipath@:" TESTMIBS="$(TESTMIBS)" +TESTS_ENVIRONMENT = SMIPATH="$(TESTMIBDIR)" TESTMIBS="$(TESTMIBS)"
EXTRA_DIST = $(TESTS) filter
This is one of many dumps I got from during "make check" before I ran "make install".
test:gdb ../tools/.libs/smidump core GNU gdb 4.17 Core was generated by `smidump -f smiv2 dumps/RMON2-MIB.smiv2'. Program terminated with signal 11, Segmentation Fault. Reading symbols from /home/u/NetCmmnd/source/SNMP/libsmi-0.1.8/tools/../lib/.libs/libsmi.so.1...done. Reading symbols from /usr/lib/libc.so.1...done. Reading symbols from /usr/lib/libdl.so.1...done. Reading symbols from /usr/platform/SUNW,Ultra-5_10/lib/libc_psr.so.1...done. #0 duplicateType (templatePtr=0x0, flags=0, parserPtr=0xeffff590) at data.c:2042 2042 typePtr->basetype = templatePtr->basetype; (gdb) bt #0 duplicateType (templatePtr=0x0, flags=0, parserPtr=0xeffff590) at data.c:2042 #1 0xef74eb78 in smiparse (parserPtr=0xeffff590) at parser-smi.y:1148 #2 0xef749660 in loadModule (modulename=0xeffff865 "dumps/RMON2-MIB.smiv2") at data.c:3127 #3 0xef74b618 in smiLoadModule (module=0xeffff865 "dumps/RMON2-MIB.smiv2") at smi.c:782 #4 0x11d30 in main (argc=4, argv=0xeffff714) at smidump.c:195 (gdb)
$10 can be null when passed as a parameter to duplicateType. Should that be a nested if or reported as an error condition?
3. The test scripts assume you have GNU diff. Solaris's doesn't take the same parameters. The setup of the diff program should be determined by ./configure similar to the usual search for gawk/nawk/awk. e.g. my version of GNU diff is gdiff, so look for gdiff/diff, then test the version.
participants (1)
-
Andrew Hood