Compilation NetMRG : problem with debian

aero_climb

09-03-2004 11:49:06

Hello D I'm French 8) My english is very bad...

I'm used to install netMRG with debian. But there is a error.
I give you the last lines of compilation
[code16ec65822d4]
/usr/include/bits/posix_opt.h:76: warning: `_POSIX_THREADS' redefined
include/netmrg.h:15: warning: this is the location of the previous definition
/usr/include/bits/posix_opt.h:80: warning: `_POSIX_THREAD_SAFE_FUNCTIONS' redefined
include/netmrg.h:16: warning: this is the location of the previous definition
monitors.cpp: In function `class string process_sql_monitor(DeviceInfo, MYSQL *)':
monitors.cpp:94: implicit declaration of function `int mysql_connect(...)'
make[1]: *** [monitors.o] Error 1
make[1]: Leaving directory `/root/netmrg-0.13/src'
make: *** [all-recursive] Error 1
oueb:~/netmrg-0.13#
[/code16ec65822d4]

I use GCC and CPP 3.0. Can it be the problem ?

thanks,
Romain wink

silfreed

09-03-2004 19:29:51

Commonly, all you need to do is

[code11c1581f4ad]./configure
make
make install[/code11c1581f4ad]

Is this what you did to get the error?

This is all documented here
http//www.netmrg.net/docs/netmrg-0_13/install.html

-Doug

aero_climb

10-03-2004 06:23:28

I have made ./configure. But when I do "make", I have this problem... (
Can you help me ?

balleman

10-03-2004 20:35:15

Could you post the output of the configure script?

kojiro

10-03-2004 22:00:54

Hi, i'm getting the same error on the comilation. (make) i'm using slackware 8.1, i have mysql 4.0.18 installed. i've tried with and without specifying the mysql includes and lib directories on the configure line. here's the output of my config listing as requested from the last person (dirs specified)


[netmrg-0.13] ./configure --with-mysql-include-dir=/usr/local/include/mysql/ --with-mysql-lib-dir=/usr/local/lib/mysql/
checking for a BSD-compatible install... /usr/bin/ginstall -c
checking whether build environment is sane... yes
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make sets $(MAKE)... (cached) yes
checking for rrdtool... /usr/local/rrdtool-1.0.46
configure creating ./config.status
config.status creating Makefile
config.status creating subst
config.status creating bin/netmrg_cron.sh
config.status creating etc/Makefile
config.status creating etc/netmrg.conf
config.status creating etc/netmrg.xml
config.status creating src/include/netmrg.h
config.status creating www/Makefile
config.status creating www/include/config.php
configure configuring in src
configure running /bin/sh './configure' --prefix=/usr/local '--with-mysql-include-dir=/usr/local/include/mysql/' '--with-mysql-lib-dir=/usr/local/lib/mysql/' --exec-prefix=/usr/local --cache-file=/dev/null --srcdir=.
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking for a BSD-compatible install... /usr/bin/ginstall -c
checking whether build environment is sane... yes
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for g++... g++
checking for C++ compiler default output... 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 g++ accepts -g... yes
checking for style of include used by make... GNU
checking dependency style of g++... gcc
checking for gcc... gcc
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 dependency style of gcc... gcc
checking how to run the C preprocessor... gcc -E
checking for a BSD-compatible install... /usr/bin/ginstall -c
checking whether to enable -Wall... no
checking for dlopen in -ldl... yes
checking for compress in -lz... yes
checking for pthread_exit in -lpthread... yes
checking for main in -lstdc++... yes
checking for xmlParseFile in -lxml2... yes
checking for mysql_init in -lmysqlclient... yes
checking for mysql_thread_init in -lmysqlclient... no
checking how to run the C++ preprocessor... g++ -E
checking for egrep... grep -E
checking for ANSI C header files... yes
checking for sys/wait.h that is POSIX.1 compatible... yes
checking whether time.h and sys/time.h may both be included... 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... yes
checking for unistd.h... yes
checking cstdio usability... yes
checking cstdio presence... yes
checking for cstdio... yes
checking cstdlib usability... yes
checking cstdlib presence... yes
checking for cstdlib... yes
checking string usability... yes
checking string presence... yes
checking for string... yes
checking list usability... yes
checking list presence... yes
checking for list... yes
checking for unistd.h... (cached) yes
checking for libxml/xmlmemory.h... yes
checking for mysql/mysql.h... yes
checking for an ANSI C-conforming const... yes
checking for size_t... yes
checking return type of signal handlers... void
checking for working memcmp... yes
checking whether lstat dereferences a symlink specified with a trailing slash... yes
checking whether stat accepts an empty string... no
checking for memmove... yes
checking if Net-SNMP needs crypto support... yes
checking if UCD-SNMP needs crypto support... no
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 include/config.h
config.status executing depfiles commands

and the error on make

[netmrg-0.13] make
Making all in src
make[1] Entering directory `/home/tetsuo/netmrg-0.13/src'
source='db.cpp' object='db.o' libtool=no \
depfile='.deps/db.Po' tmpdepfile='.deps/db.TPo' \
depmode=gcc /bin/sh ./../depcomp \
g++ -DHAVE_CONFIG_H -I. -I. -I./include -I./include -I/usr/include/libxml2 -I/usr/local/include/net-snmp -g -O2 -c -o db.o `test -f 'db.cpp' || echo './'`db.cpp
In file included from /usr/include/unistd.h175,
from include/common.h14,
from db.cpp10
/usr/include/bits/posix_opt.h76 warning `_POSIX_THREADS' redefined
include/netmrg.h15 warning this is the location of the previous definition
/usr/include/bits/posix_opt.h80 warning `_POSIX_THREAD_SAFE_FUNCTIONS' redefined
include/netmrg.h16 warning this is the location of the previous definition
source='devices.cpp' object='devices.o' libtool=no \
depfile='.deps/devices.Po' tmpdepfile='.deps/devices.TPo' \
depmode=gcc /bin/sh ./../depcomp \
g++ -DHAVE_CONFIG_H -I. -I. -I./include -I./include -I/usr/include/libxml2 -I/usr/local/include/net-snmp -g -O2 -c -o devices.o `test -f 'devices.cpp' || echo './'`devices.cpp
In file included from /usr/include/unistd.h175,
from include/common.h14,
from include/types.h13,
from include/devices.h13,
from devices.cpp10
/usr/include/bits/posix_opt.h76 warning `_POSIX_THREADS' redefined
include/netmrg.h15 warning this is the location of the previous definition
/usr/include/bits/posix_opt.h80 warning `_POSIX_THREAD_SAFE_FUNCTIONS' redefined
include/netmrg.h16 warning this is the location of the previous definition
source='events.cpp' object='events.o' libtool=no \
depfile='.deps/events.Po' tmpdepfile='.deps/events.TPo' \
depmode=gcc /bin/sh ./../depcomp \
g++ -DHAVE_CONFIG_H -I. -I. -I./include -I./include -I/usr/include/libxml2 -I/usr/local/include/net-snmp -g -O2 -c -o events.o `test -f 'events.cpp' || echo './'`events.cpp
In file included from /usr/include/unistd.h175,
from include/common.h14,
from include/types.h13,
from include/events.h13,
from events.cpp10
/usr/include/bits/posix_opt.h76 warning `_POSIX_THREADS' redefined
include/netmrg.h15 warning this is the location of the previous definition
/usr/include/bits/posix_opt.h80 warning `_POSIX_THREAD_SAFE_FUNCTIONS' redefined
include/netmrg.h16 warning this is the location of the previous definition
source='locks.cpp' object='locks.o' libtool=no \
depfile='.deps/locks.Po' tmpdepfile='.deps/locks.TPo' \
depmode=gcc /bin/sh ./../depcomp \
g++ -DHAVE_CONFIG_H -I. -I. -I./include -I./include -I/usr/include/libxml2 -I/usr/local/include/net-snmp -g -O2 -c -o locks.o `test -f 'locks.cpp' || echo './'`locks.cpp
In file included from /usr/include/unistd.h175,
from include/common.h14,
from include/locks.h13,
from locks.cpp10
/usr/include/bits/posix_opt.h76 warning `_POSIX_THREADS' redefined
include/netmrg.h15 warning this is the location of the previous definition
/usr/include/bits/posix_opt.h80 warning `_POSIX_THREAD_SAFE_FUNCTIONS' redefined
include/netmrg.h16 warning this is the location of the previous definition
source='mappings.cpp' object='mappings.o' libtool=no \
depfile='.deps/mappings.Po' tmpdepfile='.deps/mappings.TPo' \
depmode=gcc /bin/sh ./../depcomp \
g++ -DHAVE_CONFIG_H -I. -I. -I./include -I./include -I/usr/include/libxml2 -I/usr/local/include/net-snmp -g -O2 -c -o mappings.o `test -f 'mappings.cpp' || echo './'`mappings.cpp
In file included from /usr/include/unistd.h175,
from include/common.h14,
from include/types.h13,
from include/mappings.h13,
from mappings.cpp10
/usr/include/bits/posix_opt.h76 warning `_POSIX_THREADS' redefined
include/netmrg.h15 warning this is the location of the previous definition
/usr/include/bits/posix_opt.h80 warning `_POSIX_THREAD_SAFE_FUNCTIONS' redefined
include/netmrg.h16 warning this is the location of the previous definition
source='monitors.cpp' object='monitors.o' libtool=no \
depfile='.deps/monitors.Po' tmpdepfile='.deps/monitors.TPo' \
depmode=gcc /bin/sh ./../depcomp \
g++ -DHAVE_CONFIG_H -I. -I. -I./include -I./include -I/usr/include/libxml2 -I/usr/local/include/net-snmp -g -O2 -c -o monitors.o `test -f 'monitors.cpp' || echo './'`monitors.cpp
In file included from /usr/include/unistd.h175,
from include/common.h14,
from include/types.h13,
from include/monitors.h13,
from monitors.cpp10
/usr/include/bits/posix_opt.h76 warning `_POSIX_THREADS' redefined
include/netmrg.h15 warning this is the location of the previous definition
/usr/include/bits/posix_opt.h80 warning `_POSIX_THREAD_SAFE_FUNCTIONS' redefined
include/netmrg.h16 warning this is the location of the previous definition
monitors.cpp In function `class string process_sql_monitor(DeviceInfo, MYSQL *)'
monitors.cpp94 implicit declaration of function `int mysql_connect(...)'
make[1] *** [monitors.o] Error 1
make[1] Leaving directory `/home/tetsuo/netmrg-0.13/src'
make *** [all-recursive] Error 1

balleman

10-03-2004 22:37:11

We've just released 0.14. Could you see if it fixes the problem?

kojiro

10-03-2004 22:48:51

nay. still same error. altho when configuring with the directories specified now i get a recheck of the mysql stuff that doesn't happen when i dont specify, but far less warnings now either way

with dir

[netmrg-0.14] ./configure --with-mysql-include-dir=/usr/local/include/mysql/ --with-mysql-li
b-dir=/usr/local/lib/mysql/
checking for a BSD-compatible install... /usr/bin/ginstall -c
checking whether build environment is sane... yes
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make sets $(MAKE)... (cached) yes
checking for rrdtool... /usr/local/rrdtool-1.0.46
configure creating ./config.status
config.status creating Makefile
config.status creating subst
config.status creating bin/netmrg_cron.sh
config.status creating etc/Makefile
config.status creating etc/netmrg.conf
config.status creating etc/netmrg.xml
config.status creating src/include/netmrg.h
config.status creating www/Makefile
config.status creating www/include/config.php
configure configuring in src
configure running /bin/sh './configure' --prefix=/usr/local '--with-mysql-include-dir=/usr/local/include/mysql/' '--with-mysql-lib-dir=/usr/local/lib/mysql/' --exec-prefix=/usr/local --cache-file=/dev/null --srcdir=.
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking for a BSD-compatible install... /usr/bin/ginstall -c
checking whether build environment is sane... yes
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for g++... g++
checking for C++ compiler default output... 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 g++ accepts -g... yes
checking for style of include used by make... GNU
checking dependency style of g++... gcc
checking for gcc... gcc
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 dependency style of gcc... gcc
checking how to run the C preprocessor... gcc -E
checking for a BSD-compatible install... /usr/bin/ginstall -c
checking whether to enable -Wall... no
checking for dlopen in -ldl... yes
checking for compress in -lz... yes
checking for pthread_create in -lpthread... yes
checking for main in -lstdc++... yes
checking for xmlParseFile in -lxml2... yes
checking for mysql_init in -lmysqlclient... yes
checking for mysql_thread_init in -lmysqlclient... no
checking how to run the C++ preprocessor... g++ -E
checking for egrep... grep -E
checking for ANSI C header files... yes
checking for sys/wait.h that is POSIX.1 compatible... yes
checking whether time.h and sys/time.h may both be included... 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... yes
checking for unistd.h... yes
checking cstdio usability... yes
checking cstdio presence... yes
checking for cstdio... yes
checking cstdlib usability... yes
checking cstdlib presence... yes
checking for cstdlib... yes
checking string usability... yes
checking string presence... yes
checking for string... yes
checking list usability... yes
checking list presence... yes
checking for list... yes
checking for unistd.h... (cached) yes
checking for libxml/xmlmemory.h... yes
checking for mysql/mysql.h... yes
checking for an ANSI C-conforming const... yes
checking for size_t... yes
checking return type of signal handlers... void
checking for working memcmp... yes
checking whether lstat dereferences a symlink specified with a trailing slash... yes
checking whether stat accepts an empty string... no
checking for memmove... yes
checking if Net-SNMP needs crypto support... yes
checking if UCD-SNMP needs crypto support... no
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 include/config.h
config.status executing depfiles commands
------{103839.pm}------
[netmrg-0.14] make
cd . && /bin/sh /home/tetsuo/netmrg-0.14/missing --run aclocal-1.7
/home/tetsuo/netmrg-0.14/missing aclocal-1.7 command not found
WARNING `aclocal-1.7' is missing on your system. You should only need it if
you modified `acinclude.m4' or `configure.ac'. You might want
to install the `Automake' and `Perl' packages. Grab them from
any GNU archive site.
cd . && \
/bin/sh /home/tetsuo/netmrg-0.14/missing --run automake-1.7 --foreign Makefile
/home/tetsuo/netmrg-0.14/missing automake-1.7 command not found
WARNING `automake-1.7' is missing on your system. You should only need it if
you modified `Makefile.am', `acinclude.m4' or `configure.ac'.
You might want to install the `Automake' and `Perl' packages.
Grab them from any GNU archive site.
cd . && /bin/sh /home/tetsuo/netmrg-0.14/missing --run autoconf
/bin/sh ./config.status --recheck
running /bin/sh ./configure --with-mysql-include-dir=/usr/local/include/mysql/ --with-mysql-lib-dir=/usr/local/lib/mysql/ --exec-prefix=/usr/local --no-create --no-recursion
checking for a BSD-compatible install... /usr/bin/ginstall -c
checking whether build environment is sane... yes
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make sets $(MAKE)... (cached) yes
checking for rrdtool... /usr/local/rrdtool-1.0.46
configure creating ./config.status
cd . && /bin/sh ./config.status Makefile
config.status creating Makefile
Making all in src
make[1] Entering directory `/home/tetsuo/netmrg-0.14/src'
cd . && /bin/sh ./config.status Makefile depfiles
config.status creating Makefile
config.status executing depfiles commands
make[1] Leaving directory `/home/tetsuo/netmrg-0.14/src'
make[1] Entering directory `/home/tetsuo/netmrg-0.14/src'
source='db.cpp' object='db.o' libtool=no \
depfile='.deps/db.Po' tmpdepfile='.deps/db.TPo' \
depmode=gcc /bin/sh ./../depcomp \
g++ -DHAVE_CONFIG_H -I. -I. -I./include -I./include -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -I/usr/include/libxml2 -I/usr/local/include/net-snmp -g -O2 -c -o db.o `test -f 'db.cpp' || echo './'`db.cpp
source='devices.cpp' object='devices.o' libtool=no \
depfile='.deps/devices.Po' tmpdepfile='.deps/devices.TPo' \
depmode=gcc /bin/sh ./../depcomp \
g++ -DHAVE_CONFIG_H -I. -I. -I./include -I./include -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -I/usr/include/libxml2 -I/usr/local/include/net-snmp -g -O2 -c -o devices.o `test -f 'devices.cpp' || echo './'`devices.cpp
source='events.cpp' object='events.o' libtool=no \
depfile='.deps/events.Po' tmpdepfile='.deps/events.TPo' \
depmode=gcc /bin/sh ./../depcomp \
g++ -DHAVE_CONFIG_H -I. -I. -I./include -I./include -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -I/usr/include/libxml2 -I/usr/local/include/net-snmp -g -O2 -c -o events.o `test -f 'events.cpp' || echo './'`events.cpp
source='locks.cpp' object='locks.o' libtool=no \
depfile='.deps/locks.Po' tmpdepfile='.deps/locks.TPo' \
depmode=gcc /bin/sh ./../depcomp \
g++ -DHAVE_CONFIG_H -I. -I. -I./include -I./include -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -I/usr/include/libxml2 -I/usr/local/include/net-snmp -g -O2 -c -o locks.o `test -f 'locks.cpp' || echo './'`locks.cpp
source='mappings.cpp' object='mappings.o' libtool=no \
depfile='.deps/mappings.Po' tmpdepfile='.deps/mappings.TPo' \
depmode=gcc /bin/sh ./../depcomp \
g++ -DHAVE_CONFIG_H -I. -I. -I./include -I./include -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -I/usr/include/libxml2 -I/usr/local/include/net-snmp -g -O2 -c -o mappings.o `test -f 'mappings.cpp' || echo './'`mappings.cpp
source='monitors.cpp' object='monitors.o' libtool=no \
depfile='.deps/monitors.Po' tmpdepfile='.deps/monitors.TPo' \
depmode=gcc /bin/sh ./../depcomp \
g++ -DHAVE_CONFIG_H -I. -I. -I./include -I./include -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -I/usr/include/libxml2 -I/usr/local/include/net-snmp -g -O2 -c -o monitors.o `test -f 'monitors.cpp' || echo './'`monitors.cpp
monitors.cpp In function `class string process_sql_monitor(DeviceInfo, MYSQL *)'
monitors.cpp101 implicit declaration of function `int mysql_connect(...)'
make[1] *** [monitors.o] Error 1
make[1] Leaving directory `/home/tetsuo/netmrg-0.14/src'
make *** [all-recursive] Error 1

