egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Problems with mysql.mod
Goto page 1, 2  Next
 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Modules & Programming
View previous topic :: View next topic  
Author Message
Buffy_25
Halfop


Joined: 22 Nov 2003
Posts: 63

PostPosted: Fri Nov 04, 2005 5:44 am    Post subject: Problems with mysql.mod Reply with quote

Hi,

I'm having a problem with installing mysql.mod.
(i have mysql installed with RH9.0 and it's running)

I downloaded the mysql.mod.0.6.tar.bz2 from barkerjr.net and unzipped it in eggdrop1.6.17/src/mod.
Went back to eggdrop1.6.17 dir, and did "make config"
After this i did "make"
I got a en error telling my in one of the lines : mysql.h : No such file or directory
(i tried to locate this file, but idd i couldn't find it)
So i browsed the forum and found that i had to install the mysql-dev
I did it with apt-get install mysql-devel (it installed mysql-server + mysql-devel)
After this i did again the "make" in eggdrop1.6.17 but got the following error:

Quote:

make[1]: Entering directory `/home/Buffy/mydir/eggdrop1.6.17/src'
This may take a while. Go get some runts.

make[2]: Entering directory `/home/Buffy/mydir/eggdrop1.6.17/src/md5'
make[2]: Nothing to be done for `md5'.
make[2]: Leaving directory `/home/Buffy/mydir/eggdrop1.6.17/src/md5'
make[2]: Entering directory `/home/Buffy/mydir/eggdrop1.6.17/src/compat'
make[2]: Nothing to be done for `compat'.
make[2]: Leaving directory `/home/Buffy/mydir/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 -ltcl8.4 -lm -ldl -lnsl
md5/md5c.o compat/*.o `cat mod/mod.xlibs`
touch ../eggdrop

Successful compile: eggdrop

make[1]: Leaving directory `/home/Buffy/mydir/eggdrop1.6.17/src'
make[1]: Entering directory `/home/Buffy/mydir/eggdrop1.6.17/src/mod'
make[2]: Entering directory
`/home/Buffy/mydir/eggdrop1.6.17/src/mod/assoc.mod'
make[2]: Nothing to be done for `modules'.
make[2]: Leaving directory
`/home/Buffy/mydir/eggdrop1.6.17/src/mod/assoc.mod'
make[2]: Entering directory
`/home/Buffy/mydir/eggdrop1.6.17/src/mod/blowfish.mod'
make[2]: Nothing to be done for `modules'.
make[2]: Leaving directory
`/home/Buffy/mydir/eggdrop1.6.17/src/mod/blowfish.mod'
make[2]: Entering directory
`/home/Buffy/mydir/eggdrop1.6.17/src/mod/channels.mod'
make[2]: Nothing to be done for `modules'.
make[2]: Leaving directory
`/home/Buffy/mydir/eggdrop1.6.17/src/mod/channels.mod'
make[2]: Entering directory
`/home/Buffy/mydir/eggdrop1.6.17/src/mod/console.mod'
make[2]: Nothing to be done for `modules'.
make[2]: Leaving directory
`/home/Buffy/mydir/eggdrop1.6.17/src/mod/console.mod'
make[2]: Entering directory
`/home/Buffy/mydir/eggdrop1.6.17/src/mod/ctcp.mod'
make[2]: Nothing to be done for `modules'.
make[2]: Leaving directory
`/home/Buffy/mydir/eggdrop1.6.17/src/mod/ctcp.mod'make[2]: Entering
directory `/home/Buffy/mydir/eggdrop1.6.17/src/mod/dns.mod'make[2]:
Nothing to be done for `modules'.
make[2]: Leaving directory
`/home/Buffy/mydir/eggdrop1.6.17/src/mod/dns.mod'
make[2]: Entering directory
`/home/Buffy/mydir/eggdrop1.6.17/src/mod/filesys.mod'
make[2]: Nothing to be done for `modules'.
make[2]: Leaving directory
`/home/Buffy/mydir/eggdrop1.6.17/src/mod/filesys.mod'
make[2]: Entering directory
`/home/Buffy/mydir/eggdrop1.6.17/src/mod/irc.mod'make[2]: Nothing to be
done for `modules'.
make[2]: Leaving directory
`/home/Buffy/mydir/eggdrop1.6.17/src/mod/irc.mod'
make[2]: Entering directory
`/home/Buffy/mydir/eggdrop1.6.17/src/mod/megahal.mod'
make[2]: Nothing to be done for `modules'.
make[2]: Leaving directory
`/home/Buffy/mydir/eggdrop1.6.17/src/mod/megahal.mod'
make[2]: Entering directory
`/home/Buffy/mydir/eggdrop1.6.17/src/mod/mysql.mod'
gcc -pipe -shared -nostartfiles -o ../../../mysql.so ../mysql.o
`mysql_config --libs`
/usr/bin/ld: cannot find -lmysqlclient
collect2: ld returned 1 exit status
make[2]: *** [../../../mysql.so] Error 1
make[2]: Leaving directory
`/home/Buffy/mydir/eggdrop1.6.17/src/mod/mysql.mod'
make[1]: *** [mysql.mod_so] Error 2
make[1]: Leaving directory `/home/Buffy/mydir/eggdrop1.6.17/src/mod'
make: *** [modules] Error 2


Could someone help me how i could continue?
Thank you.

Buffy
Back to top
View user's profile Send private message
Alchera
Revered One


Joined: 11 Aug 2003
Posts: 3344
Location: Ballarat Victoria, Australia

PostPosted: Fri Nov 04, 2005 7:20 am    Post subject: Reply with quote

This has nothing to do with Scripting Help. Razz

Posts of this nature are made in Modules & Programming.
_________________
Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM
Back to top
View user's profile Send private message Visit poster's website
Buffy_25
Halfop


Joined: 22 Nov 2003
Posts: 63

PostPosted: Sat Nov 05, 2005 7:01 am    Post subject: Reply with quote

Ah sorry guys. My mistake Rolling Eyes

I already did the following:

- installed mysql-devel -> apt-get install mysql-devel
- before doing make i did: export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib/mysql
- when i do at shell command: find / -name libmysql* (i got this then)
Quote:

/usr/lib/mysql/libmysqlclient.so.10.0.0
/usr/lib/mysql/libmysqlclient.so.10
/usr/lib/mysql/libmysqlclient_r.so.10.0.0
/usr/lib/mysql/libmysqlclient_r.so.10
/usr/lib/mysql/libmysqlclient.a
/usr/lib/mysql/libmysqlclient.so
/usr/lib/mysql/libmysqlclient_r.a
/usr/lib/mysql/libmysqlclient_r.so

- this is what i have in etc/ld.so.conf :
Quote:

/usr/kerberos/lib
/usr/X11R6/lib
/usr/lib/qt-3.1/lib
/usr/lib/mysql (i also tried to make it just /usr/lib)
/usr/local/lib/libtcl8.4.so


Can someone help me a bit more please?

Buffy
Back to top
View user's profile Send private message
Buffy_25
Halfop


Joined: 22 Nov 2003
Posts: 63

PostPosted: Sun Nov 06, 2005 5:48 am    Post subject: Reply with quote

I thought i found the problem, after echo'ing a variable:

Quote:

echo $LD_LIBRARY_PATH
:/usr/lib/mysql:/usr/lib/mysql:/usr/lib/mysql

So i did :
Quote:

export LD_LIBRARY_PATH=/usr/lib/mysql
echo $LD_LIBRARY_PATH
/usr/lib/mysql


After this i retried 'make config' and then 'make' in my eggdrop1.6.17 dir,
But in vain Crying or Very sad

Thank you for your assistance.

Buffy
Back to top
View user's profile Send private message
Buffy_25
Halfop


Joined: 22 Nov 2003
Posts: 63

PostPosted: Wed Nov 09, 2005 2:51 pm    Post subject: Reply with quote

In my config i have the following:

Quote:

# mysql_config
Usage: /usr/bin/mysql_config [OPTIONS]
Options:
--cflags [-I'/usr/include/mysql']
--libs [-L'/usr/lib/mysql' -lmysqlclient -lz -lcrypt -lnsl -lm]
--socket [/var/lib/mysql/mysql.sock]
--port [3306]
--version [3.23.58]
You have new mail in /var/spool/mail/root


Shouldn't i change something in the makefile file from eggdrop1.6.17?
I read something about LDFLAGS,... but i'm not sure though Confused

Can someone help me a bit more please? (or did i forget any steps to check)

Thanks.

Buffy
Back to top
View user's profile Send private message
demond
Revered One


Joined: 12 Jun 2004
Posts: 3073
Location: San Francisco, CA

PostPosted: Wed Nov 09, 2005 11:43 pm    Post subject: Reply with quote

add --cflags output to CFLAGS options and --libs output to LDFLAGS options in bot's Makefile (after make config and before make)
_________________
connection, sharing, dcc problems? click <here>
before asking for scripting help, read <this>
use [code] tag when posting logs, code
Back to top
View user's profile Send private message Visit poster's website
Buffy_25
Halfop


Joined: 22 Nov 2003
Posts: 63

PostPosted: Thu Nov 10, 2005 1:04 pm    Post subject: Reply with quote

Hello demond,

So first i went back into my eggdrop1.6.17 dir and typed: make config
After this, i edited my Makefile (eggdrop1.6.17) as below:
Quote:

#
# This is the Makefile for EGGDROP (the IRC bot)
# You should never need to edit this.
#
# $Id: Makefile.in,v 1.39 2004/07/25 11:17:33 wcc Exp $

SHELL = /bin/sh
top_srcdir = .
srcdir = .



prefix = ${HOME}/eggdrop
DEST = ${prefix}
EGGEXEC = eggdrop
EGGVERSION = 1.6.17

# things you can put here:
# -Wall if you're using gcc and it supports it
# (configure usually detects this anyway now)
#
# -DDEBUG_ASSERT to enable assert debugging
# -DDEBUG_MEM to be able to debug memory allocation (.debug)
# These can both be set by using 'make debug'
# or 'make sdebug'
CFLGS =

# ./configure SHOULD set these; however you may need to tweak them to
# get modules to compile. If you do, PLEASE let the development team know,
# so we can incorporate needed changes into the next release. You can
# contact us at eggdev@eggheads.org, as always.

# Compiler
CC = gcc -pipe
MOD_CC = gcc -pipe
SHLIB_CC = gcc -pipe -fPIC
CFLAGS=-I/usr/include/mysql
LDFLAGS=-L/usr/lib/mysql -lmysqlclient -lz -lcrypt -lnsl -lm


# Linker
LD = gcc -pipe
MOD_LD = gcc -pipe
SHLIB_LD = gcc -pipe -shared -nostartfiles

# Stripping
...

After this, i run the command : Make
But i got the same error:
Quote:

# make
make: *** Warning: File `Makefile' has modification time in the future (2005-11-10 17:52:12 > 2005-11-10 12:53:38.961234)
make[1]: Entering directory `/home/Buffy/mydir/eggdrop1.6.17/src'
This may take a while. Go get some runts.

make[2]: Entering directory `/home/Buffy/mydir/eggdrop1.6.17/src/md5'
make[2]: Nothing to be done for `md5'.
make[2]: Leaving directory `/home/Buffy/mydir/eggdrop1.6.17/src/md5'
make[2]: Entering directory `/home/Buffy/mydir/eggdrop1.6.17/src/compat'
make[2]: Nothing to be done for `compat'.
make[2]: Leaving directory `/home/Buffy/mydir/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 -ltcl8.4 -lm -ldl -lnsl md5/md5c.o compat/*.o `cat mod/mod.xlibs`
touch ../eggdrop

Successful compile: eggdrop

make[1]: Leaving directory `/home/Buffy/mydir/eggdrop1.6.17/src'
make[1]: Entering directory `/home/Buffy/mydir/eggdrop1.6.17/src/mod'
make[2]: Entering directory `/home/Buffy/mydir/eggdrop1.6.17/src/mod/assoc.mod'
make[2]: Nothing to be done for `modules'.
make[2]: Leaving directory `/home/Buffy/mydir/eggdrop1.6.17/src/mod/assoc.mod'
make[2]: Entering directory `/home/Buffy/mydir/eggdrop1.6.17/src/mod/blowfish.mod'
make[2]: Nothing to be done for `modules'.
make[2]: Leaving directory `/home/Buffy/mydir/eggdrop1.6.17/src/mod/blowfish.mod'
make[2]: Entering directory `/home/Buffy/mydir/eggdrop1.6.17/src/mod/channels.mod'
make[2]: Nothing to be done for `modules'.
make[2]: Leaving directory `/home/Buffy/mydir/eggdrop1.6.17/src/mod/channels.mod'
make[2]: Entering directory `/home/Buffy/mydir/eggdrop1.6.17/src/mod/console.mod'
make[2]: Nothing to be done for `modules'.
make[2]: Leaving directory `/home/Buffy/mydir/eggdrop1.6.17/src/mod/console.mod'
make[2]: Entering directory `/home/Buffy/mydir/eggdrop1.6.17/src/mod/ctcp.mod'
make[2]: Nothing to be done for `modules'.
make[2]: Leaving directory `/home/Buffy/mydir/eggdrop1.6.17/src/mod/ctcp.mod'make[2]: Entering directory `/home/Buffy/mydir/eggdrop1.6.17/src/mod/dns.mod'make[2]: Nothing to be done for `modules'.
make[2]: Leaving directory `/home/Buffy/mydir/eggdrop1.6.17/src/mod/dns.mod'
make[2]: Entering directory `/home/Buffy/mydir/eggdrop1.6.17/src/mod/filesys.mod'
make[2]: Nothing to be done for `modules'.
make[2]: Leaving directory `/home/Buffy/mydir/eggdrop1.6.17/src/mod/filesys.mod'
make[2]: Entering directory `/home/Buffy/mydir/eggdrop1.6.17/src/mod/irc.mod'make[2]: Nothing to be done for `modules'.
make[2]: Leaving directory `/home/Buffy/mydir/eggdrop1.6.17/src/mod/irc.mod'
make[2]: Entering directory `/home/Buffy/mydir/eggdrop1.6.17/src/mod/megahal.mod'
make[2]: Nothing to be done for `modules'.
make[2]: Leaving directory `/home/Buffy/mydir/eggdrop1.6.17/src/mod/megahal.mod'
make[2]: Entering directory `/home/Buffy/mydir/eggdrop1.6.17/src/mod/mysql.mod'
gcc -pipe -shared -nostartfiles -o ../../../mysql.so ../mysql.o `mysql_config --libs`
/usr/bin/ld: cannot find -lmysqlclient
collect2: ld returned 1 exit status
make[2]: *** [../../../mysql.so] Error 1
make[2]: Leaving directory `/home/Buffy/mydir/eggdrop1.6.17/src/mod/mysql.mod'
make[1]: *** [mysql.mod_so] Error 2
make[1]: Leaving directory `/home/Buffy/mydir/eggdrop1.6.17/src/mod'


Did i edited the makefile wrongly?

Thanks in advance.

Buffy
Back to top
View user's profile Send private message
demond
Revered One


Joined: 12 Jun 2004
Posts: 3073
Location: San Francisco, CA

PostPosted: Thu Nov 10, 2005 11:08 pm    Post subject: Reply with quote

check out also src/Makefile
_________________
connection, sharing, dcc problems? click <here>
before asking for scripting help, read <this>
use [code] tag when posting logs, code
Back to top
View user's profile Send private message Visit poster's website
demond
Revered One


Joined: 12 Jun 2004
Posts: 3073
Location: San Francisco, CA

PostPosted: Thu Nov 10, 2005 11:15 pm    Post subject: Reply with quote

oops, your mysql.mod Makefile is screwed, fix it

try with -Bshareable instead of -shared
_________________
connection, sharing, dcc problems? click <here>
before asking for scripting help, read <this>
use [code] tag when posting logs, code
Back to top
View user's profile Send private message Visit poster's website
Buffy_25
Halfop


Joined: 22 Nov 2003
Posts: 63

PostPosted: Fri Nov 11, 2005 3:57 pm    Post subject: Reply with quote

Hi demon.
Thanks for helping me with this.

But i got lost:
I edited the makefile in Eggdrop1.6.17 main dir.
So i had added the 2 lines below (bold in my previous msg)
Quote:

CFLAGS=-I/usr/include/mysql
LDFLAGS=-L/usr/lib/mysql -lmysqlclient -lz -lcrypt -lnsl -lm

I think you meant that i had to add those outputs to another makefile?
The one in source? or the one in mysql.mod?

So i deleted again the modifications i did to the makefile in eggdrop1.6.17 main dir.

Before i screw everything up, i'll wait for your confirmation (or further actions)

Thanks.

Buffy
Back to top
View user's profile Send private message
demond
Revered One


Joined: 12 Jun 2004
Posts: 3073
Location: San Francisco, CA

PostPosted: Fri Nov 11, 2005 11:38 pm    Post subject: Reply with quote

check /usr/lib/mysql/libmysql* files

maybe a link is broken (libmysqlclient.so should be a link), or file permissions are not right ones

and try what I said in my last post (replace -shared with -Bshareable in mysql.mod Makefile)
_________________
connection, sharing, dcc problems? click <here>
before asking for scripting help, read <this>
use [code] tag when posting logs, code
Back to top
View user's profile Send private message Visit poster's website
Buffy_25
Halfop


Joined: 22 Nov 2003
Posts: 63

PostPosted: Sun Nov 13, 2005 4:34 am    Post subject: Reply with quote

Hi demond,

I looked for the libmysql* files, and i have the following:
Quote:

/usr/lib/mysql/libmysqlclient.so.10.0.0
/usr/lib/mysql/libmysqlclient.so.10
/usr/lib/mysql/libmysqlclient_r.so.10.0.0
/usr/lib/mysql/libmysqlclient_r.so.10
/usr/lib/mysql/libmysqlclient.a
/usr/lib/mysql/libmysqlclient.so
/usr/lib/mysql/libmysqlclient_r.a
/usr/lib/mysql/libmysqlclient_r.so

I checked the link on libmysqlclient.so (it's linking to libmysqlclient.so.10.0.0)
And the file permissions for the dir /usr/lib/mysql are:
Quote:

owner: rxw
group: rx
other: rx


Additionally, I checked for the Makefile (in mysql.mod) to change that setting, but i couldn't find the -shared in that makefile. Also, it couldn't be found in the Makefile of:
- eggdrop1.6.17/src/mod/
- eggdrop1.6.17/src/

But, i found that -shared setting in the Makefile in /eggdrop1.6.17/
I changed that into -Bshareable But i still got the same error:
Quote:

make[2]: Leaving directory `/home/Buffy/mydir/eggdrop1.6.17/src/mod/megahal.mod'
make[2]: Entering directory `/home/Buffy/mydir/eggdrop1.6.17/src/mod/mysql.mod'
gcc -pipe -Bshareable -nostartfiles -o ../../../mysql.so ../mysql.o `mysql_config --libs`
/usr/bin/ld: cannot find -lmysqlclient
collect2: ld returned 1 exit status
make[2]: *** [../../../mysql.so] Error 1
make[2]: Leaving directory `/home/Buffy/mydir/eggdrop1.6.17/src/mod/mysql.mod'
make[1]: *** [mysql.mod_so] Error 2
make[1]: Leaving directory `/home/Buffy/mydir/eggdrop1.6.17/src/mod'
make: *** [modules] Error 2

Since i got the same problem, i have put back -shared as setting.

Do you want me to post the content of each MakeFile i have in the different dir's of my eggdrop1.6.17?
(i didn't edit anything else, exept the things you told me to add...if still same error, i rechanged all as origine to avoid to screw it)

Are there any other possibilities that i could check why i'm getting this error?

Thanks.

Buffy
Back to top
View user's profile Send private message
demond
Revered One


Joined: 12 Jun 2004
Posts: 3073
Location: San Francisco, CA

PostPosted: Tue Nov 15, 2005 4:27 am    Post subject: Reply with quote

copy mysql libs & links (and fix the links if necessary) to /usr/lib
_________________
connection, sharing, dcc problems? click <here>
before asking for scripting help, read <this>
use [code] tag when posting logs, code
Back to top
View user's profile Send private message Visit poster's website
Buffy_25
Halfop


Joined: 22 Nov 2003
Posts: 63

PostPosted: Tue Nov 15, 2005 12:54 pm    Post subject: Reply with quote

Hi demond.

Thnx for your reply.

I copied all my mysql lib & links (/usr/lib/mysql/) into /usr/lib/
(i had to recreate a link from libmysqlclient.so and libmysqlclient.so.10 to libmysqlclient.so.10.0.0 and same for libmysqlclient_r.so and libmysqlclient_r.so.10 link to libmysqlclient_r.so.10.0.0)

But now i got a different error:
Quote:

gcc -pipe -shared -nostartfiles -o ../../../mysql.so ../mysql.o `mysql_config --libs`
/usr/bin/ld: cannot find -lz
collect2: ld returned 1 exit status
make[2]: *** [../../../mysql.so] Error 1
make[2]: Leaving directory `/home/Buffy/mydir/eggdrop1.6.17/src/mod/mysql.mod'
make[1]: *** [mysql.mod_so] Error 2
make[1]: Leaving directory `/home/Buffy/mydir/eggdrop1.6.17/src/mod'
make: *** [modules] Error 2


Maybe we are already a step further ? Smile

Thank you for your assistance.

Buffy
Back to top
View user's profile Send private message
demond
Revered One


Joined: 12 Jun 2004
Posts: 3073
Location: San Francisco, CA

PostPosted: Wed Nov 16, 2005 4:16 am    Post subject: Reply with quote

there is something wrong with your gcc installation

anyway.. proceed as before, locate libz and copy it to /usr/lib
_________________
connection, sharing, dcc problems? click <here>
before asking for scripting help, read <this>
use [code] tag when posting logs, code
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Modules & Programming All times are GMT - 4 Hours
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber