Ad blocker detected: Our website is made possible by displaying online advertisements to our visitors. Please consider supporting us by disabling your ad blocker on our website.
anh wrote:after applying the patch i get this error
===> Building for cactid-0.8.6.f_1
source='snmp.c' object='snmp.o' libtool=no depfile='.deps/snmp.Po' tmpdepfile='.deps/snmp.TPo' depmode=gcc /usr/local/bin/bash ./config/depcomp gcc -DHAVE_CONFIG_H -I. -I. -I./config -I/usr/local/include/net-snmp -I/usr/local/include/net-snmp/.. -I/usr/local/include/mysql -g -O2 -c `test -f 'snmp.c' || echo './'`snmp.c
In file included from snmp.c:33:
common.h:81: stdint.h: No such file or directory
In file included from snmp.c:47:
/usr/local/include/net-snmp/../net-snmp/net-snmp-includes.h:17: stdint.h: No such file or directory
*** Error code 1
Stop in /usr/ports/net/cactid/work/cacti-cactid-0.8.6f-1.
*** Error code 1
Stop in /usr/ports/net/cactid.
Remove config.h in main directory, but leave it in /config (configure script creates it there).
Or (which is better) overwrite only patched files from attachment in previous message - old-gcc-fix.tar.gz
su-2.05b# aclocal15
su-2.05b# autoheader259
configure.ac:13: warning: do not use m4_patsubst: use patsubst or m4_bpatsubst
aclocal.m4:546: AM_CONFIG_HEADER is expanded from...
configure.ac:13: the top level
configure.ac:202: warning: do not use m4_regexp: use regexp or m4_bregexp
aclocal.m4:559: _AM_DIRNAME is expanded from...
configure.ac:202: the top level
su-2.05b# autoconf259
configure.ac:13: warning: do not use m4_patsubst: use patsubst or m4_bpatsubst
aclocal.m4:546: AM_CONFIG_HEADER is expanded from...
configure.ac:13: the top level
configure.ac:202: warning: do not use m4_regexp: use regexp or m4_bregexp
aclocal.m4:559: _AM_DIRNAME is expanded from...
configure.ac:202: the top level
su-2.05b# automake15
automake15: Makefile.am: required file `./ChangeLog' not found
su-2.05b# make
"Makefile", line 201: Could not find .deps/cactid.Po
"Makefile", line 202: Could not find .deps/locks.Po
"Makefile", line 203: Could not find .deps/nft_popen.Po
"Makefile", line 204: Could not find .deps/php.Po
"Makefile", line 205: Could not find .deps/ping.Po
"Makefile", line 206: Could not find .deps/poller.Po
"Makefile", line 207: Could not find .deps/snmp.Po
"Makefile", line 208: Could not find .deps/sql.Po
"Makefile", line 209: Could not find .deps/util.Po
make: fatal errors encountered -- cannot continue
su-2.05b# ./configure
checking build system type... i386-unknown-freebsd4.11
checking host system type... i386-unknown-freebsd4.11
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for gawk... no
checking for mawk... no
checking for nawk... nawk
checking whether make sets $(MAKE)... yes
checking for gawk... (cached) nawk
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking for style of include used by make... GNU
checking dependency style of gcc... gcc
checking how to run the C preprocessor... gcc -E
checking for a BSD-compatible install... /usr/bin/install -c
checking whether ln -s works... yes
checking for ranlib... ranlib
checking whether to enable -Wall... no
checking for kstat_lookup in -lkstat... no
checking for gethostbyname in -lnsl... no
checking for socket in -lsocket... no
checking for floor in -lm... yes
checking for pthread_exit in -lpthread... no
checking for deflate in -lz... yes
checking for egrep... grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... no
checking for unistd.h... yes
checking malloc.h usability... yes
checking malloc.h presence... yes
checking for malloc.h... yes
checking ctype.h usability... yes
checking ctype.h presence... yes
checking for ctype.h... yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking netinet/in.h usability... yes
checking netinet/in.h presence... yes
checking for netinet/in.h... yes
checking for unsigned long long... yes
checking for long long... yes
checking for an ANSI C-conforming const... yes
checking for size_t... yes
checking whether time.h and sys/time.h may both be included... yes
checking whether struct tm is in sys/time.h or time.h... time.h
checking return type of signal handlers... void
checking for gettimeofday... yes
checking for strerror... yes
checking for strtoll... yes
checking for mysql_init in -lmysqlclient... yes
checking for mysql_thread_init in -lmysqlclient... yes
checking if UCD-SNMP needs crypto support... no
checking if Net-SNMP needs crypto support... yes
checking for CRYPTO_free in -lcrypto... yes
checking for snmp_timeout in -lnetsnmp... yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating config/config.h
config.status: config/config.h is unchanged
config.status: executing default-1 commands
su-2.05b# make
source='poller.c' object='poller.o' libtool=no depfile='.deps/poller.Po' tmpdepfile='.deps/poller.TPo' depmode=gcc /usr/local/bin/bash ./config/depcomp gcc -DHAVE_CONFIG_H -I. -I. -I./config -I/usr/local/include/net-snmp -I/usr/local/include/net-snmp/.. -I/usr/local/include/mysql -g -O2 -c `test -f poller.c || echo './'`poller.c
poller.c: In function `poll_host':
poller.c:672: syntax error before `int'
poller.c:674: `buffer' undeclared (first use in this function)
poller.c:674: (Each undeclared identifier is reported only once
poller.c:674: for each function it appears in.)
poller.c:685: syntax error before `char'
poller.c:687: `result_string' undeclared (first use in this function)
poller.c:687: `delim' undeclared (first use in this function)
*** Error code 1
Ok, try this
1. Unpack latest released version of cactid
2. overwrite files from attached in this thread cactid.zip
3. remove config.h in main directory
4. overwrite files from attached old-gcc-fix.tar.gz
5. Run configure and make
su-2.05b# ./configure
checking build system type... i386-unknown-freebsd4.11
checking host system type... i386-unknown-freebsd4.11
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for gawk... no
checking for mawk... no
checking for nawk... nawk
checking whether make sets $(MAKE)... yes
checking for gawk... (cached) nawk
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking for style of include used by make... GNU
checking dependency style of gcc... gcc
checking how to run the C preprocessor... gcc -E
checking for a BSD-compatible install... /usr/bin/install -c
checking whether ln -s works... yes
checking for ranlib... ranlib
checking whether to enable -Wall... no
checking for kstat_lookup in -lkstat... no
checking for gethostbyname in -lnsl... no
checking for socket in -lsocket... no
checking for floor in -lm... yes
checking for pthread_exit in -lpthread... no
checking for deflate in -lz... yes
checking for egrep... grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... no
checking for unistd.h... yes
checking malloc.h usability... yes
checking malloc.h presence... yes
checking for malloc.h... yes
checking ctype.h usability... yes
checking ctype.h presence... yes
checking for ctype.h... yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking netinet/in.h usability... yes
checking netinet/in.h presence... yes
checking for netinet/in.h... yes
checking for unsigned long long... yes
checking for long long... yes
checking for an ANSI C-conforming const... yes
checking for size_t... yes
checking whether time.h and sys/time.h may both be included... yes
checking whether struct tm is in sys/time.h or time.h... time.h
checking return type of signal handlers... void
checking for gettimeofday... yes
checking for strerror... yes
checking for strtoll... yes
checking for mysql_init in -lmysqlclient... yes
checking for mysql_thread_init in -lmysqlclient... yes
checking if UCD-SNMP needs crypto support... no
checking if Net-SNMP needs crypto support... yes
checking for CRYPTO_free in -lcrypto... yes
checking for snmp_timeout in -lnetsnmp... yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating config/config.h
config.status: executing depfiles commands
su-2.05b# make
source='sql.c' object='sql.o' libtool=no depfile='.deps/sql.Po' tmpdepfile='.deps/sql.TPo' depmode=gcc /usr/local/bin/bash ./config/depcomp gcc -DHAVE_CONFIG_H -I. -I. -I./config -I/usr/local/include/net-snmp -I/usr/local/include/net-snmp/.. -I/usr/local/include/mysql -g -O2 -c `test -f 'sql.c' || echo './'`sql.c
source='cactid.c' object='cactid.o' libtool=no depfile='.deps/cactid.Po' tmpdepfile='.deps/cactid.TPo' depmode=gcc /usr/local/bin/bash ./config/depcomp gcc -DHAVE_CONFIG_H -I. -I. -I./config -I/usr/local/include/net-snmp -I/usr/local/include/net-snmp/.. -I/usr/local/include/mysql -g -O2 -c `test -f 'cactid.c' || echo './'`cactid.c
source='util.c' object='util.o' libtool=no depfile='.deps/util.Po' tmpdepfile='.deps/util.TPo' depmode=gcc /usr/local/bin/bash ./config/depcomp gcc -DHAVE_CONFIG_H -I. -I. -I./config -I/usr/local/include/net-snmp -I/usr/local/include/net-snmp/.. -I/usr/local/include/mysql -g -O2 -c `test -f 'util.c' || echo './'`util.c
source='snmp.c' object='snmp.o' libtool=no depfile='.deps/snmp.Po' tmpdepfile='.deps/snmp.TPo' depmode=gcc /usr/local/bin/bash ./config/depcomp gcc -DHAVE_CONFIG_H -I. -I. -I./config -I/usr/local/include/net-snmp -I/usr/local/include/net-snmp/.. -I/usr/local/include/mysql -g -O2 -c `test -f 'snmp.c' || echo './'`snmp.c
source='locks.c' object='locks.o' libtool=no depfile='.deps/locks.Po' tmpdepfile='.deps/locks.TPo' depmode=gcc /usr/local/bin/bash ./config/depcomp gcc -DHAVE_CONFIG_H -I. -I. -I./config -I/usr/local/include/net-snmp -I/usr/local/include/net-snmp/.. -I/usr/local/include/mysql -g -O2 -c `test -f 'locks.c' || echo './'`locks.c
source='poller.c' object='poller.o' libtool=no depfile='.deps/poller.Po' tmpdepfile='.deps/poller.TPo' depmode=gcc /usr/local/bin/bash ./config/depcomp gcc -DHAVE_CONFIG_H -I. -I. -I./config -I/usr/local/include/net-snmp -I/usr/local/include/net-snmp/.. -I/usr/local/include/mysql -g -O2 -c `test -f 'poller.c' || echo './'`poller.c
poller.c: In function `poll_host':
poller.c:672: syntax error before `int'
poller.c:674: `buffer' undeclared (first use in this function)
poller.c:674: (Each undeclared identifier is reported only once
poller.c:674: for each function it appears in.)
poller.c:685: syntax error before `char'
poller.c:687: `result_string' undeclared (first use in this function)
poller.c:687: `delim' undeclared (first use in this function)
*** Error code 1
Here's patch for released version cactid-0.8.6f
For FreeBSD this file can be put in /usr/ports/net/cactid/files
and
#make clean build install
in port directory will work seamlessly
just tested the ports-version with patch-gcc.txt, its does not work
su-2.05b# mv patch-gcc.txt /usr/ports/net/cacti/files/
su-2.05b# cd /usr/ports/net/cactid/
su-2.05b# make clean build install
===> Cleaning for libiconv-1.9.2_1
===> Cleaning for mysql-client-4.1.15
===> Cleaning for autoconf-2.59_2
===> Cleaning for gettext-0.14.5
===> Cleaning for gmake-3.80_2
===> Cleaning for libtool-1.5.20
===> Cleaning for m4-1.4.3
===> Cleaning for p5-gettext-1.03
===> Cleaning for readline-5.0
===> Cleaning for perl-5.8.7
===> Cleaning for help2man-1.36.2
===> Cleaning for net-snmp-5.2.1.2
===> Cleaning for rc_subr-1.31_1
===> Cleaning for expat-1.95.8_3
===> Cleaning for cactid-0.8.6.f_1
===> Vulnerability check disabled, database not found
===> Extracting for cactid-0.8.6.f_1
=> Checksum OK for cacti-cactid-0.8.6f-1.tar.gz.
===> Patching for cactid-0.8.6.f_1
===> Applying FreeBSD patches for cactid-0.8.6.f_1
===> cactid-0.8.6.f_1 depends on shared library: netsnmp.7 - found
===> cactid-0.8.6.f_1 depends on shared library: mysqlclient.14 - found
===> Configuring for cactid-0.8.6.f_1
configure: WARNING: you should use --build, --host, --target
checking build system type... i386-portbld-freebsd4.11
checking host system type... i386-portbld-freebsd4.11
checking for a BSD-compatible install... /usr/bin/install -c -o root -g wheel
checking whether build environment is sane... yes
checking for gawk... no
checking for mawk... no
checking for nawk... nawk
checking whether make sets $(MAKE)... yes
checking for gawk... (cached) nawk
checking for i386-portbld-freebsd4.11-gcc... cc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether cc accepts -g... yes
checking for cc option to accept ANSI C... none needed
checking for style of include used by make... GNU
checking dependency style of cc... gcc
checking how to run the C preprocessor... cc -E
checking for a BSD-compatible install... /usr/bin/install -c -o root -g wheel
checking whether ln -s works... yes
checking for i386-portbld-freebsd4.11-ranlib... no
checking for ranlib... ranlib
checking whether to enable -Wall... no
checking for kstat_lookup in -lkstat... no
checking for gethostbyname in -lnsl... no
checking for socket in -lsocket... no
checking for floor in -lm... yes
checking for pthread_exit in -lpthread... no
checking for deflate in -lz... yes
checking for egrep... grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... no
checking for unistd.h... yes
checking malloc.h usability... yes
checking malloc.h presence... yes
checking for malloc.h... yes
checking ctype.h usability... yes
checking ctype.h presence... yes
checking for ctype.h... yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking netinet/in.h usability... yes
checking netinet/in.h presence... yes
checking for netinet/in.h... yes
checking for unsigned long long... yes
checking for long long... yes
checking for an ANSI C-conforming const... yes
checking for size_t... yes
checking whether time.h and sys/time.h may both be included... yes
checking whether struct tm is in sys/time.h or time.h... time.h
checking return type of signal handlers... void
checking for gettimeofday... yes
checking for strerror... yes
checking for strtoll... yes
checking for mysql_init in -lmysqlclient... yes
checking for mysql_thread_init in -lmysqlclient... yes
checking if UCD-SNMP needs crypto support... no
checking if Net-SNMP needs crypto support... yes
checking for CRYPTO_free in -lcrypto... yes
checking for snmp_timeout in -lnetsnmp... yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating config/config.h
config.status: executing depfiles commands
===> Building for cactid-0.8.6.f_1
source='sql.c' object='sql.o' libtool=no depfile='.deps/sql.Po' tmpdepfile='.deps/sql.TPo' depmode=gcc /bin/sh ./config/depcomp cc -DHAVE_CONFIG_H -I. -I. -I./config -I/usr/local/include/net-snmp -I/usr/local/include/net-snmp/.. -I/usr/local/include/mysql -O -pipe -c `test -f 'sql.c' || echo './'`sql.c
source='cactid.c' object='cactid.o' libtool=no depfile='.deps/cactid.Po' tmpdepfile='.deps/cactid.TPo' depmode=gcc /bin/sh ./config/depcomp cc -DHAVE_CONFIG_H -I. -I. -I./config -I/usr/local/include/net-snmp -I/usr/local/include/net-snmp/.. -I/usr/local/include/mysql -O -pipe -c `test -f 'cactid.c' || echo './'`cactid.c
source='util.c' object='util.o' libtool=no depfile='.deps/util.Po' tmpdepfile='.deps/util.TPo' depmode=gcc /bin/sh ./config/depcomp cc -DHAVE_CONFIG_H -I. -I. -I./config -I/usr/local/include/net-snmp -I/usr/local/include/net-snmp/.. -I/usr/local/include/mysql -O -pipe -c `test -f 'util.c' || echo './'`util.c
source='snmp.c' object='snmp.o' libtool=no depfile='.deps/snmp.Po' tmpdepfile='.deps/snmp.TPo' depmode=gcc /bin/sh ./config/depcomp cc -DHAVE_CONFIG_H -I. -I. -I./config -I/usr/local/include/net-snmp -I/usr/local/include/net-snmp/.. -I/usr/local/include/mysql -O -pipe -c `test -f 'snmp.c' || echo './'`snmp.c
snmp.c: In function `snmp_get_multi':
snmp.c:311: syntax error before `int'
snmp.c:312: `count' undeclared (first use in this function)
snmp.c:312: (Each undeclared identifier is reported only once
snmp.c:312: for each function it appears in.)
*** Error code 1
Stop in /usr/ports/net/cactid/work/cacti-cactid-0.8.6f-1.
*** Error code 1
Just reviewed the patch. I would like to move all the declarations to the top of poller.c if that's ok. Therefore, I will need one of you to volunteer to recompile SVN. I will give you the NOD. It will likely be on Friday.
Larry
True understanding begins only when we realize how little we truly understand...
TheWitness wrote:Just reviewed the patch. I would like to move all the declarations to the top of poller.c if that's ok. Therefore, I will need one of you to volunteer to recompile SVN. I will give you the NOD. It will likely be on Friday.
Larry
Yes, moving it in the beginning of the function is most preferred way, i've just made it so to minimize changes in code.
And ok, I can test new version - just let me know.