Bug #34969 Library change in 5.2.23, makes PHP compiler to fail with error
Submitted: 1 Mar 2008 10:11 Modified: 1 Mar 2008 14:46
Reporter: Kliment Stefanov Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Server: General Severity:S2 (Serious)
Version:5.1.23 OS:Linux (Debian/Fedora)
Assigned to: CPU Architecture:Any

[1 Mar 2008 10:11] Kliment Stefanov
Description:
MySQL configured and built with:

./configure --prefix=/usr/local/mysql

PHP Configured with:

'./configure' '--prefix=/usr/local/php' '--with-apxs2=/usr/local/apache/bin/apxs' '--with-mysql=/usr/local/mysql' '--with-mysqli=/usr/local/mysql/bin/mysql_config' '--with-config-file-path=/usr/local/php' '--with-gnu-ld' '--enable-force-cgi-redirect' '--enable-ftp' '--disable-cgi' '--with-zlib' '--with-gettext' '--with-gdbm' '--with-gd' '--with-xpm-dir' '--with-png-dir' '--with-jpeg-dir' '--with-freetype-dir' '--enable-mbstring' '--enable-sigchild' '--enable-zip'

The PHP 'make' operation fails with the following error:

/bin/sh /space/setup/linux/php-5.2.5/libtool --silent --preserve-dup-deps --mode=compile gcc  -Iext/mysqli/ -I/sp                    ace/setup/linux/php-5.2.5/ext/mysqli/ -DPHP_ATOM_INC -I/space/setup/linux/php-5.2.5/include -I/space/setup/linux/                    php-5.2.5/main -I/space/setup/linux/php-5.2.5 -I/usr/include/libxml2 -I/space/setup/linux/php-5.2.5/ext/date/lib                     -I/usr/local/include -I/usr/local/include/freetype2 -I/space/setup/linux/php-5.2.5/ext/mbstring/oniguruma -I/spac                    e/setup/linux/php-5.2.5/ext/mbstring/libmbfl -I/space/setup/linux/php-5.2.5/ext/mbstring/libmbfl/mbfl -I/usr/loca                    l/mysql/include/mysql -I/space/setup/linux/php-5.2.5/TSRM -I/space/setup/linux/php-5.2.5/Zend    -I/usr/include -                    g -O2  -prefer-non-pic -c /space/setup/linux/php-5.2.5/ext/mysqli/mysqli_api.c -o ext/mysqli/mysqli_api.lo
/space/setup/linux/php-5.2.5/ext/mysqli/mysqli_api.c: In function 'zif_mysqli_change_user':
/space/setup/linux/php-5.2.5/ext/mysqli/mysqli_api.c:420: error: 'NET' has no member named 'last_errno'
/space/setup/linux/php-5.2.5/ext/mysqli/mysqli_api.c:420: error: 'NET' has no member named 'last_errno'
/space/setup/linux/php-5.2.5/ext/mysqli/mysqli_api.c:420: error: 'NET' has no member named 'last_error'
/space/setup/linux/php-5.2.5/ext/mysqli/mysqli_api.c: In function 'zif_mysqli_kill':
/space/setup/linux/php-5.2.5/ext/mysqli/mysqli_api.c:1152: error: 'NET' has no member named 'last_errno'
/space/setup/linux/php-5.2.5/ext/mysqli/mysqli_api.c:1152: error: 'NET' has no member named 'last_errno'
/space/setup/linux/php-5.2.5/ext/mysqli/mysqli_api.c:1152: error: 'NET' has no member named 'last_error'
/space/setup/linux/php-5.2.5/ext/mysqli/mysqli_api.c: In function 'zif_mysqli_ping':
/space/setup/linux/php-5.2.5/ext/mysqli/mysqli_api.c:1333: error: 'NET' has no member named 'last_errno'
/space/setup/linux/php-5.2.5/ext/mysqli/mysqli_api.c:1333: error: 'NET' has no member named 'last_errno'
/space/setup/linux/php-5.2.5/ext/mysqli/mysqli_api.c:1333: error: 'NET' has no member named 'last_error'
/space/setup/linux/php-5.2.5/ext/mysqli/mysqli_api.c: In function 'zif_mysqli_prepare':
/space/setup/linux/php-5.2.5/ext/mysqli/mysqli_api.c:1376: error: 'NET' has no member named 'last_errno'
/space/setup/linux/php-5.2.5/ext/mysqli/mysqli_api.c:1377: error: 'NET' has no member named 'last_error'
/space/setup/linux/php-5.2.5/ext/mysqli/mysqli_api.c:1383: error: 'NET' has no member named 'last_errno'
/space/setup/linux/php-5.2.5/ext/mysqli/mysqli_api.c:1383: error: 'NET' has no member named 'last_errno'
/space/setup/linux/php-5.2.5/ext/mysqli/mysqli_api.c:1383: error: 'NET' has no member named 'last_error'
/space/setup/linux/php-5.2.5/ext/mysqli/mysqli_api.c: In function 'zif_mysqli_real_connect':
/space/setup/linux/php-5.2.5/ext/mysqli/mysqli_api.c:1453: error: 'NET' has no member named 'last_errno'
/space/setup/linux/php-5.2.5/ext/mysqli/mysqli_api.c:1454: error: 'NET' has no member named 'last_error'
/space/setup/linux/php-5.2.5/ext/mysqli/mysqli_api.c: In function 'zif_mysqli_real_query':
/space/setup/linux/php-5.2.5/ext/mysqli/mysqli_api.c:1492: error: 'NET' has no member named 'last_errno'
/space/setup/linux/php-5.2.5/ext/mysqli/mysqli_api.c:1492: error: 'NET' has no member named 'last_errno'
/space/setup/linux/php-5.2.5/ext/mysqli/mysqli_api.c:1492: error: 'NET' has no member named 'last_error'
/space/setup/linux/php-5.2.5/ext/mysqli/mysqli_api.c: In function 'zif_mysqli_select_db':
/space/setup/linux/php-5.2.5/ext/mysqli/mysqli_api.c:1761: error: 'NET' has no member named 'last_errno'
/space/setup/linux/php-5.2.5/ext/mysqli/mysqli_api.c:1761: error: 'NET' has no member named 'last_errno'
/space/setup/linux/php-5.2.5/ext/mysqli/mysqli_api.c:1761: error: 'NET' has no member named 'last_error'
/space/setup/linux/php-5.2.5/ext/mysqli/mysqli_api.c: In function 'zif_mysqli_store_result':
/space/setup/linux/php-5.2.5/ext/mysqli/mysqli_api.c:2058: error: 'NET' has no member named 'last_errno'
/space/setup/linux/php-5.2.5/ext/mysqli/mysqli_api.c:2058: error: 'NET' has no member named 'last_errno'
/space/setup/linux/php-5.2.5/ext/mysqli/mysqli_api.c:2058: error: 'NET' has no member named 'last_error'
/space/setup/linux/php-5.2.5/ext/mysqli/mysqli_api.c: In function 'zif_mysqli_use_result':
/space/setup/linux/php-5.2.5/ext/mysqli/mysqli_api.c:2112: error: 'NET' has no member named 'last_errno'
/space/setup/linux/php-5.2.5/ext/mysqli/mysqli_api.c:2112: error: 'NET' has no member named 'last_errno'
/space/setup/linux/php-5.2.5/ext/mysqli/mysqli_api.c:2112: error: 'NET' has no member named 'last_error'
make: *** [ext/mysqli/mysqli_api.lo] Error 1

A few other people are experiencing this same problem on different Linux platforms and the PHP team state this is caused by a change in the MySQL libraries:

http://bugs.php.net/bug.php?id=44137

How to repeat:
Try to build PHP 5.2.5 with MySQL 5.1.23
[1 Mar 2008 14:46] Sveta Smirnova
Please do not submit the same bug more than once. An existing bug report already describes this very problem. Even if you feel that your issue is somewhat different, the resolution is likely
to be the same. Because of this, we hope you add your comments to the original bug instead.

Thank you for your interest in MySQL.

Duplicate of bug #34655