Compiling xdebug with PHP 5.4

Need help installing PHP, configuring a script, or configuring a server? Then come on in and post your questions! We'll try to help the best we can!

Moderator: General Moderators

Compiling xdebug with PHP 5.4

Postby uniflare » Sun Feb 26, 2012 8:39 pm

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 :P.

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
Code: Select all
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)"
Code: Select all
      ldflags = "";
      if (PHP_PGI == "yes" || PHP_PGO != "no") {
         ldflags = " /PGD:$(PGOPGD_DIR)\\" + dllname.substring(0, dllname.indexOf(".")) + ".pgd";
      }


running configure (alone)

console
Code: Select all
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()"
Code: Select all
   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 :P) if you think it might be in there.

Phew, if you made it this far maybe you have an idea? :P
Thanks
Attachments
log.l.txt.zip
Complete Build Log
(7.36 KiB) Downloaded 69 times
uniflare
Forum Newbie
 
Posts: 2
Joined: Sun Feb 26, 2012 8:34 pm

Re: Compiling xdebug with PHP 5.4

Postby uniflare » Thu Mar 01, 2012 8:47 pm

I thought I would share the fact that I finally compiled it!

Basically you compile as a PECL extension (duh) - Not the way xdebug documentation suggests.

I now have apache 2.4.1/PHP5.4.0 and Xdebug (2.2) running with netbeans perfectly (ok 1 problem..).

Only problem I think is from xdebug: Max Execution Time is exceeded when debugging, just set max_execution_time in php.ini to 0 or a higher number (not sure if the web service you use will timeout also, most have 300 sec limits).
uniflare
Forum Newbie
 
Posts: 2
Joined: Sun Feb 26, 2012 8:34 pm


Return to Installation and Configuration

Who is online

Users browsing this forum: No registered users and 1 guest