[AGENT++] build agent++V4.0 with autoconf tools fails on MAC OSX 10.6.8

Frank Fock fock at agentpp.com
Sun Jun 23 18:47:49 CEST 2013


Hi Claus,

Thanks for the patch. I have applied it to the source repository and it 
indeed improves
the make.

Best regards,
Frank

Am 22.06.2013 12:38, schrieb Claus Klein:
> Hi Frank,
>
> today I have tried to build agent++V4.0 with autoconf tools on my macbook.
>
>
> First I failed with errors while build libsnmp++.a out of source.
> I had to patch the Makefile.mk files.
>
> The first problem is caused by the include statement everywhere used:
>
> #include <libsnmp.h>
> ../../src/address.cpp:53:21: error: libsnmp.h: No such file or directory
>
> Why is the system header include form used?
>
>
> The second problem was caused be the out of source build, but this is common with autoconf tools.
>
> See log of "make distcheck" below.
>
>
> //Regards
> Claus
>
>
>
>
>
>
> Here is the boostrap script I used:
> #############################################
> #!/bin/sh
>
> PROJECT_DIR=${PWD}
>
> set -e  # exit on error
> set -u  # undefined var is error
> set -x  # be verbose
>
> autoreconf -i
>
> # prepare out of soure build
> mkdir -p build
> cd build
>
> # configure
> export CXXFLAGS="-idirafter ${PROJECT_DIR}"
> ${PROJECT_DIR}/configure --cache-file=config.cache \
>    --with-ssl \
> # --with-des
>
> # build
> make
>
> #FIXME optional
> make distcheck
>
> # not yet! ck
> # sudo make install
> #############################################
>
> the build log
> ...
> Making all in src
> /bin/sh ../libtool  --tag=CXX   --mode=compile g++ -DHAVE_CONFIG_H -I. -I../../src -I..  -I/Volumes/Macintosh_HD/Users/clausklein/Workspace/cpp/AgentProV4/snmp++/build/snmp++-3.3.0/_build/../include -D_THREAD_SAFE     -g -O2 -D_THREAD_SAFE  -MT address.lo -MD -MP -MF .deps/address.Tpo -c -o address.lo ../../src/address.cpp
> libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I../../src -I.. -I/Volumes/Macintosh_HD/Users/clausklein/Workspace/cpp/AgentProV4/snmp++/build/snmp++-3.3.0/_build/../include -D_THREAD_SAFE -g -O2 -D_THREAD_SAFE -MT address.lo -MD -MP -MF .deps/address.Tpo -c ../../src/address.cpp  -fno-common -DPIC -o .libs/address.o
> ../../src/address.cpp:53:21: error: libsnmp.h: No such file or directory
> ../../src/address.cpp:84:2: warning: #warning Threads_defined_but_no_reentrant_GETHOSTBYADDR_function
> ../../src/address.cpp:91:2: warning: #warning Threads_defined_but_no_reentrant_GETHOSTBYNAME_function
> In file included from /Volumes/Macintosh_HD/Users/clausklein/Workspace/cpp/AgentProV4/snmp++/build/snmp++-3.3.0/_build/../include/snmp_pp/address.h:63,
>                   from ../../src/address.cpp:55:
> /Volumes/Macintosh_HD/Users/clausklein/Workspace/cpp/AgentProV4/snmp++/build/snmp++-3.3.0/_build/../include/snmp_pp/config_snmp_pp.h:143: error: 'socklen_t' does not name a type
> ../../src/address.cpp: In member function 'int Snmp_pp::IpAddress::parse_dotted_ipstring(const char*)':
> ../../src/address.cpp:531: error: 'isdigit' was not declared in this scope
> ../../src/address.cpp: In member function 'int Snmp_pp::IpAddress::parse_coloned_ipstring(const char*)':
> ../../src/address.cpp:602: error: 'isdigit' was not declared in this scope
> ../../src/address.cpp:608: error: 'atol' was not declared in this scope
> ../../src/address.cpp:640: error: 'isdigit' was not declared in this scope
> ../../src/address.cpp:643: error: 'atoi' was not declared in this scope
> ../../src/address.cpp:706: error: 'isxdigit' was not declared in this scope
> ../../src/address.cpp:708: error: 'tolower' was not declared in this scope
> ../../src/address.cpp:751: error: 'isdigit' was not declared in this scope
> ../../src/address.cpp:754: error: 'atoi' was not declared in this scope
> ../../src/address.cpp: In member function 'virtual bool Snmp_pp::UdpAddress::parse_address(const char*)':
> ../../src/address.cpp:1768: error: 'atoi' was not declared in this scope
> make[3]: *** [address.lo] Error 1
> make[2]: *** [all-recursive] Error 1
> make[1]: *** [all] Error 2
> make: *** [distcheck] Error 1
>
> Claus-Kleins-MacBook-Pro:build clausklein$ uname -a
> Darwin claus-kleins-macbook-pro.fritz.box 10.8.0 Darwin Kernel Version 10.8.0: Tue Jun  7 16:33:36 PDT 2011; root:xnu-1504.15.3~1/RELEASE_I386 i386 i386 MacBookPro5,1 Darwin
>
> Claus-Kleins-MacBook-Pro:build clausklein$ g++ --version
> i686-apple-darwin10-g++-4.2.1 (GCC) 4.2.1 (Apple Inc. build 5666) (dot 3)
> Copyright (C) 2007 Free Software Foundation, Inc.
> This is free software; see the source for copying conditions.  There is NO
> warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
>
> Claus-Kleins-MacBook-Pro:AgentProV4 clausklein$ autoconf --version
> autoconf (GNU Autoconf) 2.69
> Copyright (C) 2012 Free Software Foundation, Inc.
> License GPLv3+/Autoconf: GNU GPL version 3 or later
> <http://gnu.org/licenses/gpl.html>, <http://gnu.org/licenses/exceptions.html>
> This is free software: you are free to change and redistribute it.
> There is NO WARRANTY, to the extent permitted by law.
>
>
>
>
>
>

-- 
---
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