Problems Installing on Redhat 9.0

machaf

29-07-2003 12:52:54

I'm having problems running ./configure.

First I got an error that it could not find rrdtool, so I copied the binaries from my rrdtool DIR into /bin. That worked.

Now I'm getting the following
[b3612617380]"checking for mysql_init in -lmysqlclient... no
configure error MySQL libraries not found.
configure error /bin/sh './configure' failed for src
"[/b3612617380]

I have mysql installed as cacti is using it. I tried copying some mysql LIB files into my /lib DIR, but that didn't help.

I tried

./configure --with-mysql-lib-dir=/usr/local/mysql/lib

That doesn't work either

Any ideas?

Thanks

keefus_a

29-07-2003 13:56:25

Install MySQL-shared-3.23.57-i386.rpm and/or MySQL-devel-3.23.57-i386.rpm. I can't remember which one, or both, I installed, but it fixed the problem. If you haven't done it already, install net-SNMP as well.

machaf

29-07-2003 14:09:50

Thanks bro.

mysql-dev rpm worked!

But now I get this error when doing a make

[b73b5632485]
"settings.cpp215 parse error before `}' token
settings.cpp217 ISO C++ forbids declaration of `xmlFreeDoc' with no type
settings.cpp217 `int xmlFreeDoc' used prior to declaration
settings.cpp218 parse error before `}' token
make[1] *** [settings.o] Error 1
make[1] Leaving directory `/netmrg/src'
make *** [all-recursive] Error 1"
[/b73b5632485]

I do a make install after that. And the netmrg.xml file thats suppose to be in /usr/local/etc is not there.


Here is my entire ./configure and make screen .

[quote73b5632485][root@cacti netmrg]# ./configure
checking for a BSD-compatible install... /usr/bin/install -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... /bin/rrdtool
configure creating ./config.status
config.status creating Makefile
config.status creating www/Makefile
config.status creating bin/netmrg_cron.sh
config.status creating etc/netmrg.conf
config.status creating etc/netmrg.xml
config.status creating src/include/netmrg.h
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... 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++... gcc3
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... no
checking for pthread_exit in -lpthread... yes
checking for main in -lstdc++... yes
checking for mysql_init in -lmysqlclient... yes
checking for mysql_thread_init in -lmysqlclient... no
checking for xmlParseFile in -lxml2... 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 an ANSI C-conforming const... yes
checking for size_t... yes
checking return type of signal handlers... void
checking for working memcmp... no
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... 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[/quote73b5632485]

