Re: undefined references
Swaroop Sham <[email protected]>
| Newsgroups | gmane.network.net-snmp.user |
|---|---|
| Message-ID | <[email protected]> |
For the benefit of all : - I was using the "mfd" method to generate the template "C" code - I was using the dlmod method to extend the agent. - The problem was with my make file I had used to build the shared object. - I had missed the step of running net-snmp-config --cflags and --ldflags - Run net-snmp-config ( You can pass a number of flags ) to obtain a lot of build related information for building your shared object. - Add the results of net-snmp-config --cflags --ldflags to your make file's cflags and ldflags options - This results in a correctly built shared object - MORAL OF THE STORY : For build related information "NET-SNMP-CONFIG" is your friend. - I particularly was hosed because i had missed a compile time "inline flag" that was needed. On Wed, Jun 2, 2010 at 10:55 PM, ashwin kumar <[email protected]> wrote: > Dear Swaroop, > > When you do a mib2c compilation over the MIB it will generate two files, .c > and .h files. > theres is no much need to modify .h file but the .c files contain 'XXX' the > places where it is > required to add the code. if these parts of code are not modified then the > compilation itself wont be possible. Unreferenced lists would be generated > unless you modify the code with at least static scalar values. > check out the net-snmp tutorial section for the failure of dlmod function. > good luck. > > On Wed, Jun 2, 2010 at 7:55 AM, Swaroop Sham <[email protected]>wrote: > >> Hi , >> >> I am trying to extend the snmp agent by doing the following >> >> - I built a minimal agent by using the configure script ./configure >> --enable-mini-agent >> - I compiled "ONLY" the ifTable using mib2c with the following options: >> - Netsnmp-style-code >> - Tables where the list of rows is external to the agent. >> - An API layer that attempts to reduce the amount of SNMP specific >> knowledge required to implement the module. >> -* All other table options where set to defaults* >> - I used the "dlmod" shared object method of trying to extend the agent by >> placing the shared object name and /path/to/object in the snmpd.conf file >> - I did not modify any section of the code yet. I want to try and load the >> shared object as is. >> - When i try to start the agent , the dlopen fails : >> >> could not open /proc/net/if_inet6 >> cache has existing timer id. >> dlopen failed: /usr/lib/ifTable.so: undefined symbol: >> netsnmp_container_table_row_extract >> NET-SNMP version 5.2.3 >> >> - I did a nm -u on the shared objects and a number of un defined >> references were listed >> U malloc@@GLIBC_2.0 >> U memcpy@@GLIBC_2.0 >> U memset@@GLIBC_2.0 >> U netsnmp_baby_steps_access_multiplexer_get >> U netsnmp_baby_steps_handler_get >> U netsnmp_cache_create >> U netsnmp_cache_handler_get >> U netsnmp_check_requests_error >> U netsnmp_check_vb_type_and_size >> U netsnmp_container_find >> U netsnmp_container_table_handler_get >> U netsnmp_container_table_row_extract >> U netsnmp_create_data_list >> U netsnmp_extract_table_info >> U netsnmp_get_row_merge_handler >> U netsnmp_handler_registration_create >> U netsnmp_inject_handler >> U netsnmp_register_table >> U netsnmp_request_set_error >> U netsnmp_request_set_error_all >> U netsnmp_set_request_error >> U netsnmp_table_helper_add_indexes >> >> - Could any one help me with this ? >> >> >> thanks >> Swaroop >> >> >> >> >> ------------------------------------------------------------------------------ >> >> >> _______________________________________________ >> Net-snmp-users mailing list >> [email protected] >> Please see the following page to unsubscribe or change other options: >> https://lists.sourceforge.net/lists/listinfo/net-snmp-users >> >> > > > -- > Ashwin. > 9742738409 > ------------------------------------------------------------------------------ ThinkGeek and WIRED's GeekDad team up for the Ultimate GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the lucky parental unit. See the prize list and enter to win: http://p.sf.net/sfu/thinkgeek-promo _______________________________________________ Net-snmp-users mailing list [email protected] Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users