Compiling snmp++\agent++ without threads


We have been using an older version of snmp++\agent++, and are planning to upgrade in the near future. The current versions are agent++ v3.5.31 and snmp++ v3.2.25. We have not upgraded yet as we would first like to figure out how to compile the new versions in single thread mode as well.

We have been able to compile the new snmp++ (v3.3.12) using the “–disable-threads” option, this does not appear to cause any issues. However, when we try to compile version v4.2.0 of agent++, we run into the following error:

ib.Tpo -c agentpp_config_mib.cpp -fPIC -DPIC -o .libs/agentpp_config_mib.o In file included from …/include/agent_pp/mib.h:35:0,
from …/include/agent_pp/agentpp_config_mib.h:28,
from agentpp_config_mib.cpp:39:
…/include/agent_pp/request.h:893:17: error: ‘Synchronized’ does not name a type
virtual Synchronized::TryLockResult trylock_request(Request*);
make[2]: *** [agentpp_config_mib.lo] Error 1

It looks like this is related to the “single threaded” snmp++ library. Is there a way to set agent++ to single threaded as well, or would we have to modify the source before compiling?



AGENT++ does not work single threaded. Although AGENT++ in theory could work single threaded, it has not been developed for that since version 2.x and AgentX++ definitely needs multi-threading to work properly with at least 2 threads (4 or more is better).

Hope this helps anyway.

Best regards,