This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

Help with compiling Eggy w/ MySQL.mod

Discussion of Eggdrop's code and module programming in C.
Post Reply
X
XceL
Voice
Posts: 20
Joined: Wed Jan 14, 2004 8:57 pm

Help with compiling Eggy w/ MySQL.mod

Post by XceL »

The shell provider claims that MySQL is installed on the machine, but when I tryi to compile, I get the following errors. any help appreciated, thanks.

Code: Select all

[xcel@******** (~/eggdrop1.6.17)]$ gmake
gmake[1]: Entering directory `/usr/home/xcel/eggdrop1.6.17/src'
This may take a while. Go get some runts.

gmake[2]: Entering directory `/usr/home/xcel/eggdrop1.6.17/src/md5'
gmake[2]: Nothing to be done for `md5'.
gmake[2]: Leaving directory `/usr/home/xcel/eggdrop1.6.17/src/md5'
gmake[2]: Entering directory `/usr/home/xcel/eggdrop1.6.17/src/compat'
gmake[2]: Nothing to be done for `compat'.
gmake[2]: Leaving directory `/usr/home/xcel/eggdrop1.6.17/src/compat'

---------- Yeah! That's the compiling, now the linking! ----------

Linking eggdrop (standard build).

gcc -pipe -o ../eggdrop bg.o botcmd.o botmsg.o botnet.o chanprog.o cmds.o dcc.o dccutil.o dns.o flags.o language.o match.o main.o mem.o misc.o misc_file.o modules.o net.o rfc1459.o tcl.o tcldcc.o tclhash.o tclmisc.o tcluser.o userent.o userrec.o users.o  -L/usr/local/lib -ltcl84 -lm  md5/md5c.o compat/*.o `cat mod/mod.xlibs`
touch ../eggdrop

Successful compile: eggdrop

gmake[1]: Leaving directory `/usr/home/xcel/eggdrop1.6.17/src'
gmake[1]: Entering directory `/usr/home/xcel/eggdrop1.6.17/src/mod'
gmake[2]: Entering directory `/usr/home/xcel/eggdrop1.6.17/src/mod/assoc.mod'
gmake[2]: Nothing to be done for `modules'.
gmake[2]: Leaving directory `/usr/home/xcel/eggdrop1.6.17/src/mod/assoc.mod'
gmake[2]: Entering directory `/usr/home/xcel/eggdrop1.6.17/src/mod/blowfish.mod'
gmake[2]: Nothing to be done for `modules'.
gmake[2]: Leaving directory `/usr/home/xcel/eggdrop1.6.17/src/mod/blowfish.mod'
gmake[2]: Entering directory `/usr/home/xcel/eggdrop1.6.17/src/mod/channels.mod'
gmake[2]: Nothing to be done for `modules'.
gmake[2]: Leaving directory `/usr/home/xcel/eggdrop1.6.17/src/mod/channels.mod'
gmake[2]: Entering directory `/usr/home/xcel/eggdrop1.6.17/src/mod/compress.mod'
gmake[2]: Nothing to be done for `modules'.
gmake[2]: Leaving directory `/usr/home/xcel/eggdrop1.6.17/src/mod/compress.mod'
gmake[2]: Entering directory `/usr/home/xcel/eggdrop1.6.17/src/mod/console.mod'
gmake[2]: Nothing to be done for `modules'.
gmake[2]: Leaving directory `/usr/home/xcel/eggdrop1.6.17/src/mod/console.mod'
gmake[2]: Entering directory `/usr/home/xcel/eggdrop1.6.17/src/mod/ctcp.mod'
gmake[2]: Nothing to be done for `modules'.
gmake[2]: Leaving directory `/usr/home/xcel/eggdrop1.6.17/src/mod/ctcp.mod'
gmake[2]: Entering directory `/usr/home/xcel/eggdrop1.6.17/src/mod/dns.mod'
gmake[2]: Nothing to be done for `modules'.
gmake[2]: Leaving directory `/usr/home/xcel/eggdrop1.6.17/src/mod/dns.mod'
gmake[2]: Entering directory `/usr/home/xcel/eggdrop1.6.17/src/mod/filesys.mod'
gmake[2]: Nothing to be done for `modules'.
gmake[2]: Leaving directory `/usr/home/xcel/eggdrop1.6.17/src/mod/filesys.mod'
gmake[2]: Entering directory `/usr/home/xcel/eggdrop1.6.17/src/mod/irc.mod'
gmake[2]: Nothing to be done for `modules'.
gmake[2]: Leaving directory `/usr/home/xcel/eggdrop1.6.17/src/mod/irc.mod'
gmake[2]: Entering directory `/usr/home/xcel/eggdrop1.6.17/src/mod/mysql.mod'
gcc -pipe -fPIC -g -O2 -Wall -I. -I../../.. -I../../.. -I../../../src/mod -DHAVE_CONFIG_H   `mysql_config --cflags` -DMAKING_MODS -c .././mysql.mod/mysql.c
In file included from .././mysql.mod/mysql_mod.h:32,
                 from .././mysql.mod/mysql.c:24:
../../../src/mod/module.h:190:1: warning: "list_delete" redefined
In file included from .././mysql.mod/mysql.c:24:
.././mysql.mod/mysql_mod.h:31:1: warning: this is the location of the previous definition
.././mysql.mod/mysql_mod.h:34:25: mysql/mysql.h: No such file or directory
.././mysql.mod/mysql.c:31: error: syntax error before '*' token
.././mysql.mod/mysql.c:31: warning: type defaults to `int' in declaration of `dbc'
.././mysql.mod/mysql.c:31: warning: data definition has no type or storage class
.././mysql.mod/mysql.c: In function `tcl_mysql_connect':
.././mysql.mod/mysql.c:152: warning: implicit declaration of function `mysql_init'
.././mysql.mod/mysql.c:152: warning: assignment makes pointer from integer without a cast
.././mysql.mod/mysql.c:166: warning: implicit declaration of function `mysql_real_connect'
.././mysql.mod/mysql.c:171: warning: implicit declaration of function `mysql_error'
.././mysql.mod/mysql.c:171: warning: passing arg 2 of `Tcl_AppendToObj' makes pointer from integer without a cast
.././mysql.mod/mysql.c: In function `tcl_mysql_query':
.././mysql.mod/mysql.c:200: error: `MYSQL_RES' undeclared (first use in this function)
.././mysql.mod/mysql.c:200: error: (Each undeclared identifier is reported only once
.././mysql.mod/mysql.c:200: error: for each function it appears in.)
.././mysql.mod/mysql.c:200: error: `result' undeclared (first use in this function)
.././mysql.mod/mysql.c:202: error: syntax error before "row"
.././mysql.mod/mysql.c:209: warning: implicit declaration of function `mysql_query'
.././mysql.mod/mysql.c:212: warning: passing arg 2 of `Tcl_AppendToObj' makes pointer from integer without a cast
.././mysql.mod/mysql.c:218: warning: implicit declaration of function `mysql_store_result'
.././mysql.mod/mysql.c:220: warning: implicit declaration of function `mysql_num_fields'
.././mysql.mod/mysql.c:224: error: `row' undeclared (first use in this function)
.././mysql.mod/mysql.c:224: warning: implicit declaration of function `mysql_fetch_row'
.././mysql.mod/mysql.c:233: warning: implicit declaration of function `mysql_free_result'
.././mysql.mod/mysql.c: In function `tcl_mysql_escape':
.././mysql.mod/mysql.c:267: warning: implicit declaration of function `mysql_real_escape_string'
.././mysql.mod/mysql.c:268: warning: implicit declaration of function `mysql_escape_string'
.././mysql.mod/mysql.c: In function `tcl_mysql_errno':
.././mysql.mod/mysql.c:283: warning: implicit declaration of function `mysql_errno'
.././mysql.mod/mysql.c: In function `tcl_mysql_ping':
.././mysql.mod/mysql.c:295: warning: implicit declaration of function `mysql_ping'
.././mysql.mod/mysql.c: In function `tcl_mysql_insert_id':
.././mysql.mod/mysql.c:332: warning: implicit declaration of function `mysql_insert_id'
.././mysql.mod/mysql.c: In function `tcl_mysql_affected_rows':
.././mysql.mod/mysql.c:354: warning: implicit declaration of function `mysql_affected_rows'
.././mysql.mod/mysql.c: In function `closedb':
.././mysql.mod/mysql.c:362: warning: implicit declaration of function `mysql_close'
gmake[2]: *** [../mysql.o] Error 1
gmake[2]: Leaving directory `/usr/home/xcel/eggdrop1.6.17/src/mod/mysql.mod'
gmake[1]: *** [mysql.mod_so] Error 2
gmake[1]: Leaving directory `/usr/home/xcel/eggdrop1.6.17/src/mod'
gmake: *** [modules] Error 2
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Re: Help with compiling Eggy w/ MySQL.mod

