Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

db_mysql.so fails to build using MariaDB 10.2 #1296

Closed
duczen opened this issue Nov 1, 2017 · 1 comment
Closed

db_mysql.so fails to build using MariaDB 10.2 #1296

duczen opened this issue Nov 1, 2017 · 1 comment

Comments

@duczen
Copy link

duczen commented Nov 1, 2017

Description

db_mysql.so fails to build using MariaDB 10.2 libs. Using kamailio 5.0.4 and MariaDB 10.2 on CentOS7 run make all and the build process crashes on db_mysql.so with the following errors:

[root@proxy:/usr/local/src/kamailio-5.0.4$]make all
make -C src/ all 
make[1]: Entering directory `/usr/local/src/kamailio-5.0.4/src'
CC (gcc) [M db_mysql.so]		km_my_con.o
In file included from km_my_con.c:31:0:
/usr/include/mysql/mysql_version.h:3:2: warning: #warning This file should not be included by clients, include only <mysql.h> [-Wcpp]
 #warning This file should not be included by clients, include only <mysql.h>
  ^
km_my_con.c: In function ‘db_mysql_new_connection’:
km_my_con.c:132:11: error: ‘MYSQL’ has no member named ‘reconnect’
   ptr->con->reconnect = 1;
           ^
km_my_con.c:134:11: error: ‘MYSQL’ has no member named ‘reconnect’
   ptr->con->reconnect = 0;
           ^
make[2]: *** [km_my_con.o] Error 1
make[1]: *** [modules] Error 1
make[1]: Leaving directory `/usr/local/src/kamailio-5.0.4/src'
make: *** [all] Error 2

Using offical mariadb 10.2 stable repo from mariadb.org:

MariaDB-client.x86_64           10.2.10-1.el7.centos            @mariadb        
MariaDB-common.x86_64           10.2.10-1.el7.centos            @mariadb        
MariaDB-compat.x86_64           10.2.10-1.el7.centos            @mariadb        
MariaDB-devel.x86_64            10.2.10-1.el7.centos            @mariadb        
MariaDB-server.x86_64           10.2.10-1.el7.centos            @mariadb 

Additional Information

  • Kamailio Version - output of kamailio -v
version: kamailio 5.0.4 (x86_64/linux) 
flags: STATS: Off, USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MEM, SHM_MMAP, PKG_MALLOC, Q_MALLOC, F_MALLOC, TLSF_MALLOC, DBG_SR_MEMORY, USE_FUTEX, FAST_LOCK-ADAPTIVE_WAIT, USE_DNS_CACHE, USE_DNS_FAILOVER, USE_NAPTR, USE_DST_BLACKLIST, HAVE_RESOLV_RES
ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144, MAX_LISTEN 16, MAX_URI_SIZE 1024, BUF_SIZE 65535, DEFAULT PKG_SIZE 8MB
poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.
id: unknown 
compiled on 16:49:14 Nov  1 2017 with gcc 4.8.5
  • Operating System:
Linux proxy.vm 3.10.0-693.5.2.el7.x86_64 #1 SMP Fri Oct 20 20:32:50 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
miconda added a commit that referenced this issue Nov 3, 2017
…ions

- exposed with MariaDB 10.2
- include mysql.h instead of mysql_version.h
- reported by GH #1296
miconda added a commit that referenced this issue Nov 3, 2017
…ions

- exposed with MariaDB 10.2
- include mysql.h instead of mysql_version.h
- reported by GH #1296

(cherry picked from commit c315350)
@miconda
Copy link
Member

miconda commented Nov 3, 2017

Thanks! Pushed a patch for it in master and 5.0 branches. Reopen if still a problem.

@miconda miconda closed this as completed Nov 3, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants