ID:               16788
 Updated by:       [EMAIL PROTECTED]
 Reported By:      [EMAIL PROTECTED]
-Status:           Open
+Status:           Closed
 Bug Type:         MySQL related
 Operating System: HP-UX 11.00
 PHP Version:      4.2.0


Previous Comments:
------------------------------------------------------------------------

[2002-05-01 06:43:50] [EMAIL PROTECTED]

It works now. Thanks.

------------------------------------------------------------------------

[2002-04-25 22:17:21] [EMAIL PROTECTED]

Can you please try with fresh 4.2.0 sources and replace
the configure file with this one:

http://www.edin.dk/php/configure.gz



------------------------------------------------------------------------

[2002-04-25 05:40:58] [EMAIL PROTECTED]

Here are the snippets of the config.log that address the uint check:

configure:41798: checking for type uint
configure:41819: g++ -o conftest   -DHPUX11 -DUSE_HSREGEX -DUSE_EXPAT 
-L/user/d
dts/local/gnu/lib/gcc-lib/hppa2.0w-hp-hpux11.00/3.0.1
-L/user/ddts/local/gnu/lib
/gcc-lib/hppa2.0w-hp-hpux11.00/3.0.1 conftest.cc -lcrypt -lm -lnsl 
-lgcc -lcryp
t >&5
./configure[41820]: g++:  not found.
configure:41822: $? = 127
configure: program exited with status 127
configure: failed program was:
#line 41807 "configure"
#include "confdefs.h"
#include <stdio.h>
#include <sys/types.h>
main()
{
  uint foo;
  foo++;
  exit(0);
}
configure:41840: result: no


configure:76486: checking for uint
configure:76507: gcc -c -g -O2  -DHPUX11 -DUSE_HSREGEX -DUSE_EXPAT
conftest.c >&
5
configure:76510: $? = 0
configure:76513: test -s conftest.o
configure:76516: $? = 0
configure:76526: result: yes


ac_cv_type_size_t=yes
ac_cv_type_uid_t=yes
ac_cv_type_uint=yes
ac_cv_type_ulong=no
ac_cv_uchar=no
ac_cv_uint=no
ac_cv_ulong=no
ac_cv_ushort=no


...plus a few lines from main/php_config.h:

/* #undef uint */
#define ulong unsigned long

/* */
/* #undef HAVE_UINT */
/* Define to `unsigned int ' if <sys/types.h> does not define. */
/* #undef uint */


The type uint is defined in sys/types.h, although there is a remark
that says you should try to avoid using it (and probably use types like
uint16_t instead).

------------------------------------------------------------------------

[2002-04-24 22:00:32] [EMAIL PROTECTED]

Can you check config.log for the uint check?
Is HAVE_UINT defined in main/php_config.h ?

--Jani


------------------------------------------------------------------------

[2002-04-24 06:33:29] [EMAIL PROTECTED]

While compiling PHP 4.2.0 (using gcc 3.0.1), I get the following
error:

Making all in libmysql
make[3]: Entering directory
`/volumes/v1/users/ddtsbase/ddts_4.6.3/local/src/php/php-4.2.0/ext/mysql/libmysql'
make[4]: Entering directory
`/volumes/v1/users/ddtsbase/ddts_4.6.3/local/src/php/php-4.2.0/ext/mysql/libmysql'
/bin/sh /user/ddts/local/src/php/php-4.2.0/libtool --silent
--mode=compile gcc  -I.
-I/user/ddts/local/src/php/php-4.2.0/ext/mysql/libmysql
-I/user/ddts/local/src/php/php-4.2.0/main
-I/user/ddts/local/src/php/php-4.2.0
-I/user/ddts/local/apache_1.3.24/include
-I/user/ddts/local/src/php/php-4.2.0/Zend
-I/user/ddts/local/gnu/include
-I/user/ddts/local/src/php/php-4.2.0/ext/mysql/libmysql
-I/user/ddts/local/src/php/php-4.2.0/ext/xml/expat  -DHPUX11
-DUSE_HSREGEX -DUSE_EXPAT -I/user/ddts/local/src/php/php-4.2.0/TSRM -g
-O2 -prefer-pic  -c libmysql.c
In file included from libmysql.c:5:
global.h:256: warning: redefinition of `uint'
/user/ddts/local/gnu/lib/gcc-lib/hppa2.0w-hp-hpux11.00/3.0.1/include/sys/types.h:322:
warning: `uint' previously declared here
global.h:257: warning: redefinition of `ushort'
/user/ddts/local/gnu/lib/gcc-lib/hppa2.0w-hp-hpux11.00/3.0.1/include/sys/types.h:323:
warning: `ushort' previously declared here
In file included from libmysql.c:5:
global.h:590: redefinition of `ulong'
global.h:258: `ulong' previously declared here
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
`/volumes/v1/users/ddtsbase/ddts_4.6.3/local/src/php/php-4.2.0/ext/mysql/libmysql'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory
`/volumes/v1/users/ddtsbase/ddts_4.6.3/local/src/php/php-4.2.0/ext/mysql/libmysql'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory
`/volumes/v1/users/ddtsbase/ddts_4.6.3/local/src/php/php-4.2.0/ext/mysql'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory
`/volumes/v1/users/ddtsbase/ddts_4.6.3/local/src/php/php-4.2.0/ext'
make: *** [all-recursive] Error 1

The configure command I use is:

./configure \
--prefix=/user/ddts/local/php_4.2.0 \
--with-apxs=/user/ddts/local/apache_1.3.24/bin/apxs \
--with-config-file-path=/user/ddts/local/apache_1.3.24/etc \
--enable-ftp \
--enable-yp \
--enable-libgcc \
--with-dbm \
--with-gdbm=/user/ddts/local/gnu \
--with-ndbm

The problem turns out to be in this part of global.h:

252: #if defined(__EMX__) || !defined(HAVE_UINT)
253: #undef uint
254: #undef ushort
255: #undef ulong
256: typedef unsigned int uint;
257: typedef unsigned short ushort;
258: typedef unsigned long ulong;
259: #endif

If I disable lines 256, 257 and 258, everything compiles like a charm.

------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=16788&edit=1

Reply via email to