Anope IRC Services

Please login or register.

Login with username, password and session length
Advanced search  

News:

Pages: [1]   Go Down

Author Topic: 1.7.17 - mysql support  (Read 14285 times)

0 Members and 1 Guest are viewing this topic.

mEh

  • Guest
1.7.17 - mysql support
« on: October 19, 2006, 03:51:14 AM »

Hey,

just a new problem... during ./Config 1.7.17 i noticed this...

Quote
...config.status: creating include/sysconf.h

Modules: Yes
MySQL: No

...


this only happens with 1.7.17 - i also tried 1.7.16 / 1.7.15 -> mysql support will be enabled.

any idea?

:/
Logged

heinz

  • Guest
(No subject)
« Reply #1 on: October 19, 2006, 04:50:40 AM »

A new mysql_config detection was added to 1.7.17, so look during configure for something along the lines of:

checking for mysql_config... [answer]
checking whether mysql_config produces valid results.. [answer]

If the latter says no, then check config.log for "mysql_config" and any compilation errors when it tries the second mysql_config check, and also the output of mysql_config --cflags

If you need help with that, just post them here and either Rob or GD will be able to advise i'm sure :)
Logged

mEh

  • Guest
(No subject)
« Reply #2 on: October 19, 2006, 06:48:16 AM »

Hey,

./Config
Quote
checking for mysql_config... /usr/bin/mysql_config
checking if mysql_config produces valid values... no


config.log
Quote
configure:2815: checking for mysql_config
configure:2833: found /usr/bin/mysql_config
configure:2846: result: /usr/bin/mysql_config
configure:2882: gcc -o conftest -pipe -g -O2 -I/usr/include/mysql -DBIG_JOINS=1   -L/usr/lib/mysql -lmysqlclient -lz -lcrypt -lnsl -lm conftest.c  >&5
/tmp/ccPknV9l.o(.text+0x11): In function `main':
/home/mEh/source/anope-1.7.17/conftest.c:13: undefined reference to `mysql_init'
collect2: ld returned 1 exit status
configure:2888: $? = 1
configure: failed program was:
| /* confdefs.h.  */
|
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| /* end confdefs.h.  */
| #include <mysql.h>
| int
| main ()
| {
| MYSQL *mysql = mysql_init(0);
|   ;
|   return 0;
| }


/usr/bin/mysql_config --cflags
Quote
-I/usr/include/mysql -DBIG_JOINS=1


