php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #17072 Compilation aborts while compiling ext/mysql/libmysql/libmysql.c
Submitted: 2002-05-07 08:30 UTC Modified: 2002-07-06 20:36 UTC
From: kolmann at zid dot tuwien dot ac dot at Assigned:
Status: Closed Package: Compile Failure
PHP Version: 4.2.0 OS: AIX
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: kolmann at zid dot tuwien dot ac dot at
New email:
PHP Version: OS:

 

 [2002-05-07 08:30 UTC] kolmann at zid dot tuwien dot ac dot at
Hi,

we just wanted to compile the new PHP 4.2.0 on an AIX machine and it crashes while trying to compile the built-in mysql lib:

make[4]: Entering directory `/home/pkolmann/stuff/php-4.2.0/ext/mysql/libmysql'
gcc -I. -I/u/pkolmann/stuff/php-4.2.0/ext/mysql/libmysql -I/u/pkolmann/stuff/php-4.2.0/main -I/u/pkolmann/stuff/php-4.2.0 -I/u/pkolmann/stuff/apache_1.3.24/src/include -I/u/pkolmann/stuff/apache_1.3.24/src/os/unix -I/u/pkolmann/stuff/php-4.2.0/Zend -I/u/pkolmann/stuff/php-4.2.0/ext/mysql/libmysql -I/u/pkolmann/stuff/php-4.2.0/ext/xml/expat  -I/u/pkolmann/stuff/php-4.2.0/TSRM -O2  -c libmysql.c && touch libmysql.lo
In file included from libmysql.c:5:
global.h:256: warning: redefinition of `uint'
/usr/local/lib/gcc-lib/powerpc-ibm-aix4.3.2.0/2.95.3/include/sys/types.h:471: warning: `uint' previously declared here
global.h:257: warning: redefinition of `ushort'
/usr/local/lib/gcc-lib/powerpc-ibm-aix4.3.2.0/2.95.3/include/sys/types.h:470: warning: `ushort' previously declared here
global.h:258: warning: redefinition of `ulong'
/usr/local/lib/gcc-lib/powerpc-ibm-aix4.3.2.0/2.95.3/include/sys/types.h:472: warning: `ulong' previously declared here
In file included from libmysql.c:5:
global.h:566: conflicting types for `int8'
/usr/include/sys/inttypes.h:622: previous declaration of `int8'
global.h:567: warning: redefinition of `int16'
/usr/include/sys/inttypes.h:623: warning: `int16' previously declared here
global.h:570: warning: redefinition of `uchar'
/usr/local/lib/gcc-lib/powerpc-ibm-aix4.3.2.0/2.95.3/include/sys/types.h:469: warning: `uchar' previously declared here
global.h:577: warning: redefinition of `int32'
/usr/include/sys/inttypes.h:624: warning: `int32' previously declared here
global.h:590: warning: redefinition of `ulong'
global.h:258: warning: `ulong' previously declared here
libmysql.c: In function `connect2':
libmysql.c:192: warning: passing arg 5 of `getsockopt' from incompatible pointer type
libmysql.c: In function `net_safe_read':
libmysql.c:290: warning: passing arg 2 of `signal' from incompatible pointer type
libmysql.c: In function `net_field_length_ll':
libmysql.c:397: warning: left shift count >= width of type
libmysql.c: In function `simple_command':
libmysql.c:421: warning: passing arg 2 of `signal' from incompatible pointer type
libmysql.c: In function `pipe_sig_handler':
libmysql.c:605: warning: passing arg 2 of `signal' from incompatible pointer type
libmysql.c: In function `end_server':
libmysql.c:622: warning: passing arg 2 of `signal' from incompatible pointer type
libmysql.c: In function `mysql_real_connect':
libmysql.c:1158: warning: passing arg 2 of `signal' from incompatible pointer type
make[4]: *** [libmysql.lo] Error 1
make[4]: Leaving directory `/home/pkolmann/stuff/php-4.2.0/ext/mysql/libmysql'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/home/pkolmann/stuff/php-4.2.0/ext/mysql/libmysql'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/pkolmann/stuff/php-4.2.0/ext/mysql'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/pkolmann/stuff/php-4.2.0/ext'
make: *** [all-recursive] Error 1

The previous version (4.1.2) did compile without troubles. The Problem seems to be inside the golbal.h file:

pkolmann@mail:~$ diff test/php-4.1.2/ext/mysql/libmysql/global.h stuff/php-4.2.0/ext/mysql/libmysql/global.h 
252a253,255
> #undef uint
> #undef ushort
> #undef ulong
254a258
> typedef unsigned long ulong;

Is there any possibility for a fix?
Thanks a lot
Philipp Kolmann

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-05-12 01:17 UTC] karl at katzke dot net
Noted while compiling on a linux box (Slack 8, 2.4.5, gcc 2.95) that a redefinition of ushort threw a warning. Not a fatal error, but may provide a clue to this other problem.

php_mysql.c:55: warning: redefinition of `ushort'
/usr/include/sys/types.h:145: warning: `ushort' previously declared here
 [2002-06-20 12:22 UTC] gbarnes at pumatech dot com
I have a similar problem here. Version 4.1.0 compiled fine however. The only command line argument I gave was --with-apxs:

Making all in libmysql
make[3]: Entering directory `/usr/share/src/php-4.2.0/ext/mysql/libmysql'
make[4]: Entering directory `/usr/share/src/php-4.2.0/ext/mysql/libmysql'
/bin/sh /usr/share/src/php-4.2.0/libtool --silent --mode=compile gcc  -I. -I/usr/share/src/php-4.2.0/ext/mysql/libmysql -I/usr/share/src/php-4.2.0/main -I/usr/share/src/php-4.2.0 -I/usr/local/apache/include -I/usr/share/src/php-4.2.0/Zend -I/usr/share/src/php-4.2.0/ext/mysql/libmysql -I/usr/share/src/php-4.2.0/ext/xml/expat  -D_POSIX_PTHREAD_SEMANTICS -DSOLARIS2=270 -DUSE_EXPAT -I/usr/share/src/php-4.2.0/TSRM -g -O2 -prefer-pic  -c libmysql.c
In file included from libmysql.c:5:
global.h:136: parse error
In file included from libmysql.c:5:
global.h:498: parse error
In file included from libmysql.c:12:
m_string.h:205: parse error
make[4]: *** [libmysql.lo] Error 1
make[4]: Leaving directory `/usr/share/src/php-4.2.0/ext/mysql/libmysql'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/usr/share/src/php-4.2.0/ext/mysql/libmysql'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/usr/share/src/php-4.2.0/ext/mysql'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/share/src/php-4.2.0/ext'
make: *** [all-recursive] Error 1
 [2002-06-20 19:01 UTC] sniper@php.net
