nxmibc error compilation

Started by testos, February 18, 2011, 02:59:54 PM

Previous topic - Next topic

testos

Hi,

nxmibc tool can not to compile the mib declaration following :

       MODULE MANDATORY-GROUPS {zoneConfigurationGroup,
                                 zoneStatisticsGroup,
                                 zoneNotificationControlGroup,
                                 zoneNotificationGroup}

It display this complaint:
./CISCO-ZS-MIB.txt: ERROR 003: Parser error - syntax error, unexpected LEFT_BRACE_SYM, expecting ASSIGNMENT_SYM or MODULE_SYM in line 3387

You can try to compile attached file.


Best regards.

testos

#1
By the by, I'm trying to compile all these CISCO mibs, downloaded from official
ftp://ftp.cisco.com/pub/mibs/v2/ and I am getting several others compilation errors.
I can not attach large prepared .rar

Victor Kirhenshtein

Hi!

I run MIB compiler against Cisco MIBs from location you provided. Some of the MIBs really contains errors, but most compiler errors are bugs in nxmibc. I have fixed them, next release will contain improved MIB compiler. If you need, I can post a patch for MIB compiler here.

Best regards,
Victor

testos

Hi there,

Okay, I would  like you please post here a patch for a Linux server   :).  One thing I would like ask you about nxmibc: compilations are cumulatives (overwriting previous if it was already) or each new compilation remove all above?

Thank you very much for your help.

Victor Kirhenshtein

Attached. Patch file contains modified parser.l and parser.y from src/nxmibc directory, and in case you don't have flex and bison resulting C files.

Compilation is not cumulative - each time nxmibc reads all presented source MIBs and generate compiled file, erasing previously created one, if any.

Best regards,
Victor

testos

Thank you very much.

I get several errors when I do this gcc compilation:
gcc -Wall -o nxmibc -I../../include lex.yy.c y.tab.c

What is the proper way for gcc compilation?

Victor Kirhenshtein

You should put all files from the archive into src/nxmibc directory (replacing existing files) and run command make (assuming you still have configured source tree). If you remove sources you have built NetXMS from, you need to unpack them again, replace files, and then run ./configure and make as usual. If build will be successful, run make install to put resulting binary to appropriate place.

Best regards,
Victor

testos


Now all work fine.
Great, fast and perfect reply (as always), your support pokes out in the eyes from commercial products... ;)

I will sent .rar mibs for Fortinet firewalls and HP Procurve switches.

Thx