Project

General

Profile

Bug #782

Compile Kannel error with support MySQL

Added by Vasia Pupkini4 about 1 year ago. Updated 3 months ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Start date:
08/18/2018
Due date:
% Done:

0%

Estimated time:
Affected version:

Description

Hi everybody!
I have:
OS: Centos 7.5
Kannnel v1.4.5
MySQL 8.0.12

and when I compile Kannel: with this command: ./configure --prefix=/usr/local/kannel --with-mysql --with-mysql-dir=/usr/lib64/mysql --enable-start-stop-daemon , I receive this error:
Configuring DB support ...
checking whether to compile with MySQL support... searching
checking for mysql_config... no
checking for MySQL client support in... /usr/lib64/mysql
checking for "/usr/lib64/mysql/include/mysql/mysql.h"... no
checking for "/usr/lib64/mysql/include/mysql.h"... 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

Please help me. Thank in advance.

Associated revisions

Revision 5280 (diff)
Added by Alexander Malysh 3 months ago

  • gwlib/dbpool_mysql.c: fixed compilation for mysql v8. This fixes #782.

History

#1 Updated by Vasia Pupkini4 about 1 year ago

Problem solved by installing mysql-community-devel.

Now another problem:
Command: ./configure --prefix=/usr/local/kannel --with-mysql --with-mysql-dir=/usr/include/mysql --enable-start-stop-daemon

In DB section I receive
Configuring DB support ...
checking whether to compile with MySQL support... searching
checking for mysql_config... /bin/mysql_config
checking mysql version... 8.0.12
checking mysql reentrant libs... -L/usr/lib64/mysql -lmysqlclient -lpthread -lm -lrt -lssl -lcrypto -ldl
checking for mysql_init in -lmysqlclient_r... no
checking mysql libs... -L/usr/lib64/mysql -lmysqlclient -lpthread -lm -lrt -lssl -lcrypto -ldl
checking for mysql_init in -lmysqlclient... yes
checking mysql includes... -I/usr/include/mysql
checking mysql/mysql.h usability... yes
checking mysql/mysql.h presence... no
configure: WARNING: mysql/mysql.h: accepted by the compiler, rejected by the preprocessor!
configure: WARNING: mysql/mysql.h: proceeding with the compiler's result

checking for mysql/mysql.h... yes
checking mysql/mysql_version.h usability... yes
checking mysql/mysql_version.h presence... yes
checking for mysql/mysql_version.h... yes
checking for mysql_stmt_init in -lmysqlclient_r... no
checking for mysql_stmt_init in -lmysqlclient... yes
checking whether to compile with MySQL support... yes
checking whether to compile with LibSDB support... disabled
checking whether to compile with SQLite2 support... disabled
checking whether to compile with SQLite3 support... disabled
checking whether to compile with Oracle support... disabled
checking whether to compile with PostgresSQL support... disabled
checking whether to compile with Redis support... disabled
checking whether to compile with FreeTDS Ct-Lib support... disabled
checking whether to compile with Cassandra support... disabled

#2 Updated by Vasia Pupkini4 about 1 year ago

And this when make

gcc -std=gnu99 -D_REENTRANT=1 -I. -Igw -g -O2 -D_XOPEN_SOURCE=600 -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_LARGE_FILES= -I/usr/include/libxml2 -I/usr/include/openssl -I/usr/include/mysql -o gwlib/gw_uuid.o -c gwlib/gw_uuid.c
gcc -std=gnu99 -D_REENTRANT=1 -I. -Igw -g -O2 -D_XOPEN_SOURCE=600 -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_LARGE_FILES= -I/usr/include/libxml2 -I/usr/include/openssl -I/usr/include/mysql -o gwlib/dbpool.o -c gwlib/dbpool.c
In file included from gwlib/gwlib.h:83:0,
from gwlib/dbpool.c:70:
gwlib/dbpool_mysql.c: In function ‘mysql_select’:
gwlib/dbpool_mysql.c:248:48: error: ‘my_bool’ undeclared (first use in this function)
bind[i].is_null = gw_malloc(sizeof(my_bool));
^
gwlib/gwmem.h:122:43: note: in definition of macro ‘gw_malloc’
#define gw_malloc(size) (gw_native_malloc(size))
^
gwlib/dbpool_mysql.c:248:48: note: each undeclared identifier is reported only once for each function it appears in
bind[i].is_null = gw_malloc(sizeof(my_bool));
^
gwlib/gwmem.h:122:43: note: in definition of macro ‘gw_malloc’
#define gw_malloc(size) (gw_native_malloc(size))
^
make: *** [gwlib/dbpool.o] Error 1

#3 Updated by Alexander Malysh 3 months ago

  • Status changed from New to Resolved

Fixed in SVN.

Also available in: Atom PDF