Post by demond »

XceL wrote:The shell provider claims that MySQL is installed on the machine
no it's not (at least not where mysql.mod is looking for it)
.././mysql.mod/mysql_mod.h:34:25: mysql/mysql.h: No such file or directory
see?
X
XceL
Voice
Posts: 20
Joined: Wed Jan 14, 2004 8:57 pm

Post by XceL »

Okay, well I changed the source of the include header, now I get this.

Code: Select all

gmake[2]: Entering directory `/usr/home/xcel/eggdrop1.6.17/src/mod/mysql.mod'
gcc -pipe -fPIC -g -O2 -Wall -I. -I../../.. -I../../.. -I../../../src/mod -DHAVE_CONFIG_H   `mysql_config --cflags` -DMAKING_MODS -c .././mysql.mod/mysql.c
In file included from .././mysql.mod/mysql_mod.h:32,
                 from .././mysql.mod/mysql.c:24:
../../../src/mod/module.h:190:1: warning: "list_delete" redefined
In file included from .././mysql.mod/mysql.c:24:
.././mysql.mod/mysql_mod.h:31:1: warning: this is the location of the previous definition
mv mysql.o ../
ld -Bshareable -x -o ../../../mysql.so ../mysql.o `mysql_config --libs`
ld: cannot find -lmysqlclient
gmake[2]: *** [../../../mysql.so] Error 1
gmake[2]: Leaving directory `/usr/home/xcel/eggdrop1.6.17/src/mod/mysql.mod'
gmake[1]: *** [mysql.mod_so] Error 2
gmake[1]: Leaving directory `/usr/home/xcel/eggdrop1.6.17/src/mod'
gmake: *** [modules] Error 2
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

your system lacks mySQL client libraries (or its mySQL installation is screwed); complain to your lame admin or install those yourself
X
XceL
Voice
Posts: 20
Joined: Wed Jan 14, 2004 8:57 pm

Post by XceL »

I got around it now but, i need help, it says it cant connect to my database, tell me if this code in the tcl looks right please.

Code: Select all

loadmodule mysql
mysql_connect XceL mysql61.secureserver.net user pass
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

post a log
X
XceL
Voice
Posts: 20
Joined: Wed Jan 14, 2004 8:57 pm

Post by XceL »

I got it all figured out now. Thanks. :)
R
RyanH
Voice
Posts: 4
Joined: Tue Dec 06, 2005 7:13 pm
Contact:

Post by RyanH »

Mind stating how you got around it? I am receiving the same errors that you received the second time around.
R
RyanH
Voice
Posts: 4
Joined: Tue Dec 06, 2005 7:13 pm
Contact:

Post by RyanH »

My apologies, my error is completely different. Sorry.
Post Reply