|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[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
Patchesmysql-mariadb-10.3.patch (last revision 2018-04-06 20:04 UTC by bero at lindev dot ch)Pull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Nov 02 22:00:01 2025 UTC |
This is also failing on FreeBSD. I attempted to manually patch 7.3.5 with the changes in the attached patch and compile from source without success. I have MariaDB 10.2.22 installed. Process: 1. Checkout git 2. git checkout php-7.3.5 3. ./buildconf --force 4. ./configure --prefix=/usr/local --with-layout=GNU --with-config-file-path=/usr/local/etc --with-config-file-scan-dir=/usr/local/etc/php --mandir=/usr/local/man --infodir=/usr/local/info/ --localstatedir=/var --enable-bcmath --enable-exif --enable-fpm --enable-ftp --enable-intl --enable-libxml --enable-mbstring --enable-mysqlnd --with-mysqli=/usr/local/bin/mysql_config --enable-pcntl --enable-soap --enable-sockets --enable-zip --with-bz2 --with-curl --with-fpm-user=www --with-fpm-group=www --with-freetype-dir=/usr/local --with-gd --with-gettext=/usr/local --with-iconv --with-jpeg-dir=/usr/local --with-libxml-dir=/usr/local --with-openssl --with-pdo-mysql=/usr/local --with-png-dir=/usr/local --with-sodium=/usr/local --with-zlib-dir=/usr --with-zlib=/usr I get stuff like this --- ext/mysqli/mysqli_api.lo --- In file included from /home/human/tmp/php-src/ext/mysqli/mysqli_api.c:32: In file included from ext/mysqli/php_mysqli_structs.h:61: /usr/local/include/mysql/my_global.h:3:2: warning: This file should not be included by clients, include only <mysql.h> [-W#warnings] #warning This file should not be included by clients, include only <mysql.h> ^ /home/human/tmp/php-src/ext/mysqli/mysqli_api.c:156:2: warning: format specifies type 'unsigned long' but the argument has type 'my_ulonglong' (aka 'unsigne d long long') [-Wformat] MYSQLI_RETURN_LONG_INT(rc); ^~~~~~~~~~~~~~~~~~~~~~~~~~ ext/mysqli/mysqli_priv.h:99:45: note: expanded from macro 'MYSQLI_RETURN_LONG_INT' In file included from /home/human/tmp/php-src/ext/mysqli/mysqli_api.c:32: In file included from ext/mysqli/php_mysqli_structs.h:77: /usr/local/include/mysql/my_sys.h:3:2: warning: This file should not be included by clients, include only <mysql.h> [-W#warnings] #warning This file should not be included by clients, include only <mysql.h> ^