tcpserver mysql patch problem

Started by Mavin, July 19, 2004, 06:45:29 AM

Previous topic - Next topic

Mavin

Hi all!

I have tried for 1 or 2 hours now to compile the ucspi package after applying the tcpserver mysql patch but without any success. I´m running a Slackware server and have configured the conf-ld & conf-cc with mysql patchs but i get these errors when i try make och make setup check

conf-ld looks like this:
gcc -s  -I/usr/include/mysql -L/usr/lib/mysql -lmysqlclientThis will be used to link .o files into an executable.


And conf-cc looks like this:

gcc -O2 -I/usr/include/mysqlThis will be used to compile .c files.



root@nomos:/usr/local/src/ucspi-tcp-0.88# make./compile db.cdb.c:140: error: redefinition of `dbh'db.c:18: error: `dbh' previously defined heredb.c:147: error: redefinition of `db_port'db.c:25: error: `db_port' previously defined heredb.c:153: error: redefinition of `open_db'db.c:31: error: `open_db' previously defined heredb.c:178: error: redefinition of `check_db'db.c:56: error: `check_db' previously defined heredb.c:226: error: redefinition of `db_close'db.c:104: error: `db_close' previously defined heredb.c:236: error: redefinition of `db_ping'db.c:114: error: `db_ping' previously defined heremake: *** [db.o] Error 1


I wonder if there is any package missing or if there is any other problem ?

Regards / Tobias

fatboy

Somebody has found a solution for this problem?

ANY help will be apreciated.

Bye

matt

The problem is almost certainly the location of the MySQL libraries. Fix the conf-* files that point to the MySQL libraries and update them to point to their location on your system. Then it'll compile with no troubles.

fatboy

Noup, my conf-cc and conf-ld are ok, both with the rigth paths..

conf-cc with the mysql headers path
and
conf-ld with the mysql libs path.

Im using mysql V4.1 maybe here is the problem...


Bye

fatboy


matt

Lucky for you, someone just hired me to work on their Linux system. The problem is in db.c, you need to edit that file, and look for (near the top of the file) the include line for mysql.h and alter it to be mysql/mysql.h.

IE, it looks something like:

#include <mysql.h>

and needs to be:

#include <mysql/mysql.h>

make that change and then it'll compile successfully.

Matt