|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #47535 Compilation failure in ps_fetch_from_1_to_8_bytes()
Submitted: 2009-03-01 09:18 UTC Modified: 2009-04-20 09:17 UTC
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: Bjorn dot Wiberg at its dot uu dot se Assigned: mysql (profile)
Status: Closed Package: MySQL related
PHP Version: 5.3.0beta1 OS: IBM AIX 5.3, OSX Tiger
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.
Block user comment
Status: Assign to:
Bug Type:
From: Bjorn dot Wiberg at its dot uu dot se
New email:
PHP Version: OS:


 [2009-03-01 09:18 UTC] Bjorn dot Wiberg at its dot uu dot se
Compilation fails with undeclared references to MYSQLND_LLU_SPEC and MYSQLND_LL_SPEC.

Reproduce code:
#! /bin/sh
# Created by configure

LDFLAGS='-Wl,-bbigtoc' \
CC='gcc' \
'./configure' \
'--enable-bcmath' \
'--enable-calendar' \
'--enable-cli' \
'--enable-dba' \
'--enable-debug' \
'--enable-exif' \
'--enable-flatfile' \
'--enable-ftp' \
'--enable-gd-jis-conv' \
'--enable-gd-native-ttf' \
'--enable-inifile' \
'--enable-mbstring' \
'--enable-pcntl' \
'--enable-shmop' \
'--enable-soap' \
'--enable-sockets' \
'--enable-sqlite-utf8' \
'--enable-sysvmsg' \
'--enable-sysvsem' \
'--enable-sysvshm' \
'--enable-wddx' \
'--enable-zip' \
'--enable-zend-multibyte' \
'--prefix=/apache/php' \
'--with-apxs2=/apache/bin/apxs' \
'--with-bz2' \
'--with-cdb' \
'--with-curl' \
'--with-freetype-dir' \
'--with-gd' \
'--with-gdbm' \
'--with-gettext' \
'--with-jpeg-dir' \
'--with-ldap' \
'--with-libxml-dir=/usr/local' \
'--with-mysql=mysqlnd' \
'--with-mysqli=mysqlnd' \
'--with-openssl=/opt/freeware' \
'--with-pdo-mysql=mysqlnd' \
'--with-png-dir' \
'--with-xmlrpc' \
'--with-xpm-dir' \
'--with-xsl' \
'--with-zlib' \
'--with-zlib-dir' \

Expected result:
No compilation failure.

Actual result:
/bin/sh /home/bwiberg/rpm/BUILD/php-5.3.0beta1/libtool --preserve-dup-deps --mode=compile gcc  -Iext/mysqlnd/ -I/home/bwiberg/rpm/BUILD/php-5.3.0beta1/ext/mysqlnd/ -DPHP_ATOM_INC -I/home/bwiberg/rpm/BUILD/php-5.3.0beta1/include -I/home/bwiberg/rpm/BUILD/php-5.3.0beta1/main -I/home/bwiberg/rpm/BUILD/php-5.3.0beta1 -I/home/bwiberg/rpm/BUILD/php-5.3.0beta1/ext/ereg/regex -I/usr/local/include/libxml2 -I/opt/freeware/include -I/usr/local/include -I/home/bwiberg/rpm/BUILD/php-5.3.0beta1/ext/date/lib -I/usr/X11R6/include -I/usr/include/freetype2 -I/home/bwiberg/rpm/BUILD/php-5.3.0beta1/ext/mbstring/oniguruma -I/home/bwiberg/rpm/BUILD/php-5.3.0beta1/ext/mbstring/libmbfl -I/home/bwiberg/rpm/BUILD/php-5.3.0beta1/ext/mbstring/libmbfl/mbfl -I/home/bwiberg/rpm/BUILD/php-5.3.0beta1/ext/sqlite3/libsqlite -I/home/bwiberg/rpm/BUILD/php-5.3.0beta1/TSRM -I/home/bwiberg/rpm/BUILD/php-5.3.0beta1/Zend    -I/usr/include -g -fvisibility=hidden -O0 -Wall   -c /home/bwiberg/rpm/BUILD/php-5.3.0beta1/ext/mysqlnd/mysqlnd_ps_codec.c -o ext/mysqlnd/mysqlnd_ps_codec.lo
 gcc -Iext/mysqlnd/ -I/home/bwiberg/rpm/BUILD/php-5.3.0beta1/ext/mysqlnd/ -DPHP_ATOM_INC -I/home/bwiberg/rpm/BUILD/php-5.3.0beta1/include -I/home/bwiberg/rpm/BUILD/php-5.3.0beta1/main -I/home/bwiberg/rpm/BUILD/php-5.3.0beta1 -I/home/bwiberg/rpm/BUILD/php-5.3.0beta1/ext/ereg/regex -I/usr/local/include/libxml2 -I/opt/freeware/include -I/usr/local/include -I/home/bwiberg/rpm/BUILD/php-5.3.0beta1/ext/date/lib -I/usr/X11R6/include -I/usr/include/freetype2 -I/home/bwiberg/rpm/BUILD/php-5.3.0beta1/ext/mbstring/oniguruma -I/home/bwiberg/rpm/BUILD/php-5.3.0beta1/ext/mbstring/libmbfl -I/home/bwiberg/rpm/BUILD/php-5.3.0beta1/ext/mbstring/libmbfl/mbfl -I/home/bwiberg/rpm/BUILD/php-5.3.0beta1/ext/sqlite3/libsqlite -I/home/bwiberg/rpm/BUILD/php-5.3.0beta1/TSRM -I/home/bwiberg/rpm/BUILD/php-5.3.0beta1/Zend -I/usr/include -g -fvisibility=hidden -O0 -Wall -c /home/bwiberg/rpm/BUILD/php-5.3.0beta1/ext/mysqlnd/mysqlnd_ps_codec.c  -DPIC -o ext/mysqlnd/.libs/mysqlnd_ps_codec.o