---------------------------------------------

without dir

[netmrg-0.14] rm config.log
[netmrg-0.14] rm config.status
[netmrg-0.14] ./configure
checking for a BSD-compatible install... /usr/bin/ginstall -c
checking whether build environment is sane... yes
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make sets $(MAKE)... (cached) yes
checking for rrdtool... /usr/local/rrdtool-1.0.46
configure creating ./config.status
config.status creating Makefile
config.status creating subst
config.status creating bin/netmrg_cron.sh
config.status creating etc/Makefile
config.status creating etc/netmrg.conf
config.status creating etc/netmrg.xml
config.status creating src/include/netmrg.h
config.status creating www/Makefile
config.status creating www/include/config.php
configure configuring in src
configure running /bin/sh './configure' --prefix=/usr/local --exec-prefix=/usr/local --cache-file=/dev/null --srcdir=.
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking for a BSD-compatible install... /usr/bin/ginstall -c
checking whether build environment is sane... yes
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for g++... g++
checking for C++ compiler default output... 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 g++ accepts -g... yes
checking for style of include used by make... GNU
checking dependency style of g++... gcc
checking for gcc... gcc
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 dependency style of gcc... gcc
checking how to run the C preprocessor... gcc -E
checking for a BSD-compatible install... /usr/bin/ginstall -c
checking whether to enable -Wall... no
checking for dlopen in -ldl... yes
checking for compress in -lz... yes
checking for pthread_create in -lpthread... yes
checking for main in -lstdc++... yes
checking for xmlParseFile in -lxml2... yes
checking for mysql_init in -lmysqlclient... yes
checking for mysql_thread_init in -lmysqlclient... no
checking how to run the C++ preprocessor... g++ -E
checking for egrep... grep -E
checking for ANSI C header files... yes
checking for sys/wait.h that is POSIX.1 compatible... yes
checking whether time.h and sys/time.h may both be included... 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... yes
checking for unistd.h... yes
checking cstdio usability... yes
checking cstdio presence... yes
checking for cstdio... yes
checking cstdlib usability... yes
checking cstdlib presence... yes
checking for cstdlib... yes
checking string usability... yes
checking string presence... yes
checking for string... yes
checking list usability... yes
checking list presence... yes
checking for list... yes
checking for unistd.h... (cached) yes
checking for libxml/xmlmemory.h... yes
checking for mysql/mysql.h... yes
checking for an ANSI C-conforming const... yes
checking for size_t... yes
checking return type of signal handlers... void
checking for working memcmp... yes
checking whether lstat dereferences a symlink specified with a trailing slash... yes
checking whether stat accepts an empty string... no
checking for memmove... yes
checking if Net-SNMP needs crypto support... yes
checking if UCD-SNMP needs crypto support... no
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 include/config.h
config.status include/config.h is unchanged
config.status executing depfiles commands
------{104040.pm}------
[netmrg-0.14] make
Making all in src
make[1] Entering directory `/home/tetsuo/netmrg-0.14/src'
source='db.cpp' object='db.o' libtool=no \
depfile='.deps/db.Po' tmpdepfile='.deps/db.TPo' \
depmode=gcc /bin/sh ./../depcomp \
g++ -DHAVE_CONFIG_H -I. -I. -I./include -I./include -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -I/usr/include/libxml2 -I/usr/local/include/net-snmp -g -O2 -c -o db.o `test -f 'db.cpp' || echo './'`db.cpp
source='devices.cpp' object='devices.o' libtool=no \
depfile='.deps/devices.Po' tmpdepfile='.deps/devices.TPo' \
depmode=gcc /bin/sh ./../depcomp \
g++ -DHAVE_CONFIG_H -I. -I. -I./include -I./include -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -I/usr/include/libxml2 -I/usr/local/include/net-snmp -g -O2 -c -o devices.o `test -f 'devices.cpp' || echo './'`devices.cpp
source='events.cpp' object='events.o' libtool=no \
depfile='.deps/events.Po' tmpdepfile='.deps/events.TPo' \
depmode=gcc /bin/sh ./../depcomp \
g++ -DHAVE_CONFIG_H -I. -I. -I./include -I./include -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -I/usr/include/libxml2 -I/usr/local/include/net-snmp -g -O2 -c -o events.o `test -f 'events.cpp' || echo './'`events.cpp
source='locks.cpp' object='locks.o' libtool=no \
depfile='.deps/locks.Po' tmpdepfile='.deps/locks.TPo' \
depmode=gcc /bin/sh ./../depcomp \
g++ -DHAVE_CONFIG_H -I. -I. -I./include -I./include -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -I/usr/include/libxml2 -I/usr/local/include/net-snmp -g -O2 -c -o locks.o `test -f 'locks.cpp' || echo './'`locks.cpp
source='mappings.cpp' object='mappings.o' libtool=no \
depfile='.deps/mappings.Po' tmpdepfile='.deps/mappings.TPo' \
depmode=gcc /bin/sh ./../depcomp \
g++ -DHAVE_CONFIG_H -I. -I. -I./include -I./include -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -I/usr/include/libxml2 -I/usr/local/include/net-snmp -g -O2 -c -o mappings.o `test -f 'mappings.cpp' || echo './'`mappings.cpp
source='monitors.cpp' object='monitors.o' libtool=no \
depfile='.deps/monitors.Po' tmpdepfile='.deps/monitors.TPo' \
depmode=gcc /bin/sh ./../depcomp \
g++ -DHAVE_CONFIG_H -I. -I. -I./include -I./include -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -I/usr/include/libxml2 -I/usr/local/include/net-snmp -g -O2 -c -o monitors.o `test -f 'monitors.cpp' || echo './'`monitors.cpp
monitors.cpp In function `class string process_sql_monitor(DeviceInfo, MYSQL *)'
monitors.cpp101 implicit declaration of function `int mysql_connect(...)'
make[1] *** [monitors.o] Error 1
make[1] Leaving directory `/home/tetsuo/netmrg-0.14/src'
make *** [all-recursive] Error 1

