agentx++2.5.1 build failure

Updating our snmp++/agent++/agentx++ to latest and getting the following error… please help :slight_smile:

agentx.cpp: In constructor Agentpp::AgentXMaster::AgentXMaster(Agentpp::Mib*):
agentx.cpp:441:58: error: incomplete type Agentpp::snmpTargetAddrExtEntry used in nested name specifier
        _snmpTargetAddrExtEntry = snmpTargetAddrExtEntry::get_instance(mib);

Configured agentx++ via:
./configure --host=x86_64-buildroot-linux-gnu --build=x86_64-buildroot-linux-gnu --with-libsnmp-prefix=/opt/ThirdParty/snmp++-3.4.10 --with-libagent-prefix=/opt/ThirdParty/agent++-4.5.4 --prefix=/opt/ThirdParty/agentx++-2.5.1 --enable-static=no 'LDFLAGS=-L/opt/ThirdParty/snmp++-3.4.10/lib -L/opt/ThirdParty/agent++-4.5.4/lib'

Compiler: x86_64-redhat-linux-g++ (GCC) 4.8.5 20150623 (Red Hat 4.8.5-28)

Hi,

you can either enable SNMPv3 in snmp++ or disable the line if _SNMPv3 is not defined:

+#ifdef _SNMPv3
        _snmpTargetAddrExtEntry = snmpTargetAddrExtEntry::get_instance(mib);
+#endif

Thanks for reporting this issue and best regards,
Jochen

Although we will fix this for the next AgentX++ release, it is not recommended not useful to compile AgentX++ without _SNMPv3 defined in SNMP++ and AGENT++.
The AgentX++ standard uses SNMPv3 concepts (i.e. context). Thus, disabling them while using them (in some way at least) will not result in a useful setup.

Best regards,
Frank

Many thanks for the quick answer! I’ve enabled SNMPv3 in the snmp++ configure, and can build the library now. I now have the problem to set the community strings - I still want to build my agent an SNMPv2c one - but of course community strings aren’t part of SNMPv3. So maybe disabling that line as Jochen suggested would be the simplest action for now?

Thanks again