RC3RC1

php.internals

Andi Gutmans

22 years ago
Please test. If there are no critical problems I'll release RC3 tomorrow which I think will be the last RC for 5.0. http://snaps.php.net/~andi/php-5.0.0RC3RC1.tar.bz2 http://snaps.php.net/~andi/php-5.0.0RC3RC1.tar.gz Andi

Curt Zirzow

22 years ago
* Thus wrote Andi Gutmans (andi@zend.com):
> Please test. If there are no critical problems I'll release RC3 tomorrow > which I think will be the last RC for 5.0. >
I'm getting an error during compile, /bin/sh /usr/home/curt/source/php-5.0.0RC3RC1/libtool --silent --preserve-dup-deps --mode=compile gcc -Iext/standard/ -I/usr/home/curt/source/php-5.0.0RC3RC1/ext/standard/ -DPHP_ATOM_INC -I/usr/home/curt/source/php-5.0.0RC3RC1/include -I/usr/home/curt/source/php-5.0.0RC3RC1/main -I/usr/home/curt/source/php-5.0.0RC3RC1 -I/usr/home/curt/source/php-5.0.0RC3RC1/Zend -I/usr/local/include/libxml2 -I/usr/local/include -I/usr/local/include/freetype2 -I/usr/local/imap-2000e/include -I/usr/local/mysql/include/mysql -I/usr/home/curt/source/php-5.0.0RC3RC1/TSRM -g -O2 -prefer-pic -c /usr/home/curt/source/php-5.0.0RC3RC1/ext/standard/proc_open.c -o ext/standard/proc_open.lo In file included from /usr/home/curt/source/php-5.0.0RC3RC1/Zend/zend.h:244, from /usr/home/curt/source/php-5.0.0RC3RC1/main/php.h:34, from /usr/home/curt/source/php-5.0.0RC3RC1/ext/standard/proc_open.c:25: /usr/home/curt/source/php-5.0.0RC3RC1/Zend/zend_hash.h:39: error: syntax error before "uint" zend_hash.h:50: error: syntax error before "uint" zend_hash.h:61: error: syntax error before "uint" zend_hash.h:81: error: syntax error before "uint" zend_hash.h:93: error: syntax error before "uint" zend_hash.h:94: error: syntax error before "uint" ... I'm not sure where to look to find out why this is happening. Curt
-- "I used to think I was indecisive, but now I'm not so sure."

Daniel Fahlgren

22 years ago
On Thu, May 27, 2004 at 08:11:17PM +0000, Curt Zirzow wrote:
> * Thus wrote Andi Gutmans (andi@zend.com): > > Please test. If there are no critical problems I'll release RC3 tomorrow > > which I think will be the last RC for 5.0. > > > > I'm getting an error during compile, > [..] > In file included > from /usr/home/curt/source/php-5.0.0RC3RC1/Zend/zend.h:244, > from /usr/home/curt/source/php-5.0.0RC3RC1/main/php.h:34, > from /usr/home/curt/source/php-5.0.0RC3RC1/ext/standard/proc_open.c:25: > /usr/home/curt/source/php-5.0.0RC3RC1/Zend/zend_hash.h:39: > error: syntax error before "uint"
I guess you are using Solaris or AIX, right? I figured out a way to get it to compile cleanly on Solaris, but I'm not sure if Wes fixed the CVS.. Any how.. if you add #define __EXTENSIONS__ #define _ALL_SOURCE #include <sys/types.h> in proc_open.c it will compile.. The __EXTENSIONS__ is for Solaris and _ALL_SOURCE is needed for AIX. (at least 4.3) In the AIX case I needed to run configure with --without-iconv in order for it to link correctly, not sure if thats a general AIX problem or just on the machine I tried it on. Irix is another story, haven't had the time to dig in on the problem. / Fahlgren
-- I live the way I type; fast, with a lot of mistakes Daniel Fahlgren http://www.acc.umu.se/~guru/ sysadm@{acc,cs,math}.umu.se 070-3406400 ordf@acc

Curt Zirzow

22 years ago
* Thus wrote Daniel Fahlgren (guru@acc.umu.se):
> On Thu, May 27, 2004 at 08:11:17PM +0000, Curt Zirzow wrote: > > * Thus wrote Andi Gutmans (andi@zend.com): > > > Please test. If there are no critical problems I'll release RC3 tomorrow > > > which I think will be the last RC for 5.0. > > > > > > > I'm getting an error during compile, > > [..] > > In file included > > from /usr/home/curt/source/php-5.0.0RC3RC1/Zend/zend.h:244, > > from /usr/home/curt/source/php-5.0.0RC3RC1/main/php.h:34, > > from /usr/home/curt/source/php-5.0.0RC3RC1/ext/standard/proc_open.c:25: > > /usr/home/curt/source/php-5.0.0RC3RC1/Zend/zend_hash.h:39: > > error: syntax error before "uint" > > I guess you are using Solaris or AIX, right? I figured out a way to get > it to compile cleanly on Solaris, but I'm not sure if Wes fixed the > CVS.. Any how.. if you add
This actually FreeBSD 5.2.1-RELEASE. RC1 and HEAD (a day or so ago) compiled ok for me with the same exact configure options. I'm going to check to see if I can get HEAD to compile. Curt
-- "I used to think I was indecisive, but now I'm not so sure."