balleman

10-03-2004 23:11:19

Could you try commenting out the body of the process_sql_monitor() function in monitors.cpp and recompiling? If that works, you won't be able to use MySQL-based monitors, but that shouldn't be a problem for most users. Let us know the results, and we'll try to go on from there.

keb

11-03-2004 01:21:21

[quote459c8cc725="kojiro"]Hi, i'm getting the same error on the comilation. (make) i'm using slackware 8.1, i have mysql 4.0.18 installed.

[ snip ]

monitors.cpp In function `class string process_sql_monitor(DeviceInfo, MYSQL *)'
monitors.cpp94 implicit declaration of function `int mysql_connect(...)'
make[1] *** [monitors.o] Error 1
make[1] Leaving directory `/home/tetsuo/netmrg-0.13/src'
make *** [all-recursive] Error 1[/quote459c8cc725]

MySQL 3 was installed from the slackware packages and stepping on the toes of the MySQL 4 source install. Moving the MySQL 3 includes and libraries out of the way fixed this error.

keb

11-03-2004 01:31:45

aero_climb, what version of MySQL do you have installed? You should be able to find this out by running the command below.

[code1010baddfad]mysql --version[/code1010baddfad]

Also, you may want to make sure you don't have multiple versions of the MySQL libraries or includes. You can probably determine this by running the command below.

[code1010baddfad]locate libmysqlclient.so[/code1010baddfad]

Example output for this command would be

[code1010baddfad]$ locate libmysqlclient.so
/usr/lib/libmysqlclient.so
/usr/lib/libmysqlclient.so.12.0.0
/usr/lib/libmysqlclient.so.12[/code1010baddfad]

- Kevin

aero_climb

11-03-2004 16:03:47

Sorry, I'm not very quick (

With the new version 0.14, when I do "make", I have this

[code1ec84f45da3]
oueb:~/netmrg-0.14# make
cd . && /bin/sh /root/netmrg-0.14/missing --run autoconf
aclocal.m4:39: error: Autoconf version 2.54 or higher is required
aclocal.m4:39: the top level
make: *** [configure] Error 1
oueb:~/netmrg-0.14#
[/code1ec84f45da3]

The "./configure" give me this
[code1ec84f45da3]
oueb:~/netmrg-0.14# ./configure
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking whether make sets $(MAKE)... (cached) yes
checking for rrdtool... /usr/bin/rrdtool
configure: creating ./config.status
config.status: creating Makefile
config.status: creating subst
config.status: creating bin/netmrg_cron.sh
config.status: creating etc/Makefile
config.status: creating etc/netmrg.conf
config.status: creating etc/netmrg.xml
config.status: creating src/include/netmrg.h
config.status: creating www/Makefile
config.status: creating www/include/config.php
configure: configuring in src
configure: running /bin/sh './configure' --prefix=/usr/local --exec-prefix=/usr/local --cache-file=/dev/null --srcdir=.
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking for g++... g++
checking for C++ compiler default output... 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 g++ accepts -g... yes
checking for style of include used by make... GNU
checking dependency style of g++... gcc
checking for gcc... gcc
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 dependency style of gcc... gcc3
checking how to run the C preprocessor... gcc -E
checking for a BSD-compatible install... /usr/bin/install -c
checking whether to enable -Wall... no
checking for dlopen in -ldl... yes
checking for compress in -lz... yes
checking for pthread_create in -lpthread... yes
checking for main in -lstdc++... yes
checking for xmlParseFile in -lxml2... yes
checking for mysql_init in -lmysqlclient... yes
checking for mysql_thread_init in -lmysqlclient... no
checking how to run the C++ preprocessor... g++ -E
checking for egrep... grep -E
checking for ANSI C header files... yes
checking for sys/wait.h that is POSIX.1 compatible... yes
checking whether time.h and sys/time.h may both be included... 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... yes
checking for unistd.h... yes
checking cstdio usability... yes
checking cstdio presence... yes
checking for cstdio... yes
checking cstdlib usability... yes
checking cstdlib presence... yes
checking for cstdlib... yes
checking string usability... yes
checking string presence... yes
checking for string... yes
checking list usability... yes
checking list presence... yes
checking for list... yes
checking for unistd.h... (cached) yes
checking for libxml/xmlmemory.h... yes
checking for mysql/mysql.h... yes
checking for an ANSI C-conforming const... yes
checking for size_t... yes
checking return type of signal handlers... void
checking for working memcmp... yes
checking whether lstat dereferences a symlink specified with a trailing slash... yes
checking whether stat accepts an empty string... no
checking for memmove... yes
checking if Net-SNMP needs crypto support... no
checking if UCD-SNMP needs crypto support... no
checking for snmp_timeout in -lnetsnmp... no
Cannot find Net-SNMP libraries...checking for UCD-SNMP
checking for snmp_timeout in -lsnmp... yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating include/config.h
config.status: include/config.h is unchanged
config.status: executing depfiles commands
You have new mail in /var/mail/root
oueb:~/netmrg-0.14#
[/code1ec84f45da3]

I think my system is very old with the "stable" version of debian. I'm going to install the "testing" version. I'll be come back when I'll install debian testing wink

aero_climb

11-03-2004 16:47:06

[code1a11e00428a]
oueb:/etc/apt# mysql --version
mysql Ver 12.22 Distrib 4.0.16, for pc-linux (i686)
You have new mail in /var/mail/root
[/code1a11e00428a]

I have manage to compil the mysql module. My problem was that I had two version of libmysqlclient. I'have just deleting one of them and recompilingand it work ;)
Bur now I have a new problem with the compilation. You can see my "make" (juste the end)
[code1a11e00428a]
oueb:~/netmrg-0.14# make
Making all in src
make[1]: Entering directory `/root/netmrg-0.14/src'
source='snmp.cpp' object='snmp.o' libtool=no \
depfile='.deps/snmp.Po' tmpdepfile='.deps/snmp.TPo' \
depmode=gcc /bin/sh ./../depcomp \
g++ -DHAVE_CONFIG_H -I. -I. -I./include -I./include -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -I/usr/include/libxml2 -I/usr/local/mysql/include -I/usr/include/ucd-snmp -g -O2 -c -o snmp.o `test -f 'snmp.cpp' || echo './'`snmp.cpp
In file included from /usr/include/ucd-snmp/ucd-snmp-includes.h:20,
from snmp.cpp:34:
/usr/include/ucd-snmp/system.h:79: syntax error before `('

make[1]: *** [snmp.o] Error 1
make[1]: Leaving directory `/root/netmrg-0.14/src'
make: *** [all-recursive] Error 1
oueb:~/netmrg-0.14#
[/code1a11e00428a]