;(
Logged

Pieter Bootsma

  • Team
  • *
  • Offline Offline
  • Posts: 189
    • http://geniusdex.net/
(No subject)
« Reply #3 on: October 19, 2006, 12:08:21 PM »

What does mysql_config --libs return?
Logged

SpaceDoG

  • Anope User
  • Offline Offline
  • Posts: 183
    • http://www.hypermutt.net
(No subject)
« Reply #4 on: October 19, 2006, 12:33:50 PM »

/usr/bin/mysql_config --cflags
-I/usr/include/mysql -mcpu=i486 -fno-strength-reduce

mysql_config --libs
-L/usr/lib/mysql -lmysqlclient -lz -lcrypt -lnsl -lm -lc -lnss_files -lnss_dns -lresolv -lc -lnss_files -lnss_dns -lresolv

That's what it returns for me
Logged

mEh

  • Guest
(No subject)
« Reply #5 on: October 19, 2006, 03:32:07 PM »

mysql_config --libs
Quote
-L/usr/lib/mysql -lmysqlclient -lz -lcrypt -lnsl -lm
Logged

djGrrr

  • Anope User
  • Offline Offline
  • Posts: 51
    • http://www.p2p-network.net/
(No subject)
« Reply #6 on: October 19, 2006, 04:09:52 PM »

here is the solution:
as root:
cd /usr/lib/mysql
ln -s /usr/lib/libmysqlclient.so
ln -s /usr/lib/libmysqlclient_r.so

this will fix the broken mysql shared libs install
Logged
P2P-NET Network Staff

SNU

  • Anope User
  • Offline Offline
  • Posts: 158
    • http://www.firstclassirc.com
(No subject)
« Reply #7 on: October 19, 2006, 05:01:15 PM »

Hi. For me it does not fix. see lines below:

./Config shows the same as in entry posting first yes second no.

config.log:
Code: [Select]
configure:2815: checking for mysql_config
configure:2833: found /usr/bin/mysql_config
configure:2846: result: /usr/bin/mysql_config
configure:2882: gcc -o conftest -pipe -g -O2 -I'/usr/include/mysql'   -L/usr/lib/mysql -lmysqlclient -lz -lcrypt -lnsl -lm conftest.c  >&5
conftest.c:9:19: mysql.h: No such file or directory
conftest.c: In function `main':
conftest.c:13: `MYSQL' undeclared (first use in this function)
conftest.c:13: (Each undeclared identifier is reported only once
conftest.c:13: for each function it appears in.)
conftest.c:13: `mysql' undeclared (first use in this function)
configure:2888: $? = 1
configure: failed program was:
| /* confdefs.h.  */
|
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| /* end confdefs.h.  */
| #include <mysql.h>
| int
| main ()
| {
| MYSQL *mysql = mysql_init(0);
|   ;
|   return 0;
| }


mysql_config --cflags :
Code: [Select]
-I'/usr/include/mysql'
mysql_config --libs :
Code: [Select]
-L/usr/lib/mysql -lmysqlclient -lz -lcrypt -lnsl -lm

as root like explained:

ln -s /usr/lib/libmysqlclient.so
Code: [Select]
ln: `./libmysqlclient.so': File exists

also the *_r.so "exists"

Some other ideas? :D
So far thank you very much.
Logged

heinz

  • Guest
(No subject)
« Reply #8 on: October 19, 2006, 05:05:01 PM »

I think this made .17, so try this:

MYSQL_CFLAGS="-I/usr/include/mysql" MYSQL_LDFLAGS="-L/usr/lib/mysql -lmysqlclient -lz -lcrypt -lnsl -lm" ./Config

Hopefully this should sort it :)
Logged

SNU

  • Anope User
  • Offline Offline
  • Posts: 158
    • http://www.firstclassirc.com
(No subject)
« Reply #9 on: October 19, 2006, 05:15:15 PM »

worked. very fine thanks.
Logged

mEh

  • Guest
(No subject)
« Reply #10 on: October 19, 2006, 05:32:26 PM »

Quote
here is the solution:
as root:
cd /usr/lib/mysql
ln -s /usr/lib/libmysqlclient.so
ln -s /usr/lib/libmysqlclient_r.so

this will fix the broken mysql shared libs install


worked!

-thx :)
Logged

capitaine

  • Anope User
  • Offline Offline
  • Posts: 39
    • http://www.coolsmile.net
(No subject)
« Reply #11 on: November 01, 2006, 02:30:24 AM »

Setting the variables didn't help for me, and I'm not root.

I used to start the config with the following command line to force detection:

./configure --with-mysqlclient-lib=/disks/appli/mysql/lib/mysql --with-mysqlclient-include=/disks/appli/mysql/include/mysql  ...

It was working well, but now I only get that log :

configure:4238: gcc -o conftest -pipe -g -O2 -I'/disks/appli/mysql/include/mysql' -L'/disks/appli/mysql/lib/mysql' -lmysqlclient -lz -lcrypt -lnsl -lm conftest.c >&5
/usr/bin/ld: cannot find -lmysqlclient
collect2: ld returned 1 exit status
configure:4241: $? = 1
configure: program exited with status 1
Logged

heinz

  • Guest
(No subject)
« Reply #12 on: November 01, 2006, 03:19:48 AM »

If you change the variables to what your mysql_config is producing, it'll work.

Set MYSQL_CFLAGS to the result of "mysql_config --cflags" - remove any quotation marks around paths.

Set MYSQL_LDFLAGS to the result of "mysql_config --libs" - remove any quotation marks around the paths.

So, you might have:

MYSQL_CFLAGS="-I/disks/appli/mysql/include/mysql" MYSQL_LDFLAGS="-L/disks/appli/mysql/lib/mysql -lmysqlclient -lz" ./Config