Curt Zirzow

22 years ago
* Thus wrote Daniel Fahlgren (guru@acc.umu.se):
> On Thu, May 27, 2004 at 08:11:17PM +0000, Curt Zirzow wrote: > > * Thus wrote Andi Gutmans (andi@zend.com): > > > Please test. If there are no critical problems I'll release RC3 tomorrow > > > which I think will be the last RC for 5.0. > > > > > > > I'm getting an error during compile, > > [..] > > In file included > > from /usr/home/curt/source/php-5.0.0RC3RC1/Zend/zend.h:244, > > from /usr/home/curt/source/php-5.0.0RC3RC1/main/php.h:34, > > from /usr/home/curt/source/php-5.0.0RC3RC1/ext/standard/proc_open.c:25: > > /usr/home/curt/source/php-5.0.0RC3RC1/Zend/zend_hash.h:39: > > error: syntax error before "uint" > > I guess you are using Solaris or AIX, right? I figured out a way to get > it to compile cleanly on Solaris, but I'm not sure if Wes fixed the > CVS.. Any how.. if you add > > #define __EXTENSIONS__ > #define _ALL_SOURCE > #include <sys/types.h> >
Yep, those defines are there, but If I add #define __BSD_VISIBLE 1 It works. I tracked it down that it broke for me at revision 1.21 (the pty support for proc_open), the macro #define _XOPEN_SOURCE 500 causes my system to change which POSIX version to compile with. If I take that _XOPEN_SOURCE line out it compiles fine. Is that #define needed? I have a strong feeling the __EXTENSIONS__ and _ALL_SOURCE macros could be remove as well. Curt
-- "I used to think I was indecisive, but now I'm not so sure."

Curt Zirzow

22 years ago
* Thus wrote Curt Zirzow (curt@php.net):
> I tracked it down that it broke for me at revision 1.21 (the pty > support for proc_open), the macro #define _XOPEN_SOURCE 500 causes > my system to change which POSIX version to compile with.
Actually it was revision 1.24 that broke things for me, defining _XOPEN_SOURCE at 500 or 600 breaks things on FreeBSD. Curt
-- "I used to think I was indecisive, but now I'm not so sure."

Wez Furlong

22 years ago
So a "plain" _XOPEN_SOURCE works on fbsd? --Wez.

Wez Furlong

22 years ago
These are all needed in different combinations on different systems. Don't you just love standards!? --Wez.

Daniel Fahlgren

22 years ago
On Fri, May 28, 2004 at 11:16:51AM +0100, Wez Furlong wrote:
> These are all needed in different combinations on different systems. > Don't you just love standards!?
Mmm.. And the standard on Irix is #define _BSD_COMPAT / Daniel Fahlgren
-- I live the way I type; fast, with a lot of mistakes Daniel Fahlgren http://www.acc.umu.se/~guru/ sysadm@{acc,cs,math}.umu.se 070-3406400 ordf@acc

Wez Furlong

22 years ago
Thanks! Can you check if there is a guard for the grantpt function too? --Wez.

Daniel Fahlgren

22 years ago
Hello
> Can you check if there is a guard for the grantpt function too?
As long as you don't give the "-ansi" option to gcc it compiles without warning. All it needs it stdlib.h / Daniel Fahlgren
-- I live the way I type; fast, with a lot of mistakes Daniel Fahlgren http://www.acc.umu.se/~guru/ sysadm@{acc,cs,math}.umu.se 070-3406400 ordf@acc

Wez Furlong

22 years ago
Does IRIX also have grantpt() ? If so, what defines are needed to switch it on? --Wez.

Daniel Fahlgren

22 years ago
On Fri, May 28, 2004 at 01:25:36PM +0100, Wez Furlong wrote:
> Does IRIX also have grantpt() ?
Yes.
> If so, what defines are needed to switch it on?
Nothing but to include stdlib.h / Daniel Fahlgren
-- I live the way I type; fast, with a lot of mistakes Daniel Fahlgren http://www.acc.umu.se/~guru/ sysadm@{acc,cs,math}.umu.se 070-3406400 ordf@acc

Wez Furlong

22 years ago
Thanks; sorry for mailing twice, I got interrupted and forgot that I had already asked you the question. Could you please test HEAD (or the next snapshot); I've updated it to what will hopefully be the final incarnation of proc_open.c for PHP 5.0.0 --Wez.

Curt Zirzow

22 years ago
* Thus wrote Wez Furlong (wez@thebrainroom.com):
> Thanks; sorry for mailing twice, I got interrupted and forgot that I had > already asked you the question. > > Could you please test HEAD (or the next snapshot); I've updated it to what > will hopefully be the final incarnation of proc_open.c for PHP 5.0.0 >
FreeBSD compiles ok now! Thanks Wez. Curt
-- "I used to think I was indecisive, but now I'm not so sure."

Daniel Fahlgren

22 years ago
On Fri, May 28, 2004 at 02:29:38PM +0100, Wez Furlong wrote:
> Thanks; sorry for mailing twice, I got interrupted and forgot that I had > already asked you the question. > > Could you please test HEAD (or the next snapshot); I've updated it to what > will hopefully be the final incarnation of proc_open.c for PHP 5.0.0
It compiles just fine on Irix. But I found this as well (from configure): --without-iconv[=DIR] Include iconv support perhaps not right ;) / Daniel Fahlgren
-- I live the way I type; fast, with a lot of mistakes Daniel Fahlgren http://www.acc.umu.se/~guru/ sysadm@{acc,cs,math}.umu.se 070-3406400 ordf@acc

Sascha Schumann

22 years ago
On Fri, 28 May 2004, Wez Furlong wrote:
> These are all needed in different combinations on different systems. > Don't you just love standards!?
It is extremely unwise to play with these flags, because there is nothing portable about them. Getting it right and making it work everywhere is basically impossible. I suggest you drop them from the source file and add them on a per-source base in configure.in depending on $host_alias. - Sascha

Wez Furlong

22 years ago
A problem with that is that our php_config.h will unconditionally include various system headers, not allowing an individual source file to set more flags. This is a problem, for example, on Solaris where defining the correct symbols to get Unix98 and the uint type working in turn causes stdio.h to define va_list. Solaris doesn't protect itself from redefining it in stdarg.h later, and we end up with a warning for each source file.
>From what I've been able to determine, it seems that only linux and solaris
support unix98 ptys (waiting to hear about IRIX), so I'll probably end up committing this to proc_open.c instead: #if defined(__linux__) || defined(sun) # define _BSD_SOURCE /* linux wants this when XOPEN mode is on */ # define _XOPEN_SOURCE 500 /* turn on Unix98 */ # define __EXTENSIONS__ 1 /* Solaris: uint */ #endif --Wez.

Sascha Schumann

22 years ago
On Fri, 28 May 2004, Wez Furlong wrote:
> A problem with that is that our php_config.h will unconditionally include > various system headers, not allowing an individual source file to set more > flags.
You can tell PHP_ADD_SOURCES to use special compile flags for a specific compilation unit. These flags will preempt anything php_config.h does. dnl PHP_ADD_SOURCES(source-path, sources[, special-flags[, type]]) So, in your config.m4, you would determine these special flags (either using a autoconf test or $host_alias), and call PHP_ADD_SOURCES for the problematic source file. This is the preferred way, because you can perform more elaborate checks in config.m4 than using the C preprocessor. - Sascha

Marcus Bointon

22 years ago
on 27/5/04 21:11, Curt Zirzow at curt@php.net wrote:
> In file included > from /usr/home/curt/source/php-5.0.0RC3RC1/Zend/zend.h:244, > from /usr/home/curt/source/php-5.0.0RC3RC1/main/php.h:34, > from /usr/home/curt/source/php-5.0.0RC3RC1/ext/standard/proc_open.c:25: > /usr/home/curt/source/php-5.0.0RC3RC1/Zend/zend_hash.h:39: > error: syntax error before "uint" >
I'm seeing the same on OpenBSD. Marcus
-- Marcus Bointon Synchromedia Limited: Putting you in the picture marcus@synchromedia.co.uk | http://www.synchromedia.co.uk

Wez Furlong

22 years ago
Could you please take a look in your system headers to see where "uint" gets defined. It will be guarded by an #ifdef; in order to correct this problem without breaking the build for other platforms, we need to know what causes that thing to get defined. --Wez.

Rob Richards

22 years ago
From: Andi Gutmans
> Please test. If there are no critical problems I'll release RC3 tomorrow > which I think will be the last RC for 5.0.
Andi, hopefully you arent waiting on a fix for the libxml streams issue to roll RC3. I would suggest that our streams handling be left as is right now. I have made a request that some additional functionality be added to libxml which will allow us to resolve the streams issue correctly. It would no longer require us to register our streams with libxml, but rather override the URI handling functionality directly (would still require us to register our function in RINIT and clear it on RSHUTDOWN - like we do with error handling). Its not a big change as I am running the changes locally here and it seems to work well. The only thing is that we would need to require the latest libxml (hoping it to be released in 2.6.11) for things to work properly. Rob

Andi Gutmans

22 years ago
Okay, I won't hold on in this case. I just want to resolve the return value to the user-error handler before I roll. I also understand that the proc_open() compile problems seem to be solved. Thanks, Andi At 04:13 PM 5/29/2004 -0400, Rob Richards wrote: