From: martin at ibuildings dot nl
Operating system: Redhat 6.1
PHP version: 4.3.3
PHP Bug Type: Compile Failure
Bug description: Compilation error in libmysql.c
Description:
------------
I try to compile PHP 4.3.3. It gives me an error at compilation.
My settings:
TARGET="/usr/local/apache_1.3.28"
./configure \
--prefix=$TARGET \
--with-apxs=$TARGET/bin/apxs \
--with-config-file-path=$TARGET/conf \
--enable-memory-limit \
--with-mysql \
--disable-cli \
--with-oci8 \
--with-gd=/usr/local/gd \
--with-png-dir=/usr \
--with-jpeg-dir=/usr \
--with-ttf=/usr \
--enable-gd-imgstrttf \
--enable-gd-native-ttf \
--with-gettext \
--enable-track-vars \
--enable-sigchild \
--with-xml \
--with-zlib \
--with-java=/usr/local/jdk
configures runs ok but, when i do a make it fails with this:
In file included from
/usr/local/src/php-4.3.3/ext/mysql/libmysql/libmysql.c:4:
/usr/local/src/php-4.3.3/ext/mysql/libmysql/global.h:260: warning:
redefinition of `uint'
/usr/include/sys/types.h:131: warning: `uint' previously declared here
/usr/local/src/php-4.3.3/ext/mysql/libmysql/global.h:261: warning:
redefinition of `ushort'
/usr/include/sys/types.h:130: warning: `ushort' previously declared here
In file included from
/usr/local/src/php-4.3.3/ext/mysql/libmysql/libmysql.c:11:
/usr/local/src/php-4.3.3/ext/mysql/libmysql/m_string.h:183: parse error
before `__extension__'
/usr/local/src/php-4.3.3/ext/mysql/libmysql/m_string.h:183: parse error
before `&&'
make: *** [ext/mysql/libmysql/libmysql.lo] Error 1
config.log says for ushort and uint:
configure:51709: checking for type ushort
configure:51728: gcc -o conftest -g -O2 -Wl,-rpath,/usr/local/gd/lib
-L/usr/local/gd/lib -Wl,-rpath,/usr
/usr/local/jdk/jre/bin/libjpeg.so: undefined reference to
`JNU_ThrowByName'
/usr/local/jdk/jre/bin/libjpeg.so: undefined reference to
`JNU_NewObjectByName'
/usr/local/jdk/jre/bin/libjpeg.so: undefined reference to `JNU_GetEnv'
/usr/local/jdk/jre/bin/libjpeg.so: undefined reference to
`JNU_ThrowNullPointerException'
/usr/local/jdk/jre/bin/libjpeg.so: undefined reference to `jio_snprintf'
/usr/local/jdk/jre/bin/libjpeg.so: undefined reference to
`JNU_CallMethodByName'
/usr/local/jdk/jre/bin/libjpeg.so: undefined reference to
`JNU_CallStaticMethodByName'
collect2: ld returned 1 exit status
configure: failed program was:
#line 51717 "configure"
#include "confdefs.h"
#include <stdio.h>
#include <sys/types.h>
main()
{
ushort foo;
foo++;
exit(0);
}
configure:51666: checking for type uint
configure:51685: gcc -o conftest -g -O2 -Wl,-rpath,/usr/local/gd/lib
-L/usr/local/gd/lib -Wl,-rpath,/usr
/usr/local/jdk/jre/bin/libjpeg.so: undefined reference to
`JNU_ThrowByName'
/usr/local/jdk/jre/bin/libjpeg.so: undefined reference to
`JNU_NewObjectByName'
/usr/local/jdk/jre/bin/libjpeg.so: undefined reference to `JNU_GetEnv'
/usr/local/jdk/jre/bin/libjpeg.so: undefined reference to
`JNU_ThrowNullPointerException'
/usr/local/jdk/jre/bin/libjpeg.so: undefined reference to `jio_snprintf'
/usr/local/jdk/jre/bin/libjpeg.so: undefined reference to
`JNU_CallMethodByName'
/usr/local/jdk/jre/bin/libjpeg.so: undefined reference to
`JNU_CallStaticMethodByName'
collect2: ld returned 1 exit status
configure: failed program was:
#line 51674 "configure"
#include "confdefs.h"
#include <stdio.h>
#include <sys/types.h>
main()
{
uint foo;
foo++;
exit(0);
}
USHORT and UINT aren't defined in main/php_config.h
The problem looks a lot like bug 17809 and 12451
--
Edit bug report at http://bugs.php.net/?id=26028&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=26028&r=trysnapshot4
Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=26028&r=trysnapshot5
Fixed in CVS: http://bugs.php.net/fix.php?id=26028&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=26028&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=26028&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=26028&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=26028&r=support
Expected behavior: http://bugs.php.net/fix.php?id=26028&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=26028&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=26028&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=26028&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=26028&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=26028&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=26028&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=26028&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=26028&r=float