[AGENT++] AgentX++ installation with autoconf not usable

Frank Fock fock at agentpp.com
Thu Jul 4 23:53:09 CEST 2013


Hi Claus,

The problem with the dependency to the config.h files are caused
by the dependencies of the code (agentX++ -> agent++ -> snmp++).
I currently have no idea, how this can be solved smarter, but I will
have a look at some autoconf/libtool tutorial in order to find a solution.

The problem with the missing agentx++.h can be solved by the following
patch:

Index: /agentX++/include/agentx_pp/Makefile.am
===================================================================
--- /agentX++/include/agentx_pp/Makefile.am    (revision 2404)
+++ /agentX++/include/agentx_pp/Makefile.am    (revision 2405)
@@ -19,7 +19,8 @@

  agentxppincdir = $(includedir)/agentx_pp

-agentxppinc_HEADERS = agentx.h \
+agentxppinc_HEADERS = agentx++.h \
+          agentx.h \
            agentx_pdu.h \
            agentx_session.h \
            agentx_reg.h \


Best regards,
Frank

Am 24.06.2013 23:09, schrieb Claus Klein:
> Hi
>
> After building und installing with autoconf generated makefiles on my development host
> I have problems to build AgentX++ with our build system again.
>
> The build is not independent of previous installed header files.
>
> The installed header can't be used without a lot of definitions from config.h
> which is not installed. I have to define at leased this config values from config.h on my system:
>
> -DHAVE_LOCALTIME_R
> -DHAVE_NAMESPACE_STD
> -DHAVE_NETINET_IN_H
> -DHAVE_SYS_STAT_H
> -DSNMP_PP_IPv6
> -DSTDCXX_98_HEADERS
>
> At least the header file "agentx_pp/agentx++.h" is missing at /usr/local/include on my system.
>
> Claus-Kleins-MacBook-Pro:build clausklein$ ninja
> [1/1] Re-running CMake...
> -- use ccache
> -- Configuring done
> -- Generating done
> -- Build files have been written to: /Volumes/Macintosh_HD/Users/clausklein/Workspace/cpp/AgentProV4/build
> [5/76] Building CXX object snmp++/src/CMakeFiles/snmp_pp.dir/address.cpp.o
> ../snmp++/src/address.cpp:84:2: warning: #warning Threads_defined_but_no_reentrant_GETHOSTBYADDR_function
> ../snmp++/src/address.cpp:91:2: warning: #warning Threads_defined_but_no_reentrant_GETHOSTBYNAME_function
> [15/76] Building CXX object snmp++/src/CMakeFiles/snmp_pp.dir/log.cpp.o
> ../snmp++/src/log.cpp:68: warning: 'void initLogProfiles()' defined but not used
> [65/76] Building CXX object agentX++/src/CMakeFiles/agentx_pp.dir/agentpp_agentx_mib.cpp.o
>
> FAILED: /opt/local/bin/ccache /usr/bin/g++  -DHAVE_LOCALTIME_R
> -DHAVE_NAMESPACE_STD -DHAVE_NETINET_IN_H -DHAVE_SYS_STAT_H
> -DSNMP_PP_IPv6 -DSTDCXX_98_HEADERS -Dagentx_pp_EXPORTS -fmessage-length=0 -g
> -fPIC -IagentX++/src -I../agentX++/src -I../agentX++/src/../../snmp++/include
> -I../agentX++/src/../../agent++/include -I../agentX++/src/../include
> -I/usr/local/include    -Wall -Wall -MMD -MT
> agentX++/src/CMakeFiles/agentx_pp.dir/agentpp_agentx_mib.cpp.o -MF
> "agentX++/src/CMakeFiles/agentx_pp.dir/agentpp_agentx_mib.cpp.o.d" -o
> agentX++/src/CMakeFiles/agentx_pp.dir/agentpp_agentx_mib.cpp.o -c
> ../agentX++/src/agentpp_agentx_mib.cpp
>
> In file included from ../agentX++/src/agentpp_agentx_mib.cpp:21:
> ../agentX++/src/../include/agentx_pp/agentx_def.h:24:32: warning: agentx_pp/agentx++.h: No such file or directory
> In file included from ../agentX++/src/agentpp_agentx_mib.cpp:23:
> ../agentX++/src/../include/agentx_pp/agentpp_agentx_mib.h:87: error: function definition does not declare parameters
> ../agentX++/src/../include/agentx_pp/agentpp_agentx_mib.h:124: error: function definition does not declare parameters
> ../agentX++/src/../include/agentx_pp/agentpp_agentx_mib.h:151: error: function definition does not declare parameters
> ../agentX++/src/../include/agentx_pp/agentpp_agentx_mib.h:190: error: function definition does not declare parameters
> ../agentX++/src/../include/agentx_pp/agentpp_agentx_mib.h:212: error: function definition does not declare parameters
> ../agentX++/src/agentpp_agentx_mib.cpp:58: error: expected constructor, destructor, or type conversion before '*' token
> ../agentX++/src/agentpp_agentx_mib.cpp:61: error: 'agentppAgentXExtSrcAddrValidation' has not been declared
> ../agentX++/src/agentpp_agentx_mib.cpp:61: error: ISO C++ forbids declaration of 'agentppAgentXExtSrcAddrValidation' with no type
> #
> # ...
> #
>
> claus-kleins-macbook-pro:AgentProV4 clausklein$  grep -R 'agentx++.h' /usr/local/include/agentx_pp/
> /usr/local/include/agentx_pp/agentx_def.h:#include <agentx_pp/agentx++.h>
>
> claus-kleins-macbook-pro:AgentProV4 clausklein$ find /usr/local/include/agentx_pp -name agentx++.h
> claus-kleins-macbook-pro:AgentProV4 clausklein$ find /usr/local/include/ -name agentx++.h
> claus-kleins-macbook-pro:AgentProV4 clausklein$
>
> claus-kleins-macbook-pro:AgentProV4 clausklein$ grep -R 'agentx_def.h' /usr/local/include/agentx_pp/
> /usr/local/include/agentx_pp/agentpp_agentx_mib.h:#include "agentx_def.h"
> /usr/local/include/agentx_pp/agentx.h:#include <agentx_pp/agentx_def.h>
> /usr/local/include/agentx_pp/agentx_def.h:  _##  agentx_def.h
> /usr/local/include/agentx_pp/agentx_def.h:#ifndef _agentx_def_h_
> /usr/local/include/agentx_pp/agentx_def.h:#define _agentx_def_h_
> /usr/local/include/agentx_pp/agentx_pdu.h:#include <agentx_pp/agentx_def.h>
> /usr/local/include/agentx_pp/agentx_peer.h:#include <agentx_pp/agentx_def.h>
> /usr/local/include/agentx_pp/agentx_session.h:#include <agentx_pp/agentx_def.h>
> claus-kleins-macbook-pro:AgentProV4 clausklein$
>
>
>
> Can anyone please help?
>
> Thanks in advance
> Best Regards
> Claus
>
> _______________________________________________
> AGENTPP mailing list
> AGENTPP at agentpp.org
> http://lists.agentpp.org/mailman/listinfo/agentpp

-- 
---
AGENT++
Maximilian-Kolbe-Str. 10
73257 Koengen, Germany
https://agentpp.com
Phone: +49 7024 8688230
Fax:   +49 7024 8688231



More information about the AGENTPP mailing list