You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
re2c.exe - It doesn't say what version, I downloaded it from gnuwin32 because nothing on my system had that executable. Apparently, it was too old (compile errors converting the .re files into .c) and I needed up putting it in zephir\bin. I ended removing re2c.exe from zephir\bin and instead installed https://chocolatey.org (as admin), and then ran "choco install re2c". That version worked correctly.
bison.exe - nothing about bison, also downloaded from gnuwin32 that seemed to work when I placed it in zephir\bin
Then came the build errors and I saw PHP 5 extensions referenced, when I had setup PHP 7 sdk and devpack. So i've edited zephir\parser\parser\build_win32.bat and switched:
REM Build Lemon
cl lemon.c
del parser.c parser.h scanner.c
re2c -o scanner.c scanner.re
lemon -s parser.php5.lemon
type parser.php5.c > parser.c
type base.c >> parser.c
to
REM Build Lemon
cl lemon.c
del parser.c parser.h scanner.c
re2c -o scanner.c scanner.re
lemon -s parser.php7.lemon
type parser.php7.c > parser.c
type base.c >> parser.c
Of course these files are generated on the fly so if it was to configure the parser again then that file would revert. BTW There was an issue opened on this and then closed: #1366
And while I did finally get php_zephir_parser.dll, it was in the wrong path. So I found a Japanese blog entry about a simular issue with Windows x64, and pointed to zephir\Library\Compiler.php, and after line 250, $buildType needed to be prefixed with 'x64/'. The if statement in the blog didn't work, so I just hard coded in the prefix:
$buildType = 'x64/' . $buildType;
And that seemed to work! I could now run:
php -dextension=ext\x64\Release_TS\php_utils.dll -r "echo Utils\Greeting::say(), "\n";"
The overall issues
documentation for rec2.exe and bison.exe versions and where do we get these files they don't come with php 7, sdk, or devpack
Something is wrong with PHP 7 detection, maybe just on windows, not sure why zephir\parser\parser\build_win32.bat was using php5
While I needed to edit zephir\Library\Compiler.php I don't think that's an appropriate solution, the problem is in the build process, it should copy the dll to the correct folder.
The text was updated successfully, but these errors were encountered:
F:\mnbox>zephir build
Preparing for PHP compilation...
Preparing configuration file...
Compiling...
Installation is not implemented for windows yet! Aborting!
When i try to zephir build
the ext/configure.js
opening in visual studio...
is a video for Zephir Windows Installing and Building ?
I've just been shaving the yak here trying to get Zephir working on windows.
I went ahead and follow this guide. However, I ran into a few snags
https://github.com/phalcon/zephir/blob/master/WINDOWS.md
Then came the build errors and I saw PHP 5 extensions referenced, when I had setup PHP 7 sdk and devpack. So i've edited
zephir\parser\parser\build_win32.bat
and switched:to
Of course these files are generated on the fly so if it was to configure the parser again then that file would revert. BTW There was an issue opened on this and then closed: #1366
And while I did finally get
php_zephir_parser.dll
, it was in the wrong path. So I found a Japanese blog entry about a simular issue with Windows x64, and pointed tozephir\Library\Compiler.php
, and after line 250,$buildType
needed to be prefixed with 'x64/'. The if statement in the blog didn't work, so I just hard coded in the prefix:And that seemed to work! I could now run:
php -dextension=ext\x64\Release_TS\php_utils.dll -r "echo Utils\Greeting::say(), "\n";"
The overall issues
zephir\parser\parser\build_win32.bat
was using php5zephir\Library\Compiler.php
I don't think that's an appropriate solution, the problem is in the build process, it should copy the dll to the correct folder.The text was updated successfully, but these errors were encountered: