Hello Internals,
as of today PHP 5.3 uses a scanner based on re2c >= 0.13.3 (latest dev
version) instead of the outdated flex version we required so far. This in
particular means:
a) You need to get re2c 0.13.3 - when working on the language/ini scanner
b) You no longer need flex to build PHP 5.3
c) HEAD does not yet use re2c, this will be done withint the next days
d) ATM --enable-zend-multibyte is not supported - We will add the
functionality without the need for the switch within the next weeks
e) You need to run ./buildconf next time you do a cvs checkout of PHP_5_3
In case you are interested at a full patch:
http://php.net/~helly/php-re2c-5.3-20080316.diff.txt
In case you like to get more involved:
http://blog.somabo.de/2008/02/php-on-re2c.html
Care to help?
Write tests that use --enable-zend-multibyte or define how multibyte
support should work.
Best regards,
Marcus, Scott, Nuno
Here is a patch that appears to fix the Windows build:
http://www.thewritingpot.com/patches/php-re2c-windows.patch
I made re2c required; if pre-generated files are supplied, however, we
might be able to get away without it.
I also had to download re2c binaries from
http://sourceforge.net/project/showfiles.php?group_id=96864 and put them
in my path. Whoever's maintaining zip.zip will want to update it.
It appears Visual C++ 2005 Express does not support gotos to variable
labels (it does support vanilla gotos out of the box, however). So I
didn't bother porting the goto check code. Someone might want to do that
later if we start supporting other compilers.
Zend-related source files appear to have compiled successfully; re2c
didn't give any output and exited with error code 0 (I assume it worked).
--
Edward Z. Yang GnuPG: 0x869C48DA
HTML Purifier http://htmlpurifier.org Anti-XSS Filter
[[ 3FA8 E9A9 7385 B691 A6FC B3CB A933 BE7D 869C 48DA ]]
Edward Z. Yang wrote:
Here is a patch [snip]
Marcus beat me to it. :-)
--
Edward Z. Yang GnuPG: 0x869C48DA
HTML Purifier http://htmlpurifier.org Anti-XSS Filter
[[ 3FA8 E9A9 7385 B691 A6FC B3CB A933 BE7D 869C 48DA ]]
Hello Edward,
Sunday, March 16, 2008, 11:25:34 PM, you wrote:
Here is a patch that appears to fix the Windows build:
http://www.thewritingpot.com/patches/php-re2c-windows.patch
I made re2c required; if pre-generated files are supplied, however, we
might be able to get away without it.
I think we need to have the windows build maintainers decide how they would
like to handle this. One thing we haven't decided on is how to deal with
checkin of re2c generated files. In fact we need them to be done without -g
flag. So when someone commots who has -g detection on, he must regenerate
the file without that. Another option is to always generate both versions
and then select the correc one form the build system.
I also had to download re2c binaries from
http://sourceforge.net/project/showfiles.php?group_id=96864 and put them
in my path. Whoever's maintaining zip.zip will want to update it.
It appears Visual C++ 2005 Express does not support gotos to variable
labels (it does support vanilla gotos out of the box, however). So I
didn't bother porting the goto check code. Someone might want to do that
later if we start supporting other compilers.
Zend-related source files appear to have compiled successfully; re2c
didn't give any output and exited with error code 0 (I assume it worked).
Sounds right. Re2c does not output anything besides the generated files,
when successfull.
Best regards,
Marcus
Marcus Boerger wrote:
Another option is to always generate both versions
and then select the correc one form the build system.
+1
--
Edward Z. Yang GnuPG: 0x869C48DA
HTML Purifier http://htmlpurifier.org Anti-XSS Filter
[[ 3FA8 E9A9 7385 B691 A6FC B3CB A933 BE7D 869C 48DA ]]
Hi!
Windows build is broken right now. When trying to build, I get:
\cygwin\bin\bison.exe --output=Zend/zend_ini_parser.c -v -d -p ini_
Zend/zend_ini_parser.y
"\cygwin\bin\re2c.exe" "" --case-inverted -cbdFt
Zend\zend_ini_scanner_defs.h -oZend/zend_ini_scanner.c
Zend\zend_ini_scanner.l
usage: re2c [-bcdDefFghisvVw1] [-o file] file
-? -h --help Display this info.
etc. all the help of re2c
NMAKE : fatal error U1077: '\cygwin\bin\re2c.exe' : return code '0x2'
Stop.
This seems to be because of RE2C_FLAGS defined as "". If I set this
definition as empty, another error happens:
"\cygwin\bin\re2c.exe" --case-inverted -cbdFt
Zend\zend_ini_scanner_defs.h -oZend/zend_ini_scanner.c
Zend\zend_ini_scanner.l
"\cygwin\bin\re2c.exe" --case-inverted -cbdFt
/zend_language_scanner_defs.h -oZend\zend_language_scanner.c
/zend_language_scanner.l
re2c: error: cannot open /zend_language_scanner.l
NMAKE : fatal error U1077: '\cygwin\bin\re2c.exe' : return code '0x1'
Stop.
Please fix both.
Stanislav Malyshev, Zend Software Architect
stas@zend.com http://www.zend.com/
(408)253-8829 MSN: stas@zend.com
It should be fixed now.
Scott
Stanislav Malyshev wrote:
Hi!
Windows build is broken right now. When trying to build, I get:
\cygwin\bin\bison.exe --output=Zend/zend_ini_parser.c -v -d -p ini_
Zend/zend_ini_parser.y
"\cygwin\bin\re2c.exe" "" --case-inverted -cbdFt
Zend\zend_ini_scanner_defs.h -oZend/zend_ini_scanner.c
Zend\zend_ini_scanner.l
usage: re2c [-bcdDefFghisvVw1] [-o file] file-? -h --help Display this info.
etc. all the help of re2c
NMAKE : fatal error U1077: '\cygwin\bin\re2c.exe' : return code '0x2'
Stop.This seems to be because of RE2C_FLAGS defined as "". If I set this
definition as empty, another error happens:"\cygwin\bin\re2c.exe" --case-inverted -cbdFt
Zend\zend_ini_scanner_defs.h -oZend/zend_ini_scanner.c
Zend\zend_ini_scanner.l
"\cygwin\bin\re2c.exe" --case-inverted -cbdFt
/zend_language_scanner_defs.h -oZend\zend_language_scanner.c
/zend_language_scanner.l
re2c: error: cannot open /zend_language_scanner.l
NMAKE : fatal error U1077: '\cygwin\bin\re2c.exe' : return code '0x1'
Stop.Please fix both.
It should be fixed now.
First issue is still there (now it does RE2CFLAGS=null) but the second
one is gone.
Stanislav Malyshev, Zend Software Architect
stas@zend.com http://www.zend.com/
(408)253-8829 MSN: stas@zend.com
Interesting. I did a clean checkout when Stas' message came through and
can't reproduce the problem here.
Stas, is yours a cygwin-reliant exe?
- Steph
It should be fixed now.
Scott
Stanislav Malyshev wrote:
Hi!
Windows build is broken right now. When trying to build, I get:
\cygwin\bin\bison.exe --output=Zend/zend_ini_parser.c -v -d -p ini_
Zend/zend_ini_parser.y
"\cygwin\bin\re2c.exe" "" --case-inverted -cbdFt
Zend\zend_ini_scanner_defs.h -oZend/zend_ini_scanner.c
Zend\zend_ini_scanner.l
usage: re2c [-bcdDefFghisvVw1] [-o file] file-? -h --help Display this info.
etc. all the help of re2c
NMAKE : fatal error U1077: '\cygwin\bin\re2c.exe' : return code '0x2'
Stop.This seems to be because of RE2C_FLAGS defined as "". If I set this
definition as empty, another error happens:"\cygwin\bin\re2c.exe" --case-inverted -cbdFt
Zend\zend_ini_scanner_defs.h -oZend/zend_ini_scanner.c
Zend\zend_ini_scanner.l
"\cygwin\bin\re2c.exe" --case-inverted -cbdFt
/zend_language_scanner_defs.h -oZend\zend_language_scanner.c
/zend_language_scanner.l
re2c: error: cannot open /zend_language_scanner.l
NMAKE : fatal error U1077: '\cygwin\bin\re2c.exe' : return code '0x1'
Stop.Please fix both.
Interesting. I did a clean checkout when Stas' message came through and
can't reproduce the problem here.Stas, is yours a cygwin-reliant exe?
Erm, not sure what you mean here. I downloaded re2c.exe from sourceforge
release, did checkput of 5.3, buildconf and configure. Since configure
now produces RE2C_FLAGS=null in makefile, build failed. After removing
that line, build worked.
Stanislav Malyshev, Zend Software Architect
stas@zend.com http://www.zend.com/
(408)253-8829 MSN: stas@zend.com
Interesting. I did a clean checkout when Stas' message came through and
can't reproduce the problem here.Stas, is yours a cygwin-reliant exe?
Erm, not sure what you mean here.
I meant 'does it rely on cygwin1.dll or is it native'?
I downloaded re2c.exe from sourceforge
release, did checkput of 5.3, buildconf and configure. Since configure
now produces RE2C_FLAGS=null in makefile, build failed. After removing
that line, build worked.
Mine worked from scratch... I'm not sure which is weirder :)
- Steph
I meant 'does it rely on cygwin1.dll or is it native'?
No idea, whatever the person who put it on sourceforge built.
I downloaded re2c.exe from sourceforge release, did checkput of 5.3,
buildconf and configure. Since configure now produces RE2C_FLAGS=null
in makefile, build failed. After removing that line, build worked.Mine worked from scratch... I'm not sure which is weirder :)
Nevermind, I fixed it.
Stanislav Malyshev, Zend Software Architect
stas@zend.com http://www.zend.com/
(408)253-8829 MSN: stas@zend.com
Hi Stas,
I meant 'does it rely on cygwin1.dll or is it native'?
No idea, whatever the person who put it on sourceforge built.
If people are distributing binaries that rely on the cygwin runtime they
usually say something about it somewhere, so I'll assume not in in this
case. I just asked because the path was listed as C:\cygwin\bin\re2c.exe in
your original post.
I downloaded re2c.exe from sourceforge release, did checkput of 5.3,
buildconf and configure. Since configure now produces RE2C_FLAGS=null in
makefile, build failed. After removing that line, build worked.Mine worked from scratch... I'm not sure which is weirder :)
Nevermind, I fixed it.
yes... but given that mine worked in the first place, the question is
whether your (and Scott's) fixes will work here, which means I now need to
check out 5_3 and try again. Sorry, it's going to have to be after I finish
work for the day, taken up too much time already.
- Steph
Nevermind, I fixed it.
yes... but given that mine worked in the first place, the question is
whether your (and Scott's) fixes will work here, which means I now need to
check out 5_3 and try again. Sorry, it's going to have to be after I
finish work for the day, taken up too much time already.
talking to myself... again
Just confirming that the build still appears to work fine on my box
following today's changes (i.e. re2c generates files that are not empty, the
resulting PHP binary returns version info on request etc etc).
So you didn't break it :)
- Steph