Try this snapshot:

http://snaps.php.net/php4-latest.tar.gz

 [2002-06-21 02:01 UTC] kolmann at zid dot tuwien dot ac dot at
Hi,

just tried your snapshot:

It seems that it makes quite a trouble, that I have no mysql installed native on the machine.

I can't get the mysql modules to compile:
gcc can't find <mysql.h> and breaks in ext/mysql/php_mysql.c:65
/bin/sh libtool --silent --mode=compile gcc  -Iext/mysql/ -I/u/pkolmann/test/php4-200206202100/ext/mysql/ -DPHP_ATOM_INC -I/u/pkolmann/test/php4-200206202100/include -I/u/pkolmann/test/php4-200206202100/main -I/u/pkolmann/test/php4-200206202100 -I/u/pkolmann/test/php4-200206202100/Zend -I/u/pkolmann/test/php4-200206202100/ext/xml/expat  -DAIX=43 -DUSE_PTHREAD_SERIALIZED_ACCEPT -DAIX_BIND_PROCESSOR -DMOD_SSL=208107 -DUSE_HSREGEX -DEAPI -DUSE_EXPAT -I/u/pkolmann/test/php4-200206202100/TSRM -O2  -prefer-pic -c /u/pkolmann/test/php4-200206202100/ext/mysql/php_mysql.c -o ext/mysql/php_mysql.lo 
/u/pkolmann/test/php4-200206202100/ext/mysql/php_mysql.c:65: mysql.h: No such file or directory
make: *** [ext/mysql/php_mysql.lo] Error 1


if I changee this line to include "libmysql/mysql.h" it compiles, but then hangs during the compilation of the libmysql dir.


Thanks so far
Kind Regards
Philipp Kolmann
 [2002-06-24 19:48 UTC] sniper@php.net
What exactly was the configure line used to configure PHP?

 [2002-06-25 01:46 UTC] kolmann at zid dot tuwien dot ac dot at
root@mail:~# ./configure --prefix=/pd/PGphp4 --with-config-file=/opt/PGphp4/lib --with-apxs=/pd/AGapache/bin/apxs
 [2002-06-29 23:30 UTC] sniper@php.net
Just tested the latest (from today) snapshot on AIX 4.3.3
and it compiles without any errors in libmysql.

 [2002-06-30 07:29 UTC] derick@php.net
I have the same problem on Solaris/intel with the latest DEV version as reported in  "[21 Jun 2:01am] kolmann@zid.tuwien.ac.at"
I don't have the mysql libs installed, and thus use the bundled libs.
SOmething with the include paths is wrong, as mysql.h is in ext/mysql/libmysql. Chaching line 65 in php_mysql.h to include "libmysql/mysql.h" doesn't fix it either, as I then get errors for not finding other include files.

