Hi,
kannel can not find where is mysql. To find where is mysql use either of these
command lines:
- whereis mysql
- which mysql
you will find one or more answers (path) if mysql is really installed.
Try each path with --with-mysql-dir=
Stipe Tolj wrote:
> Mario Splivalo schrieb:
>> I'm trying to build kannel with mysql support. I have mysql installed in
>> my home directory.
>>
>> Now, I configure it like this:
>> ./configure --prefix=/home/mario/Test/gateway-1.4.3/ --with-mysql
>> --with-mysql-dir=/home/mario/Test/mysql-5.1.32
>>
>> This is the part of configure output concerning mysql:
>> checking whether to compile with MySQL support... searching
>> checking for mysql_config... /home/mario/Test/mysql-5.1.32/bin/mysql_config
>> checking mysql version... 5.1.32
>> checking mysql reentrant libs... -rdynamic
>> -L/home/mario/Test/mysql-5.1.32/lib/mysql -lmysqlclient_r -lz -lpthread
>> -lcrypt -lnsl -lm -lpthread
>> checking for mysql_init in -lmysqlclient_r... yes
>> checking mysql includes... -I/home/mario/Test/mysql-5.1.32/include/mysql
>> checking mysql/mysql.h usability... no
>> checking mysql/mysql.h presence... no
>> checking for mysql/mysql.h... no
>> checking mysql/mysql_version.h usability... no
>> checking mysql/mysql_version.h presence... no
>> checking for mysql/mysql_version.h... no
>> checking whether to compile with MySQL support... yes
>>
>> Now, of course, make won't finish compilation because of 'missing' mysql.h.
>>
>> Here is what mysql_config returns:
>> $ /home/mario/Test/mysql-5.1.32/bin/mysql_config --include
>> -I/home/mario/Test/mysql-5.1.32/include/mysql
>> $ /home/mario/Test/mysql-5.1.32/bin/mysql_config --libs
>> -rdynamic -L/home/mario/Test/mysql-5.1.32/lib/mysql -lmysqlclient -lz
>> -lcrypt -lnsl -lm
>>
>> What am I doing wrong?
>
> can you have a peak into config.log to see "what" configure gets while trying
> to
> look for mysql.h? This should give you a good hint on what is wrong here.
Sure. Now, first I tried compiling kannel with just --with-mysql option,
and this is what configure tells me:
Configuring DB support ...
checking whether to compile with MySQL support... searching
checking for mysql_config... no
checking for MySQL client support in... /usr
checking for "/usr/include/mysql/mysql.h"... no
checking for "/usr/include/mysql.h"... no
checking for MySQL client support in... /usr/local
checking for "/usr/local/include/mysql/mysql.h"... no
checking for "/usr/local/include/mysql.h"... no
configure: error: Unable to find mysql.h, please provide a
--with-mysql-dir=<dir> location
So, this is OK. I don't have mysql-dev package installed and I need to
tell configure where it is. It's here:
$file /home/mario/Test/mysql-5.1.32/include/mysql/mysql.h
/home/mario/Test/mysql-5.1.32/include/mysql/mysql.h: ASCII C program text
Now, when I provide that to configure I get the error I provided earlier.
This is the excerpt from the configure.log concerning the above error,
as you asked:
configure:11546: found /home/mario/Test/mysql-5.1.32/bin/mysql_config
configure:11559: result: /home/mario/Test/mysql-5.1.32/bin/mysql_config
configure:11636: checking mysql version
configure:11639: result: 5.1.32
configure:11644: checking mysql reentrant libs
configure:11646: result: -rdynamic
-L/home/mario/Test/mysql-5.1.32/lib/mysql -lmysqlclient_r -lz -lpthread
-lcrypt -lnsl -lm -lpthread
configure:11648: checking for mysql_init in -lmysqlclient_r
configure:11683: gcc -std=gnu99 -o conftest -g -O2 -D_XOPEN_SOURCE=600
-D_BSD_SOURCE -D_LARGE_FILES= -I/usr/include/libxml2
-I/usr/include/openssl -rdynamic conftest.c -lmysqlclient_r -rdynamic
-L/home/mario/Test/mysql-5.1.32/lib/mysql -lmysqlclient_r -lz -lpthread
-lcrypt -lnsl -lm -lpthread -lssl -lrt -lresolv -lnsl -lm -lpthread
-lxml2 -L/usr/lib64 -lcrypto -lssl >&5
configure:11690: $? = 0
configure:11711: result: yes
configure:11800: checking mysql includes
configure:11808: result: -I/home/mario/Test/mysql-5.1.32/include/mysql
configure:11828: checking mysql/mysql.h usability
configure:11845: gcc -std=gnu99 -c -g -O2 -D_XOPEN_SOURCE=600
-D_BSD_SOURCE -D_LARGE_FILES= -I/usr/include/libxml2
-I/usr/include/openssl -I/home/mario/Test/mysql-5.1.32/include/mysql
conftest.c >&5
conftest.c:112:25: error: mysql/mysql.h: No such file or directory
>
> Pozdrav iz Berlina ;)
Pozdrav, Stipe! :)
Mike