I am trying to use snmp4j-smi-pro compile Cisco mib files, that get from cisco-mibs/v2 at main · cisco/cisco-mibs · GitHub
among them, CISCO-LWAPP-AP-MIB.my and CISCO-LWAPP-DOT11-MIB.my import one OID from each other, caused circular dependency – so no matter which file I compiles first, always fail since unknown dependent.
How to work around this issue?
First of all, as a MIB Designer you should avoid circular dependencies - I think it is obvious that isn’t a good idea
You can try to put both MIB definitions into a single file. That could fix the issue for SNMP4J-SMI-PRO (although that depends on the concrete MIB modules and how the dependencies are defined).
A workaround that would work in any case, is the following:
- Remove (or comment out) the IMPORT in MIB A and the corresponding object(s) that references MIB module B.
- Compile MIB A and B.
- Read the objects and imports removed/commented out in step 1 in MIB module A and recompile MIB A.
Hope this helps.