This is my "./configure --with-mysql-lib-dir=/usr/local/mysql/lib/mysql/"
[code1a11e00428a]
oueb:~/netmrg-0.14# ./configure --with-mysql-lib-dir=/usr/local/mysql/lib/mysql/checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking whether make sets $(MAKE)... (cached) yes
checking for rrdtool... /usr/bin/rrdtool
configure: creating ./config.status
config.status: creating Makefile
config.status: creating subst
config.status: creating bin/netmrg_cron.sh
config.status: creating etc/Makefile
config.status: creating etc/netmrg.conf
config.status: creating etc/netmrg.xml
config.status: creating src/include/netmrg.h
config.status: creating www/Makefile
config.status: creating www/include/config.php
configure: configuring in src
configure: running /bin/sh './configure' --prefix=/usr/local '--with-mysql-lib-dir=/usr/local/mysql/lib/mysql/' --exec-prefix=/usr/local --cache-file=/dev/null --srcdir=.
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking for g++... g++
checking for C++ compiler default output... 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 g++ accepts -g... yes
checking for style of include used by make... GNU
checking dependency style of g++... gcc
checking for gcc... gcc
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 dependency style of gcc... gcc3
checking how to run the C preprocessor... gcc -E
checking for a BSD-compatible install... /usr/bin/install -c
checking whether to enable -Wall... no
checking for dlopen in -ldl... yes
checking for compress in -lz... yes
checking for pthread_create in -lpthread... yes
checking for main in -lstdc++... yes
checking for xmlParseFile in -lxml2... yes
checking for mysql_init in -lmysqlclient... no
checking for mysql_init in -lmysqlclient... no
checking for mysql_init in -lmysqlclient... no
checking for mysql_init in -lmysqlclient... no
checking for mysql_init in -lmysqlclient... no
checking for mysql_init in -lmysqlclient... no
checking for mysql_init in -lmysqlclient... yes
checking for mysql_thread_init in -lmysqlclient... yes
checking how to run the C++ preprocessor... g++ -E
checking for egrep... grep -E
checking for ANSI C header files... yes
checking for sys/wait.h that is POSIX.1 compatible... yes
checking whether time.h and sys/time.h may both be included... 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... yes
checking for unistd.h... yes
checking cstdio usability... yes
checking cstdio presence... yes
checking for cstdio... yes
checking cstdlib usability... yes
checking cstdlib presence... yes
checking for cstdlib... yes
checking string usability... yes
checking string presence... yes
checking for string... yes
checking list usability... yes
checking list presence... yes
checking for list... yes
checking for unistd.h... (cached) yes
checking for libxml/xmlmemory.h... yes
checking for mysql/mysql.h... yes
checking for an ANSI C-conforming const... yes
checking for size_t... yes
checking return type of signal handlers... void
checking for working memcmp... yes
checking whether lstat dereferences a symlink specified with a trailing slash... yes
checking whether stat accepts an empty string... no
checking for memmove... yes
checking if Net-SNMP needs crypto support... no
checking if UCD-SNMP needs crypto support... no
checking for snmp_timeout in -lnetsnmp... no
Cannot find Net-SNMP libraries...checking for UCD-SNMP
checking for snmp_timeout in -lsnmp... yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating include/config.h
config.status: include/config.h is unchanged
config.status: executing depfiles commands
oueb:~/netmrg-0.14#
[/code1a11e00428a]


Can you help me ?

aero_climb

11-03-2004 17:16:36

It's gut ! I'have manage to install completly netmrg 8) ouf wink
For the SNMP's problem, I ahve just upgrade libsnmp5 and libsnmp5-dev to the version 5 because I had the version 4.2.

keb

11-03-2004 17:31:21

[quotebfac9870e8="aero_climb"]With the new version 0.14, when I do "make", I have this

[code1bfac9870e8]
oueb:~/netmrg-0.14# make
cd . && /bin/sh /root/netmrg-0.14/missing --run autoconf
aclocal.m4:39: error: Autoconf version 2.54 or higher is required
aclocal.m4:39: the top level
make: *** [configure] Error 1
oueb:~/netmrg-0.14#
[/code1bfac9870e8][/quotebfac9870e8]

Yeah...that was something that wasn't caught before 0.14 was released. It was only a problem for source builds, not RPM installs. That issue has been fixed in the CVS head and the 0.14 tarball has been updated.

aero_climb

13-03-2004 11:38:06

Ok ;) But now I have a new problem. I'm going to create a new topic wink