net-snmp-5.4.1.2_2 mib2c errors

Sean Bruno sbruno at miralink.com
Sun Oct 19 19:10:18 UTC 2008


It looks like net-snmp's mib2c tools need to use "gindent" instead of 
the installed version of indent.  I've generated a small patch for 
net-snmp that seems to resolve the issue inside of mib2c and clears the 
error.  Also "gindent" would have to be added as a dependency of net-snmp.

Here is the output of mib2c-update when using "indent" instead of 
"gindent" from ports.

[sbruno at desdemona ~/work/src/ankeny/src/miralink/sbin/snmp]$ mib2c-update
Starting regneration of ml using mib2c.table_data.conf at 2008-10-19_12.01
Creating patch for your custom code
  checking files in 
/home/sbruno/work/src/ankeny/src/miralink/sbin/snmp/.orig/ 
(/home/sbruno/work/src/ankeny/src/miralink/sbin/snmp/.orig)
/home/sbruno/work/src/ankeny/src/miralink/sbin/snmp
   no custom code changes found.
mib2c  -c mib2c.table_data.conf  ml
writing to ml.h
writing to ml.c
running indent on ml.h
indent: Command line: unknown parameter "-orig"
running indent on ml.c
indent: Command line: unknown parameter "-orig"
/home/sbruno/work/src/ankeny/src/miralink/sbin/snmp
Checking for updates to generated code
  checking files in 
/home/sbruno/work/src/ankeny/src/miralink/sbin/snmp/.orig/ 
(/home/sbruno/work/src/ankeny/src/miralink/sbin/snmp/.orig)
/home/sbruno/work/src/ankeny/src/miralink/sbin/snmp
Generated code has not changed.


Here is a patch that resolves the build issue:
[sbruno at desdemona /usr/local/bin]$ diff -u mib2c.orig mib2c
--- mib2c.orig  2008-10-19 12:08:13.000000000 -0700
+++ mib2c       2008-10-19 12:07:10.000000000 -0700
@@ -235,7 +235,7 @@
     next if ($i eq "-");
     next if (!($i =~ /\.[ch]$/));
     print STDERR "running indent on $i\n" if (!$quiet);
-    system("indent -orig -nbc -bap -nut -nfca -T size_t -T 
netsnmp_mib_handler -T netsnmp_handler_registration -T 
netsnmp_delegated_cache -T netsnmp_mib_handler_methods -T 
netsnmp_old_api_info -T netsnmp_old_api_cache -T netsnmp_set_info -T 
netsnmp_request_info -T netsnmp_set_info -T netsnmp_tree_cache -T 
netsnmp_agent_request_info -T netsnmp_cachemap -T netsnmp_agent_session 
-T netsnmp_array_group_item -T netsnmp_array_group -T 
netsnmp_table_array_callbacks -T netsnmp_table_row -T netsnmp_table_data 
-T netsnmp_table_data_set_storage -T netsnmp_table_data_set -T 
netsnmp_column_info -T netsnmp_table_registration_info -T 
netsnmp_table_request_info -T netsnmp_iterator_info -T netsnmp_data_list 
-T netsnmp_oid_array_header -T netsnmp_oid_array_header_wrapper -T 
netsnmp_oid_stash_node -T netsnmp_pdu -T netsnmp_request_list -T 
netsnmp_callback_pass -T netsnmp_callback_info -T netsnmp_transport -T 
netsnmp_transport_list -T netsnmp_tdomain $i");
+    system("gindent -orig -nbc -bap -nut -nfca -T size_t -T 
netsnmp_mib_handler -T netsnmp_handler_registration -T 
netsnmp_delegated_cache -T netsnmp_mib_handler_methods -T 
netsnmp_old_api_info -T netsnmp_old_api_cache -T netsnmp_set_info -T 
netsnmp_request_info -T netsnmp_set_info -T netsnmp_tree_cache -T 
netsnmp_agent_request_info -T netsnmp_cachemap -T netsnmp_agent_session 
-T netsnmp_array_group_item -T netsnmp_array_group -T 
netsnmp_table_array_callbacks -T netsnmp_table_row -T netsnmp_table_data 
-T netsnmp_table_data_set_storage -T netsnmp_table_data_set -T 
netsnmp_column_info -T netsnmp_table_registration_info -T 
netsnmp_table_request_info -T netsnmp_iterator_info -T netsnmp_data_list 
-T netsnmp_oid_array_header -T netsnmp_oid_array_header_wrapper -T 
netsnmp_oid_stash_node -T netsnmp_pdu -T netsnmp_request_list -T 
netsnmp_callback_pass -T netsnmp_callback_info -T netsnmp_transport -T 
netsnmp_transport_list -T netsnmp_tdomain $i");
   }
 }


-- 
Sean Bruno
MiraLink Corporation
6015 NE 80th Ave, Ste 100
Portland, OR 97218
Cell 503-358-6832
Phone 503-621-5143
Fax 503-621-5199
MSN: sbruno at miralink.com
Google:  seanwbruno at gmail.com



More information about the freebsd-ports mailing list