(Obviously it depends on your actual output from mysql_config)
Logged

caiman

  • Guest
(No subject)
« Reply #13 on: November 07, 2006, 10:11:25 PM »

Quote
Originally posted by heinz
If you change the variables to what your mysql_config is producing, it'll work.

Set MYSQL_CFLAGS to the result of "mysql_config --cflags" - remove any quotation marks around paths.

Set MYSQL_LDFLAGS to the result of "mysql_config --libs" - remove any quotation marks around the paths.

So, you might have:

MYSQL_CFLAGS="-I/disks/appli/mysql/include/mysql" MYSQL_LDFLAGS="-L/disks/appli/mysql/lib/mysql -lmysqlclient -lz" ./Config

(Obviously it depends on your actual output from mysql_config)


Pretty much having the same problem, as I am not root. Tried your solution, using:

MYSQL_CFLAGS="-I/usr/include/mysql -g -pipe -march=i386 -mcpu=686" MYSQL_LDFLAGS="-L/usr/lib/mysql -lmysqlclient -lz -lcrypt -lnsl -lm" ./Config

But output still said MySQL: No

have attached config.log

Any help appreciated!

[Edited on 7-11-2006 by caiman]
Logged

heinz

  • Guest
(No subject)
« Reply #14 on: November 07, 2006, 10:59:30 PM »

Can't see the config.log file around.. try putting it into the paste-bin (http://www.anope.org/paste2.php) and then linking to it here.
Logged

caiman

  • Guest
(No subject)
« Reply #15 on: November 07, 2006, 11:15:09 PM »

Quote
Originally posted by heinz
Can't see the config.log file around.. try putting it into the paste-bin (http://www.anope.org/paste2.php) and then linking to it here.


Ok, cheers

http://www.anope.org/paste2.php?id=7ba65a35
Logged

heinz

  • Guest
(No subject)
« Reply #16 on: November 07, 2006, 11:23:50 PM »

Quote
configure:2882: gcc -o conftest -pipe -g -O2 -I/usr/include/mysql -g -pipe -march=i386 -mcpu=i686   -L/usr/lib/mysql -lmysqlclient -lz -lcrypt -lnsl -lm conftest.c  >&5
/tmp/ccjBVgNg.o(.text+0x11): In function `main':
/home/sto/irc/anope-1.7.17/conftest.c:13: undefined reference to `mysql_init'


Looks like there's something wrong with your mysql install there... it's found the library but not the mysql_init symbol.
Logged

Alan

  • Guest
(No subject)
« Reply #17 on: November 07, 2006, 11:40:49 PM »

Im getting the same too:-

[root@fedora anope-1.7.17]# mysql_config --cflags
-I/usr/include/mysql -g -pipe -march=i386 -mcpu=i686

[root@fedora anope-1.7.17]# mysql_config --libs
-L/usr/lib/mysql -lmysqlclient -lz -lcrypt -lnsl -lm

[root@fedora anope-1.7.17]# MYSQL_CFLAGS="-I/usr/include/mysql -g -pipe -march=i386 -mcpu=i686" MYSQL_LDFLAGS="-L/usr/lib/mysql -lmysqlclient -lz -lcrypt -lnsl -lm" ./Config

checking for mysql_config... /usr/bin/mysql_config
checking if mysql_config produces valid values... no


configure:2815: checking for mysql_config
configure:2833: found /usr/bin/mysql_config
configure:2846: result: /usr/bin/mysql_config
configure:2882: gcc -o conftest -pipe -g -O2 -I/usr/include/mysql -g -pipe -march=i386 -mcpu=i686   -L/usr/lib/mysql -lmysqlclient $
/tmp/cc2Y1Yfc.o(.text+0x14): In function `main':
/home/sto/irc/anope-1.7.17/conftest.c:13: undefined reference to `mysql_init'
collect2: ld returned 1 exit status
configure:2888: $? = 1
configure: failed program was:  
| /* confdefs.h.  */
|
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| /* end confdefs.h.  */
| #include <mysql.h>
Logged
Pages: [1]   Go Up