reopening
 [2002-07-06 20:36 UTC] sniper@php.net
This bug has been fixed in CVS. You can grab a snapshot of the
CVS version at http://snaps.php.net/. In case this was a documentation 
problem, the fix will show up soon at http://www.php.net/manual/.
In case this was a PHP.net website problem, the change will show
up on the PHP.net site and on the mirror sites.
Thank you for the report, and for helping us make PHP better.


 [2003-03-27 06:19 UTC] jason at jasonsrealm dot com
I am attempting to configure php 4.3.1 and apache 1.3.27 on a Redhat Linux 8 (Psyche) box and I am running into some problems.

my configure command is:  
./configure --with-mysql --with-apache=../apache_1.3.27/ --enable-track-vars

then I run "make" and I get the following problem.  What can I do to fix this.

[root@code3 php-4.3.1]# make
gcc  -Iext/ctype/ -I/usr/local/src/php-4.3.1/ext/ctype/ -DPHP_ATOM_INC -I/usr/local/src/php-4.3.1/include -I/usr/local/src/php-4.3.1/main -I/usr/local/src/php-4.3.1 -I/usr/local/src/php-4.3.1/Zend -I/usr/local/src/php-4.3.1/ext/xml/expat  -I/usr/local/src/php-4.3.1/TSRM  -g -O2  -c /usr/local/src/php-4.3.1/ext/ctype/ctype.c -o ext/ctype/ctype.o  && echo > ext/ctype/ctype.lo
In file included from /usr/include/errno.h:36,
                 from /usr/local/src/php-4.3.1/Zend/zend_operators.h:24,
                 from /usr/local/src/php-4.3.1/Zend/zend_execute_globals.h:27,
                 from /usr/local/src/php-4.3.1/Zend/zend_globals.h:34,
                 from /usr/local/src/php-4.3.1/Zend/zend_list.h:25,
                 from /usr/local/src/php-4.3.1/Zend/zend_API.h:26,
                 from /usr/local/src/php-4.3.1/main/php.h:38,
                 from /usr/local/src/php-4.3.1/ext/ctype/ctype.c:23:
/usr/include/bits/errno.h:25:26: linux/errno.h: No such file or directory
In file included from /usr/local/src/php-4.3.1/Zend/zend_execute_globals.h:27,
                 from /usr/local/src/php-4.3.1/Zend/zend_globals.h:34,
                 from /usr/local/src/php-4.3.1/Zend/zend_list.h:25,
                 from /usr/local/src/php-4.3.1/Zend/zend_API.h:26,
                 from /usr/local/src/php-4.3.1/main/php.h:38,
                 from /usr/local/src/php-4.3.1/ext/ctype/ctype.c:23:
/usr/local/src/php-4.3.1/Zend/zend_operators.h: In function `is_numeric_string':
/usr/local/src/php-4.3.1/Zend/zend_operators.h:78: `ERANGE' undeclared (first use in this function)
/usr/local/src/php-4.3.1/Zend/zend_operators.h:78: (Each undeclared identifier is reported only once
/usr/local/src/php-4.3.1/Zend/zend_operators.h:78: for each function it appears in.)
In file included from /usr/include/bits/posix1_lim.h:126,
                 from /usr/include/limits.h:144,
                 from /usr/lib/gcc-lib/i386-redhat-linux/3.2/include/limits.h:132,
                 from /usr/lib/gcc-lib/i386-redhat-linux/3.2/include/syslimits.h:7,
                 from /usr/lib/gcc-lib/i386-redhat-linux/3.2/include/limits.h:11,
                 from /usr/include/sys/param.h:22,
                 from /usr/local/src/php-4.3.1/main/php.h:205,
                 from /usr/local/src/php-4.3.1/ext/ctype/ctype.c:23:
/usr/include/bits/local_lim.h:36:26: linux/limits.h: No such file or directory
In file included from /usr/local/src/php-4.3.1/main/php.h:205,
                 from /usr/local/src/php-4.3.1/ext/ctype/ctype.c:23:
/usr/include/sys/param.h:23:26: linux/limits.h: No such file or directory
/usr/include/sys/param.h:24:25: linux/param.h: No such file or directory
In file included from /usr/local/src/php-4.3.1/main/php.h:354,
                 from /usr/local/src/php-4.3.1/ext/ctype/ctype.c:23:
/usr/local/src/php-4.3.1/main/php_streams.h: At top level:
/usr/local/src/php-4.3.1/main/php_streams.h:116: `PATH_MAX' undeclared here (not in a function)
/usr/local/src/php-4.3.1/main/php_streams.h:117: confused by earlier errors, bailing out
make: *** [ext/ctype/ctype.lo] Error 1
[root@code3 php-4.3.1]#

Thanks

Jason
 
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Mon Sep 27 14:03:37 2021 UTC