Anope IRC Services
Anope Support => 1.8.x/1.7.x Support (Read Only) => Topic started by: mEh on October 19, 2006, 03:51:14 AM
-
Hey,
just a new problem... during ./Config 1.7.17 i noticed this...
...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?
:/
-
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 :)
-
Hey,
./Config
checking for mysql_config... /usr/bin/mysql_config
checking if mysql_config produces valid values... no
config.log
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
-I/usr/include/mysql -DBIG_JOINS=1
;(
-
What does mysql_config --libs return?
-
/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
-
mysql_config --libs
-L/usr/lib/mysql -lmysqlclient -lz -lcrypt -lnsl -lm
-
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
-
Hi. For me it does not fix. see lines below:
./Config shows the same as in entry posting first yes second no.
config.log:
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 :
-I'/usr/include/mysql'
mysql_config --libs :
-L/usr/lib/mysql -lmysqlclient -lz -lcrypt -lnsl -lm
as root like explained:
ln -s /usr/lib/libmysqlclient.so
ln: `./libmysqlclient.so': File exists
also the *_r.so "exists"
Some other ideas? :D
So far thank you very much.
-
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 :)
-
worked. very fine thanks.
-
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 :)
-
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
-
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)
-
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]
-
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.
-
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
-
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.
-
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>