[quote73b5632485][root@cacti netmrg]# make
Making all in src
make[1] Entering directory `/netmrg/src'
source='db.cpp' object='db.o' libtool=no \
depfile='.deps/db.Po' tmpdepfile='.deps/db.TPo' \
depmode=gcc3 /bin/sh ./../depcomp \
g++ -DHAVE_CONFIG_H -I. -I. -I./include -I./include -I/usr/include/libxml2 -I/usr/include/mysql -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=gcc3 /bin/sh ./../depcomp \
g++ -DHAVE_CONFIG_H -I. -I. -I./include -I./include -I/usr/include/libxml2 -I/usr/include/mysql -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=gcc3 /bin/sh ./../depcomp \
g++ -DHAVE_CONFIG_H -I. -I. -I./include -I./include -I/usr/include/libxml2 -I/usr/include/mysql -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=gcc3 /bin/sh ./../depcomp \
g++ -DHAVE_CONFIG_H -I. -I. -I./include -I./include -I/usr/include/libxml2 -I/usr/include/mysql -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=gcc3 /bin/sh ./../depcomp \
g++ -DHAVE_CONFIG_H -I. -I. -I./include -I./include -I/usr/include/libxml2 -I/usr/include/mysql -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=gcc3 /bin/sh ./../depcomp \
g++ -DHAVE_CONFIG_H -I. -I. -I./include -I./include -I/usr/include/libxml2 -I/usr/include/mysql -I/usr/include/libxml2 -I/usr/local/include/net-snmp -g -O2 -c -o monitors.o `test -f 'monitors.cpp' || echo './'`monitors.cpp
source='netmrg.cpp' object='netmrg.o' libtool=no \
depfile='.deps/netmrg.Po' tmpdepfile='.deps/netmrg.TPo' \
depmode=gcc3 /bin/sh ./../depcomp \
g++ -DHAVE_CONFIG_H -I. -I. -I./include -I./include -I/usr/include/libxml2 -I/usr/include/mysql -I/usr/include/libxml2 -I/usr/local/include/net-snmp -g -O2 -c -o netmrg.o `test -f 'netmrg.cpp' || echo './'`netmrg.cpp
source='rrd.cpp' object='rrd.o' libtool=no \
depfile='.deps/rrd.Po' tmpdepfile='.deps/rrd.TPo' \
depmode=gcc3 /bin/sh ./../depcomp \
g++ -DHAVE_CONFIG_H -I. -I. -I./include -I./include -I/usr/include/libxml2 -I/usr/include/mysql -I/usr/include/libxml2 -I/usr/local/include/net-snmp -g -O2 -c -o rrd.o `test -f 'rrd.cpp' || echo './'`rrd.cpp
source='settings.cpp' object='settings.o' libtool=no \
depfile='.deps/settings.Po' tmpdepfile='.deps/settings.TPo' \
depmode=gcc3 /bin/sh ./../depcomp \
g++ -DHAVE_CONFIG_H -I. -I. -I./include -I./include -I/usr/include/libxml2 -I/usr/include/mysql -I/usr/include/libxml2 -I/usr/local/include/net-snmp -g -O2 -c -o settings.o `test -f 'settings.cpp' || echo './'`settings.cpp
settings.cpp1030 libxml/xmlmemory.h No such file or directory
settings.cpp1127 libxml/parser.h No such file or directory
settings.cpp84 parse error before `*' token
settings.cpp In function `stdstring xmltostring(...)'
settings.cpp87 `input' undeclared (first use this function)
settings.cpp87 (Each undeclared identifier is reported only once for each
function it appears in.)
settings.cpp At global scope
settings.cpp91 `xmlDocPtr' was not declared in this scope
settings.cpp91 parse error before `,' token
settings.cpp In function `void parse_config_section(...)'
settings.cpp94 `xmlChar' undeclared (first use this function)
settings.cpp94 `value' undeclared (first use this function)
settings.cpp97 `section' undeclared (first use this function)
settings.cpp99 `cur' undeclared (first use this function)
settings.cpp102 `doc' undeclared (first use this function)
settings.cpp102 `xmlNodeListGetString' undeclared (first use this function)
settings.cpp106 parse error before `*' token
settings.cpp109 parse error before `*' token
settings.cpp112 parse error before `*' token
settings.cpp115 parse error before `*' token
settings.cpp121 parse error before `*' token
settings.cpp124 parse error before `*' token
settings.cpp127 parse error before `*' token
settings.cpp130 parse error before `*' token
settings.cpp133 parse error before `*' token
settings.cpp140 parse error before `*' token
settings.cpp143 parse error before `*' token
settings.cpp148 `xmlFree' undeclared (first use this function)
settings.cpp In function `void load_settings_file(const stdstring&)'
settings.cpp156 parse error before `;' token
settings.cpp159 `xmlParseFile' undeclared (first use this function)
settings.cpp166 `xmlDocGetRootElement' undeclared (first use this function)
settings.cpp171 `xmlFreeDoc' undeclared (first use this function)
settings.cpp175 parse error before `*' token
settings.cpp At global scope
settings.cpp182 ISO C++ forbids declaration of `cur' with no type
settings.cpp182 `int cur' used prior to declaration
settings.cpp182 base operand of `->' is not a pointer
settings.cpp185 parse error before `while'
settings.cpp214 ISO C++ forbids declaration of `cur' with no type
settings.cpp214 redefinition of `int cur'
settings.cpp182 `int cur' previously defined here
settings.cpp214 base operand of `->' is not a pointer
settings.cpp215 parse error before `}' token
settings.cpp217 ISO C++ forbids declaration of `xmlFreeDoc' with no type
settings.cpp217 `int xmlFreeDoc' used prior to declaration
settings.cpp218 parse error before `}' token
make[1] *** [settings.o] Error 1
make[1] Leaving directory `/netmrg/src'
make *** [all-recursive] Error 1[/quote73b5632485]