In file included from /home/bwiberg/rpm/BUILD/php-5.3.0beta1/ext/mysqlnd/mysqlnd.h:59,
                 from /home/bwiberg/rpm/BUILD/php-5.3.0beta1/ext/mysqlnd/mysqlnd_ps_codec.c:23:
/home/bwiberg/rpm/BUILD/php-5.3.0beta1/ext/mysqlnd/mysqlnd_portability.h:466:1: warning: "float8get" redefined
/home/bwiberg/rpm/BUILD/php-5.3.0beta1/ext/mysqlnd/mysqlnd_portability.h:418:1: warning: this is the location of the previous definition
/home/bwiberg/rpm/BUILD/php-5.3.0beta1/ext/mysqlnd/mysqlnd_portability.h:467:1: warning: "float8store" redefined
/home/bwiberg/rpm/BUILD/php-5.3.0beta1/ext/mysqlnd/mysqlnd_portability.h:408:1: warning: this is the location of the previous definition
/home/bwiberg/rpm/BUILD/php-5.3.0beta1/ext/mysqlnd/mysqlnd_ps_codec.c: In function 'ps_fetch_from_1_to_8_bytes':
/home/bwiberg/rpm/BUILD/php-5.3.0beta1/ext/mysqlnd/mysqlnd_ps_codec.c:82: error: 'MYSQLND_LLU_SPEC' undeclared (first use in this function)
/home/bwiberg/rpm/BUILD/php-5.3.0beta1/ext/mysqlnd/mysqlnd_ps_codec.c:82: error: (Each undeclared identifier is reported only once
/home/bwiberg/rpm/BUILD/php-5.3.0beta1/ext/mysqlnd/mysqlnd_ps_codec.c:82: error: for each function it appears in.)
/home/bwiberg/rpm/BUILD/php-5.3.0beta1/ext/mysqlnd/mysqlnd_ps_codec.c:111: error: 'MYSQLND_LL_SPEC' undeclared (first use in this function)
make: *** [ext/mysqlnd/mysqlnd_ps_codec.lo] Error 1
Bad exit status from /var/opt/freeware/tmp/rpm-tmp.6916 (%build)


Add a Patch

Pull Requests

Pull requests:

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2009-03-03 03:22 UTC]
Guess this is because there is not a check for AIX in mysqlnd/mysqlnd_portability.h either way mysqlnd should probably use #error to indicate a *possible* unsupported compilation env.
 [2009-03-09 21:18 UTC]
Now I don't have an AIX env. or anything, but after reading over a few articles I created the following patch. I'm not sure whether "_AIX" is the right macro to check for here though, if any of the MySQL guys can review it would be great:

Index: mysqlnd_portability.h
RCS file: /repository/php-src/ext/mysqlnd/mysqlnd_portability.h,v
retrieving revision
diff -u -r1.4.2.12 mysqlnd_portability.h
--- mysqlnd_portability.h   18 Nov 2008 17:02:18 -0000
+++ mysqlnd_portability.h   9 Mar 2009 21:13:32 -0000
@@ -199,6 +199,11 @@
 #define MYSQLND_LLU_SPEC "%llu"
+#ifdef _AIX
+#define MYSQLND_LL_SPEC "%lli"
+#define MYSQLND_LLU_SPEC "%llu"
 #define MYSQLND_SZ_T_SPEC "%zd"
 #ifndef L64
 #define L64(x) x##LL
 [2009-04-19 20:27 UTC]
Also happens on OSX Tiger, see bug #47992
 [2009-04-20 09:17 UTC]
This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
Thank you for the report, and for helping us make PHP better.

PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Feb 22 02:01:29 2024 UTC