Hi thanks for taking a look 🙂.
Summary
I have a problem trying to compile a PHP extension called xdebug (2.2dev) with PHP 5.4 RC8.
Need help tracking down the problem 😛.
Detailed Description
I have downloaded PHP 5.4 RC8 Source Files from http://windows.php.net/qa/
Completed steps in order located here: https://wiki.php.net/internals/windows/stepbystepbuild
EXCEPT I used visual studio 2010 and windows sdk 7.0 (~7.1) and used php5.4rc8 ofc.
step 16 I simply used configure command alone.
then ran nmake and all went well.
I proceeded to extract xdebug to c:\xdebug
Then I ran phpize from the xdebug directory. (all of these commands are still in the xp release shell from sdk7.0 used to compile php).
Then I try to run configure --with-xdebug. It fails as does configure alone with Javascript runtime errors on the configure.js itself.
Running configure --with-xdebug
console
C:\xdebug>configure --with-xdebug
Saving configure options to config.nice.bat
Checking for cl.exe ... <in default path>
Detected compiler MSVC9 (Visual C++ 2008)
Detected 32-bit compiler
Checking for link.exe ... C:\Program Files\Microsoft Visual Studio 9.0\VC\Bin
Checking for nmake.exe ... <in default path>
Checking for lib.exe ... <in default path>
Checking for bison.exe ... <in default path>
Checking for re2c.exe ... <in default path>
Detected re2c version 0.13.5
Checking for zip.exe ... <in default path>
Checking for lemon.exe ... <not found>
Checking for mc.exe ... C:\Program Files\Microsoft SDKs\Windows\v7.0\Bin
Checking for mt.exe ... C:\Program Files\Microsoft SDKs\Windows\v7.0\Bin
Build dir: Release_TS
PHP Core: php5ts.dll and php5ts.lib
Enabling extension C:\xdebug [shared]
C:\xdebug\configure.js(1254, 3) Microsoft JScript runtime error: 'PHP_PGI' is undefined
Related code in configure.js "function EXTENSION(extname, file_list, shared, cflags, dllname, obj_dir)"
ldflags = "";
if (PHP_PGI == "yes" || PHP_PGO != "no") {
ldflags = " /PGD:$(PGOPGD_DIR)\\" + dllname.substring(0, dllname.indexOf(".")) + ".pgd";
}
running configure (alone)
console
C:\xdebug>configure
Saving configure options to config.nice.bat
Checking for cl.exe ... <in default path>
Detected compiler MSVC9 (Visual C++ 2008)
Detected 32-bit compiler
Checking for link.exe ... C:\Program Files\Microsoft Visual Studio 9.0\VC\Bin
Checking for nmake.exe ... <in default path>
Checking for lib.exe ... <in default path>
Checking for bison.exe ... <in default path>
Checking for re2c.exe ... <in default path>
Detected re2c version 0.13.5
Checking for zip.exe ... <in default path>
Checking for lemon.exe ... <not found>
Checking for mc.exe ... C:\Program Files\Microsoft SDKs\Windows\v7.0\Bin
Checking for mt.exe ... C:\Program Files\Microsoft SDKs\Windows\v7.0\Bin
Build dir: Release_TS
PHP Core: php5ts.dll and php5ts.lib
Creating build dirs...
Generating files...
Generating Makefile
C:\xdebug\configure.js(1773, 2) Microsoft JScript runtime error: Input past end of file
Related Code in configure.js "function generate_makefile()"
TF = FSO.OpenTextFile("Makefile.objects", 1);
MF.Write(TF.ReadAll());
Examination
There is a configure.js (I'm sure you know) that you use to compile PHP (which worked). Using notepad++ I used a "Compare" plugin - very handy.
It showed only a few modifications/differences between the seemingly working "PHP" version, and the seemingly broken "xdebug" version. These differences are unrelated to these errors and should have no effect on them.
This leads me to believe that the functions that fail (noted above) in configure.js are pointing to a problem with some configuration issue. Either with phpize/xdebug or the windows sdk 7.0.
Does anyone know what might cause this? Or how to fix it/debug it?
I've attached my entire shell log from start to error (finish 😛) if you think it might be in there.
Phew, if you made it this far maybe you have an idea? 😛
Thanks