php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #75612 php-mysqli build fails with MariaDB-10.2
Submitted: 2017-12-01 18:52 UTC Modified: -
Votes:15
Avg. Score:4.3 ± 0.9
Reproduced:14 of 14 (100.0%)
Same Version:9 (64.3%)
Same OS:6 (42.9%)
From: dkasyanov at cloudlinux dot com Assigned:
Status: Open Package: MySQLi related
PHP Version: 7.1.12 OS: Centos 7
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: dkasyanov at cloudlinux dot com
New email:
PHP Version: OS:

 

 [2017-12-01 18:52 UTC] dkasyanov at cloudlinux dot com
Description:
------------
MariaDB developers have changed mysql headers in 10.2.10+ and now PHP is not compiling.

How to reproduce:
install MariaDB-devel package >= 10.2.10 and run:
./configure --with-mysqli=/usr/bin/mysql_config  CPPFLAGS="-I/usr/include/mysql"
make


Test script:
---------------
Compiled PHP binary


Actual result:
--------------
In file included from /root/php-7.1.12/ext/mysqli/php_mysqli_structs.h:63:0,
                 from /root/php-7.1.12/ext/mysqli/mysqli.c:34:
/usr/include/mysql/my_global.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>
  ^
In file included from /root/php-7.1.12/ext/mysqli/php_mysqli_structs.h:79:0,
                 from /root/php-7.1.12/ext/mysqli/mysqli.c:34:
/usr/include/mysql/my_sys.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>
  ^
In file included from /root/php-7.1.12/ext/mysqli/mysqli.c:34:0:
/root/php-7.1.12/ext/mysqli/php_mysqli_structs.h:82:21: fatal error: my_list.h: No such file or directory
 #include <my_list.h>
                     ^
compilation terminated.
make: *** [ext/mysqli/mysqli.lo] Error 1

Patches

mysql-mariadb-10.3.patch (last revision 2018-04-06 20:04 UTC by bero at lindev dot ch)

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2018-04-06 20:06 UTC] bero at lindev dot ch
Same issue here on OpenMandriva with MariaDB 10.3 -- attaching a patch that makes it build and essentially work, but I'm not sure I've handled the removal of st_mysql->reconnect correctly.
 [2018-04-06 22:05 UTC] spam2 at rhsoft dot net
why don't you just build with mysqlnd - IMHO the libmysql stuff should have been removed from php many years ago
 [2018-04-07 20:39 UTC] bero at lindev dot ch
One reason not to use mysqlnd is --enable-embedded-mysqli -- other than that, mysqlnd should do the trick (but needs some testing on our side -- we know libmysql to work from years of using it).
 [2018-04-07 20:43 UTC] spam2 at rhsoft dot net
we use mysqlnd since 2010 everywhere and i don't get why it should be a problem for mysqli - until you configure with shared both are directly in teh binary

[harry@srv-rhsoft:/lib64/php/modules]$ ls | grep mysql
-rwxr-xr-x 1 root root 131K 2018-04-07 19:33 mysqli.so
-rwxr-xr-x 1 root root 290K 2018-04-07 19:33 mysqlnd.so
 [2018-11-28 10:00 UTC] m0r1arty dot nv at yandex dot ru
For temporary solution: after configure open Makefile in root php src directory,look "-I/usr/include/mysql" and replace to "-I/usr/include/mysql/server".
 
PHP Copyright © 2001-2018 The PHP Group
All rights reserved.
Last updated: Mon Dec 17 03:01:26 2018 UTC