ruler

29-07-2003 15:08:14

You could try installing the libxml-dev files. Or, I know some RPM libxml dev installations use include dir "/usr/include/libxml3". You should try verifying the libxml-dev files are installed first, though.

keefus_a

29-07-2003 15:08:45

I'm failing during make as well, but not as far into it.

[code1dd0d9dd07f][root@sleepyhollow netmrg-0.10pre1]# make
Making all in src
make[1]: Entering directory `/home/downloads/netmrg-0.10pre1/src'
source='db.cpp' object='db.o' libtool=no \
depfile='.deps/db.Po' tmpdepfile='.deps/db.TPo' \
depmode=gcc3 /bin/sh ./../depcomp \
g++ -DHAVE_CONFIG_H -I. -I. -I./include -I./include -I/usr/include/libxml2 -I/usr/include/mysql -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 db.cpp:11:
include/db.h:15:19: mysql.h: No such file or directory
In file included from db.cpp:11:
include/db.h:17: `MYSQL' was not declared in this scope
include/db.h:17: `connection' was not declared in this scope
include/db.h:18: syntax error before `*' token
include/db.h:19: `MYSQL' was not declared in this scope
include/db.h:19: `mysql' was not declared in this scope
include/db.h:19: parse error before `*' token
db.cpp:21: `MYSQL' was not declared in this scope
db.cpp:21: `connection' was not declared in this scope
db.cpp:22: redefinition of `int db_connect'
include/db.h:17: `int db_connect' previously defined here
db.cpp:22: syntax error before `{' token
db.cpp:24: `connection' was not declared in this scope
db.cpp:24: ISO C++ forbids declaration of `mysql_init' with no type
db.cpp:25: parse error before `if'
db.cpp:28: `connection' was not declared in this scope
db.cpp:28: `mysql_error' was not declared in this scope
db.cpp:28: ISO C++ forbids declaration of `debuglogger' with no type
db.cpp:28: `int debuglogger' redeclared as different kind of symbol
include/utils.h:60: previous declaration of `void debuglogger(int, int, const
DeviceInfo*, const std::string&)'
db.cpp:28: initializer list being treated as compound expression
db.cpp:29: parse error before `return'
db.cpp:42: syntax error before `*' token
db.cpp:67: `MYSQL' was not declared in this scope
db.cpp:67: `mysql' was not declared in this scope
db.cpp:67: parse error before `*' token
db.cpp: In function `void db_update(...)':
db.cpp:69: `mysql' undeclared (first use this function)
db.cpp:69: (Each undeclared identifier is reported only once for each function
it appears in.)
db.cpp:69: `query' undeclared (first use this function)
db.cpp:69: `mysql_query' undeclared (first use this function)
db.cpp:71: `info' undeclared (first use this function)
db.cpp:71: `mysql_error' undeclared (first use this function)
db.cpp:71: `debuglogger' cannot be used as a function
db.cpp:75: `debuglogger' cannot be used as a function
db.cpp: In function `std::string db_escape(const std::string&)':
db.cpp:87: `mysql_escape_string' undeclared (first use this function)
make[1]: *** [db.o] Error 1
make[1]: Leaving directory `/home/downloads/netmrg-0.10pre1/src'
make: *** [all-recursive] Error 1[/code1dd0d9dd07f]

machaf

29-07-2003 15:38:03

I install libxml2-dev .rpm and zlib.rpm and I have no errors now.

Make and make install worked

Thanks guys.

balleman

29-07-2003 15:55:07

keefus_a,

Can you verify that you have a mysql.h in your /usr/include/mysql directory? It looks like it can't find that, for some reason.

keefus_a

29-07-2003 16:41:35

It's not there, yet I've got a fully functioning MySQL installation on this machine.
Does anyone know what it is I'm missing? It's RedHat 9.0. Thanks!

balleman

29-07-2003 16:44:17

It should be in the mysql-devel package. Can you verify that you have that installed?

keefus_a

29-07-2003 16:49:46

I thought I had it installed but there was a version issue or something. I finally hunted down the right version of mysql-dev and it's making as I type....fingers crossed...

Thanks for your help