Compile Problem on Visual Studio 2010

Compile Problem on Visual Studio 2010

am 22.10.2010 14:58:05 von Steven Scott

Not sure if this is the right list for this question, but I have not
found a better one on the PHP site to reference.

I am unable to build PHP 5.3.3 on Windows using Visual Studio 2010. I
have been able to build previous versions, but the new buildconf.bat
file works, but when I run the configure.bat file, I get an error that
the cl.exe is not found. This happens on 64bit and 32bit machines.
The CL.exe is in

I have followed the build steps from:
http://wiki.php.net/internals/windows/stepbystepbuild

I created a folder C:\PHP5
I unpacked the binary-tools into this directory and ran the phpsdk_setvars.bat
I then ran the phpsdk_buildtree.bat C:\PHP5\source
I then unpacked PHP 5.3.3 source into the C:\PHP5\source

buildconf runs without error.
configure returns:
Saving configure options to config.nice.bat
Checking for cl.exe ...
ERROR: MS C++ compiler is required

C:\>dir \cl.exe /s/b
C:\Program Files\Microsoft Visual Studio 10.0\VC\bin\cl.exe
C:\Program Files\Microsoft Visual Studio 10.0\VC\bin\amd64\cl.exe
C:\Program Files\Microsoft Visual Studio 10.0\VC\bin\x86_amd64\cl.exe

Any help would be appreciated

--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

RE: Compile Problem on Visual Studio 2010

am 22.10.2010 16:33:58 von Tommy Pham

> -----Original Message-----
> From: Steven Scott [mailto:chowarmaan@gmail.com]
> Sent: Friday, October 22, 2010 5:58 AM
> To: php-windows@lists.php.net
> Subject: [PHP-WIN] Compile Problem on Visual Studio 2010
>
> Not sure if this is the right list for this question, but I have not found
a
> better one on the PHP site to reference.
>
> I am unable to build PHP 5.3.3 on Windows using Visual Studio 2010. I
have
> been able to build previous versions, but the new buildconf.bat file
works,
> but when I run the configure.bat file, I get an error that the cl.exe is
not
> found. This happens on 64bit and 32bit machines.
> The CL.exe is in
>
> I have followed the build steps from:
> http://wiki.php.net/internals/windows/stepbystepbuild
>
> I created a folder C:\PHP5
> I unpacked the binary-tools into this directory and ran the
> phpsdk_setvars.bat I then ran the phpsdk_buildtree.bat C:\PHP5\source I
> then unpacked PHP 5.3.3 source into the C:\PHP5\source
>
> buildconf runs without error.
> configure returns:
> Saving configure options to config.nice.bat Checking for cl.exe ... > found>
> ERROR: MS C++ compiler is required
>
> C:\>dir \cl.exe /s/b
> C:\Program Files\Microsoft Visual Studio 10.0\VC\bin\cl.exe C:\Program
> Files\Microsoft Visual Studio 10.0\VC\bin\amd64\cl.exe C:\Program
> Files\Microsoft Visual Studio 10.0\VC\bin\x86_amd64\cl.exe
>
> Any help would be appreciated
>

dir, to see where the file is, is not the same as the cl.exe is in the path.
Now that you know where cl.exe are. Type `path` w/o the quote to see if one
the directory is in the path. If not, you didn't set the environment needed
for VS.

Regards,
Tommy


--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: Compile Problem on Visual Studio 2010

am 22.10.2010 16:40:06 von Steven Scott

On Fri, Oct 22, 2010 at 10:33 AM, Tommy Pham wrote:
>> -----Original Message-----
>> From: Steven Scott [mailto:chowarmaan@gmail.com]
>> Sent: Friday, October 22, 2010 5:58 AM
>> To: php-windows@lists.php.net
>> Subject: [PHP-WIN] Compile Problem on Visual Studio 2010
>>
>> Not sure if this is the right list for this question, but I have not fou=
nd
> a
>> better one on the PHP site to reference.
>>
>> I am unable to build PHP 5.3.3 on Windows using Visual Studio 2010. =A0I
> have
>> been able to build previous versions, but the new buildconf.bat file
> works,
>> but when I run the configure.bat file, I get an error that the cl.exe is
> not
>> found. =A0This happens on 64bit and 32bit machines.
>> The CL.exe is in
>>
>> I have followed the build steps from:
>> http://wiki.php.net/internals/windows/stepbystepbuild
>>
>> I created a folder C:\PHP5
>> I unpacked the binary-tools into this directory and ran the
>> phpsdk_setvars.bat I then ran the phpsdk_buildtree.bat C:\PHP5\source I
>> then unpacked PHP 5.3.3 source into the C:\PHP5\source
>>
>> buildconf runs without error.
>> configure returns:
>> Saving configure options to config.nice.bat Checking for cl.exe ... =A0<=
not
>> found>
>> ERROR: MS C++ compiler is required
>>
>> C:\>dir \cl.exe /s/b
>> C:\Program Files\Microsoft Visual Studio 10.0\VC\bin\cl.exe C:\Program
>> Files\Microsoft Visual Studio 10.0\VC\bin\amd64\cl.exe C:\Program
>> Files\Microsoft Visual Studio 10.0\VC\bin\x86_amd64\cl.exe
>>
>> Any help would be appreciated
>>
>
> dir, to see where the file is, is not the same as the cl.exe is in the pa=
th.
> Now that you know where cl.exe are. =A0Type `path` w/o the quote to see i=
f one
> the directory is in the path. =A0If not, you didn't set the environment n=
eeded
> for VS.
>
> Regards,
> Tommy
>
>

Sorry, I have passed that step by changing the user environment
settings to include the path to the CL.exe. I thought it might have
been looking for it on the drive.

I am now getting a
C:\php5\source\configure.js(2508, 1) Microsoft JScript runtime error:
Object doesn't support this property or method

I am trying to update the Windows SDK to see if that will bring a new
JScript runtime to get passed the error.

--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: Compile Problem on Visual Studio 2010

am 22.10.2010 17:17:12 von Pierre Joye

hi,

Follow these instructions:

http://wiki.php.net/internals/windows/stepbystepbuild

Cheers,

On Fri, Oct 22, 2010 at 2:58 PM, Steven Scott wrote:
> Not sure if this is the right list for this question, but I have not
> found a better one on the PHP site to reference.
>
> I am unable to build PHP 5.3.3 on Windows using Visual Studio 2010. =A0I
> have been able to build previous versions, but the new buildconf.bat
> file works, but when I run the configure.bat file, I get an error that
> the cl.exe is not found. =A0This happens on 64bit and 32bit machines.
> The CL.exe is in
>
> I have followed the build steps from:
> http://wiki.php.net/internals/windows/stepbystepbuild
>
> I created a folder C:\PHP5
> I unpacked the binary-tools into this directory and ran the phpsdk_setvar=
s.bat
> I then ran the phpsdk_buildtree.bat C:\PHP5\source
> I then unpacked PHP 5.3.3 source into the C:\PHP5\source
>
> buildconf runs without error.
> configure returns:
> Saving configure options to config.nice.bat
> Checking for cl.exe ... =A0
> ERROR: MS C++ compiler is required
>
> C:\>dir \cl.exe /s/b
> C:\Program Files\Microsoft Visual Studio 10.0\VC\bin\cl.exe
> C:\Program Files\Microsoft Visual Studio 10.0\VC\bin\amd64\cl.exe
> C:\Program Files\Microsoft Visual Studio 10.0\VC\bin\x86_amd64\cl.exe
>
> Any help would be appreciated
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>



--=20
Pierre

@pierrejoye | http://blog.thepimp.net | http://www.libgd.org

--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: Compile Problem on Visual Studio 2010

am 22.10.2010 18:07:16 von Steven Scott

On Fri, Oct 22, 2010 at 11:17 AM, Pierre Joye wrote:
> hi,
>
> Follow these instructions:
>
> http://wiki.php.net/internals/windows/stepbystepbuild
>
> Cheers,
>
> On Fri, Oct 22, 2010 at 2:58 PM, Steven Scott wrot=
e:
>> Not sure if this is the right list for this question, but I have not
>> found a better one on the PHP site to reference.
>>
>> I am unable to build PHP 5.3.3 on Windows using Visual Studio 2010. =A0I
>> have been able to build previous versions, but the new buildconf.bat
>> file works, but when I run the configure.bat file, I get an error that
>> the cl.exe is not found. =A0This happens on 64bit and 32bit machines.
>> The CL.exe is in
>>
>> I have followed the build steps from:
>> http://wiki.php.net/internals/windows/stepbystepbuild
>>
>> I created a folder C:\PHP5
>> I unpacked the binary-tools into this directory and ran the phpsdk_setva=
rs.bat
>> I then ran the phpsdk_buildtree.bat C:\PHP5\source
>> I then unpacked PHP 5.3.3 source into the C:\PHP5\source
>>
>> buildconf runs without error.
>> configure returns:
>> Saving configure options to config.nice.bat
>> Checking for cl.exe ... =A0
>> ERROR: MS C++ compiler is required
>>
>> C:\>dir \cl.exe /s/b
>> C:\Program Files\Microsoft Visual Studio 10.0\VC\bin\cl.exe
>> C:\Program Files\Microsoft Visual Studio 10.0\VC\bin\amd64\cl.exe
>> C:\Program Files\Microsoft Visual Studio 10.0\VC\bin\x86_amd64\cl.exe
>>
>> Any help would be appreciated
>>
>> --
>> PHP Windows Mailing List (http://www.php.net/)
>> To unsubscribe, visit: http://www.php.net/unsub.php
>>
>>
>
>
>
> --
> Pierre
>
> @pierrejoye | http://blog.thepimp.net | http://www.libgd.org
>

Those are the instructions I am following. When I get to run the
configure command:
configure --enable-calendar --enable-cgi --with-gettext

I get an error:
Saving configure options to config.nice.bat
Checking for cl.exe ...
C:\php5\source\configure.js(2508, 1) Microsoft JScript runtime error:
Object doesn't support this property or method

--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: Compile Problem on Visual Studio 2010

am 22.10.2010 18:16:34 von Richard Quadling

On 22 October 2010 17:07, Steven Scott wrote:
> On Fri, Oct 22, 2010 at 11:17 AM, Pierre Joye wrot=
e:
>> hi,
>>
>> Follow these instructions:
>>
>> http://wiki.php.net/internals/windows/stepbystepbuild
>>
> Those are the instructions I am following. When I get to run the
> configure command:
> configure --enable-calendar --enable-cgi --with-gettext
>
> I get an error:
> Saving configure options to config.nice.bat
> Checking for cl.exe ...  
> C:\php5\source\configure.js(2508, 1) Microsoft JScript runtime error:
> Object doesn't support this property or method

Hello Steven,

Can you show the configure.js file around those lines. The actual
content is created dynamically in response to your system.

You line 2508 won't be the same as my line 2508.

Richard.

--=20
Richard Quadling
Twitter : EE : Zend
@RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY

--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: Compile Problem on Visual Studio 2010

am 22.10.2010 18:21:26 von Steven Scott

On Fri, Oct 22, 2010 at 12:16 PM, Richard Quadling wr=
ote:
> On 22 October 2010 17:07, Steven Scott wrote:
>> On Fri, Oct 22, 2010 at 11:17 AM, Pierre Joye wro=
te:
>>> hi,
>>>
>>> Follow these instructions:
>>>
>>> http://wiki.php.net/internals/windows/stepbystepbuild
>>>
>> Those are the instructions I am following. When I get to run the
>> configure command:
>> configure --enable-calendar --enable-cgi --with-gettext
>>
>> I get an error:
>> Saving configure options to config.nice.bat
>> Checking for cl.exe ... =A0
>> C:\php5\source\configure.js(2508, 1) Microsoft JScript runtime error:
>> Object doesn't support this property or method
>
> Hello Steven,
>
> Can you show the configure.js file around those lines. The actual
> content is created dynamically in response to your system.
>
> You line 2508 won't be the same as my line 2508.
>
> Richard.
>
> --
> Richard Quadling
> Twitter : EE : Zend
> @RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY
>
Line 2500
/* For the record here: */
// 1200 is VC6
// 1300 is vs.net 2002
// 1310 is vs.net 2003
// 1400 is vs.net 2005
// 1500 is vs.net 2008
// 1600 is vs.net 2010
// Which version of the compiler do we have?
VCVERS =3D probe_binary(CL).substr(0, 5).replace('.', '');
STDOUT.WriteLine(" =A0Detected compiler " + VC_VERSIONS[VCVERS]);
AC_DEFINE('COMPILER', VC_VERSIONS[VCVERS], "Detected compiler version");
DEFINE("PHP_COMPILER_SHORT", VC_VERSIONS_SHORT[VCVERS]);
AC_DEFINE('PHP_COMPILER_ID', VC_VERSIONS_SHORT[VCVERS], "Compiler
compatibility ID");

// do we use x64 or 80x86 version of compiler?
X64 =3D probe_binary(CL, 64);
if (X64) {
STDOUT.WriteLine(" =A0Detected 64-bit compiler");
} else {
STDOUT.WriteLine(" =A0Detected 32-bit compiler");
}

--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: Compile Problem on Visual Studio 2010

am 22.10.2010 18:26:18 von Richard Quadling

On 22 October 2010 17:21, Steven Scott wrote:
> On Fri, Oct 22, 2010 at 12:16 PM, Richard Quadling =
wrote:
>> On 22 October 2010 17:07, Steven Scott wrote:
>>> On Fri, Oct 22, 2010 at 11:17 AM, Pierre Joye wr=
ote:
>>>> hi,
>>>>
>>>> Follow these instructions:
>>>>
>>>> http://wiki.php.net/internals/windows/stepbystepbuild
>>>>
>>> Those are the instructions I am following. When I get to run the
>>> configure command:
>>> configure --enable-calendar --enable-cgi --with-gettext
>>>
>>> I get an error:
>>> Saving configure options to config.nice.bat
>>> Checking for cl.exe ...  
>>> C:\php5\source\configure.js(2508, 1) Microsoft JScript runtime error:
>>> Object doesn't support this property or method
>>
>> Hello Steven,
>>
>> Can you show the configure.js file around those lines. The actual
>> content is created dynamically in response to your system.
>>
>> You line 2508 won't be the same as my line 2508.
>>
>> Richard.
>>
>> --
>> Richard Quadling
>> Twitter : EE : Zend
>> @RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY
>>
> Line 2500
> /* For the record here: */
> // 1200 is VC6
> // 1300 is vs.net 2002
> // 1310 is vs.net 2003
> // 1400 is vs.net 2005
> // 1500 is vs.net 2008
> // 1600 is vs.net 2010
> // Which version of the compiler do we have?
> VCVERS =3D probe_binary(CL).substr(0, 5).replace('.', '');
> STDOUT.WriteLine("  Detected compiler " + VC_VERSIONS[VCVERS]);
> AC_DEFINE('COMPILER', VC_VERSIONS[VCVERS], "Detected compiler version");
> DEFINE("PHP_COMPILER_SHORT", VC_VERSIONS_SHORT[VCVERS]);
> AC_DEFINE('PHP_COMPILER_ID', VC_VERSIONS_SHORT[VCVERS], "Compiler
> compatibility ID");
>
> // do we use x64 or 80x86 version of compiler?
> X64 =3D probe_binary(CL, 64);
> if (X64) {
> STDOUT.WriteLine("  Detected 64-bit compiler");
> } else {
> STDOUT.WriteLine("  Detected 32-bit compiler");
> }
>

Thanks for that.

Just after the line ...

// Which version of the compiler do we have?

can you add ...

STDOUT.WriteLine(PHP_CL);
STDOUT.WriteLine(probe_binary(PHP_CL));

and then run config.nice

What do you get before the error?

--=20
Richard Quadling
Twitter : EE : Zend
@RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY

--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: Compile Problem on Visual Studio 2010

am 22.10.2010 18:35:41 von Richard Quadling

On 22 October 2010 17:26, Richard Quadling wrote:
> On 22 October 2010 17:21, Steven Scott wrote:
>> On Fri, Oct 22, 2010 at 12:16 PM, Richard Quadling =
wrote:
>>> On 22 October 2010 17:07, Steven Scott wrote:
>>>> On Fri, Oct 22, 2010 at 11:17 AM, Pierre Joye w=
rote:
>>>>> hi,
>>>>>
>>>>> Follow these instructions:
>>>>>
>>>>> http://wiki.php.net/internals/windows/stepbystepbuild
>>>>>
>>>> Those are the instructions I am following. When I get to run the
>>>> configure command:
>>>> configure --enable-calendar --enable-cgi --with-gettext
>>>>
>>>> I get an error:
>>>> Saving configure options to config.nice.bat
>>>> Checking for cl.exe ...  
>>>> C:\php5\source\configure.js(2508, 1) Microsoft JScript runtime error:
>>>> Object doesn't support this property or method
>>>
>>> Hello Steven,
>>>
>>> Can you show the configure.js file around those lines. The actual
>>> content is created dynamically in response to your system.
>>>
>>> You line 2508 won't be the same as my line 2508.
>>>
>>> Richard.
>>>
>>> --
>>> Richard Quadling
>>> Twitter : EE : Zend
>>> @RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY
>>>
>> Line 2500
>> /* For the record here: */
>> // 1200 is VC6
>> // 1300 is vs.net 2002
>> // 1310 is vs.net 2003
>> // 1400 is vs.net 2005
>> // 1500 is vs.net 2008
>> // 1600 is vs.net 2010
>> // Which version of the compiler do we have?
>> VCVERS =3D probe_binary(CL).substr(0, 5).replace('.', '');
>> STDOUT.WriteLine("  Detected compiler " + VC_VERSIONS[VCVERS]);
>> AC_DEFINE('COMPILER', VC_VERSIONS[VCVERS], "Detected compiler version");
>> DEFINE("PHP_COMPILER_SHORT", VC_VERSIONS_SHORT[VCVERS]);
>> AC_DEFINE('PHP_COMPILER_ID', VC_VERSIONS_SHORT[VCVERS], "Compiler
>> compatibility ID");
>>
>> // do we use x64 or 80x86 version of compiler?
>> X64 =3D probe_binary(CL, 64);
>> if (X64) {
>> STDOUT.WriteLine("  Detected 64-bit compiler");
>> } else {
>> STDOUT.WriteLine("  Detected 32-bit compiler");
>> }
>>
>
> Thanks for that.
>
> Just after the line ...
>
> // Which version of the compiler do we have?
>
> can you add ...
>
> STDOUT.WriteLine(PHP_CL);
> STDOUT.WriteLine(probe_binary(PHP_CL));
>
> and then run config.nice
>
> What do you get before the error?

I'm guessing you are getting 0 which is numeric and cannot have a
substr() method.

So, back into configure.js and look for the probe_binary function
(near the top, line 126 for me).

In there, look for ...

if (version.match(/(\d+\.\d+(\.\d+)?(\.\d+)?)/)) {
return RegExp.$1;
}

Before that line, can you add ...

STDOUT.WriteLine("Version found : " + version);


Rerun config.nice and what is the version?

--=20
Richard Quadling
Twitter : EE : Zend
@RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY

--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: Compile Problem on Visual Studio 2010

am 22.10.2010 19:52:35 von Steven Scott

On Fri, Oct 22, 2010 at 12:26 PM, Richard Quadling wr=
ote:
> On 22 October 2010 17:21, Steven Scott wrote:
>> On Fri, Oct 22, 2010 at 12:16 PM, Richard Quadling =
wrote:
>>> On 22 October 2010 17:07, Steven Scott wrote:
>>>> On Fri, Oct 22, 2010 at 11:17 AM, Pierre Joye w=
rote:
>>>>> hi,
>>>>>
>>>>> Follow these instructions:
>>>>>
>>>>> http://wiki.php.net/internals/windows/stepbystepbuild
>>>>>
>>>> Those are the instructions I am following. When I get to run the
>>>> configure command:
>>>> configure --enable-calendar --enable-cgi --with-gettext
>>>>
>>>> I get an error:
>>>> Saving configure options to config.nice.bat
>>>> Checking for cl.exe ... =A0
>>>> C:\php5\source\configure.js(2508, 1) Microsoft JScript runtime error:
>>>> Object doesn't support this property or method
>>>
>>> Hello Steven,
>>>
>>> Can you show the configure.js file around those lines. The actual
>>> content is created dynamically in response to your system.
>>>
>>> You line 2508 won't be the same as my line 2508.
>>>
>>> Richard.
>>>
>>> --
>>> Richard Quadling
>>> Twitter : EE : Zend
>>> @RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY
>>>
>> Line 2500
>> /* For the record here: */
>> // 1200 is VC6
>> // 1300 is vs.net 2002
>> // 1310 is vs.net 2003
>> // 1400 is vs.net 2005
>> // 1500 is vs.net 2008
>> // 1600 is vs.net 2010
>> // Which version of the compiler do we have?
>> VCVERS =3D probe_binary(CL).substr(0, 5).replace('.', '');
>> STDOUT.WriteLine(" =A0Detected compiler " + VC_VERSIONS[VCVERS]);
>> AC_DEFINE('COMPILER', VC_VERSIONS[VCVERS], "Detected compiler version");
>> DEFINE("PHP_COMPILER_SHORT", VC_VERSIONS_SHORT[VCVERS]);
>> AC_DEFINE('PHP_COMPILER_ID', VC_VERSIONS_SHORT[VCVERS], "Compiler
>> compatibility ID");
>>
>> // do we use x64 or 80x86 version of compiler?
>> X64 =3D probe_binary(CL, 64);
>> if (X64) {
>> STDOUT.WriteLine(" =A0Detected 64-bit compiler");
>> } else {
>> STDOUT.WriteLine(" =A0Detected 32-bit compiler");
>> }
>>
>
> Thanks for that.
>
> Just after the line ...
>
> // Which version of the compiler do we have?
>
> can you add ...
>
> STDOUT.WriteLine(PHP_CL);
> STDOUT.WriteLine(probe_binary(PHP_CL));
>

> and then run config.nice
>
> What do you get before the error?
>
> --
> Richard Quadling
> Twitter : EE : Zend
> @RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY
>

I am running Visual Studio 2010, but the changes show:

>cscript /nologo configure.js "--enable-calendar" "--enable-cgi" "--with-g=
ettext"
Saving configure options to config.nice.bat
Checking for cl.exe ...
C:\php5\source\configure.js(2508, 1) Microsoft JScript runtime error:
'PHP_CL' is undefined

--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: Compile Problem on Visual Studio 2010

am 22.10.2010 20:15:49 von Richard Quadling

On 22 October 2010 18:52, Steven Scott wrote:
> On Fri, Oct 22, 2010 at 12:26 PM, Richard Quadling =
wrote:
>> On 22 October 2010 17:21, Steven Scott wrote:
>>> On Fri, Oct 22, 2010 at 12:16 PM, Richard Quadling > wrote:
>>>> On 22 October 2010 17:07, Steven Scott wrote:
>>>>> On Fri, Oct 22, 2010 at 11:17 AM, Pierre Joye =
wrote:
>>>>>> hi,
>>>>>>
>>>>>> Follow these instructions:
>>>>>>
>>>>>> http://wiki.php.net/internals/windows/stepbystepbuild
>>>>>>
>>>>> Those are the instructions I am following. When I get to run the
>>>>> configure command:
>>>>> configure --enable-calendar --enable-cgi --with-gettext
>>>>>
>>>>> I get an error:
>>>>> Saving configure options to config.nice.bat
>>>>> Checking for cl.exe ...  
>>>>> C:\php5\source\configure.js(2508, 1) Microsoft JScript runtime error:
>>>>> Object doesn't support this property or method
>>>>
>>>> Hello Steven,
>>>>
>>>> Can you show the configure.js file around those lines. The actual
>>>> content is created dynamically in response to your system.
>>>>
>>>> You line 2508 won't be the same as my line 2508.
>>>>
>>>> Richard.
>>>>
>>>> --
>>>> Richard Quadling
>>>> Twitter : EE : Zend
>>>> @RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY
>>>>
>>> Line 2500
>>> /* For the record here: */
>>> // 1200 is VC6
>>> // 1300 is vs.net 2002
>>> // 1310 is vs.net 2003
>>> // 1400 is vs.net 2005
>>> // 1500 is vs.net 2008
>>> // 1600 is vs.net 2010
>>> // Which version of the compiler do we have?
>>> VCVERS =3D probe_binary(CL).substr(0, 5).replace('.', '');
>>> STDOUT.WriteLine("  Detected compiler " + VC_VERSIONS[VCVERS]);
>>> AC_DEFINE('COMPILER', VC_VERSIONS[VCVERS], "Detected compiler version")=
;
>>> DEFINE("PHP_COMPILER_SHORT", VC_VERSIONS_SHORT[VCVERS]);
>>> AC_DEFINE('PHP_COMPILER_ID', VC_VERSIONS_SHORT[VCVERS], "Compiler
>>> compatibility ID");
>>>
>>> // do we use x64 or 80x86 version of compiler?
>>> X64 =3D probe_binary(CL, 64);
>>> if (X64) {
>>> STDOUT.WriteLine("  Detected 64-bit compiler");
>>> } else {
>>> STDOUT.WriteLine("  Detected 32-bit compiler");
>>> }
>>>
>>
>> Thanks for that.
>>
>> Just after the line ...
>>
>> // Which version of the compiler do we have?
>>
>> can you add ...
>>
>> STDOUT.WriteLine(PHP_CL);
>> STDOUT.WriteLine(probe_binary(PHP_CL));
>>
>
>> and then run config.nice
>>
>> What do you get before the error?
>>
>> --
>> Richard Quadling
>> Twitter : EE : Zend
>> @RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY
>>
>
> I am running Visual Studio 2010, but the changes show:
>
>>cscript /nologo configure.js  "--enable-calendar" "--enable-cgi" "--=
with-gettext"
> Saving configure options to config.nice.bat
> Checking for cl.exe ...  
> C:\php5\source\configure.js(2508, 1) Microsoft JScript runtime error:
> 'PHP_CL' is undefined
>

Wasn't expecting that!

When you load up the shell for PHP compilation, what are you targetting?

I get ...

Setting SDK environment relative to C:\Program Files\Microsoft
SDKs\Windows\v6.1.
Targeting Windows XP x86 RELEASE

I have a batch file which is ...

@ECHO OFF
CALL "C:\Program Files\Microsoft SDKs\Windows\v6.1\Bin\SetEnv.Cmd"
CALL setenv /x86 /xp /release
CD /D C:\php-sdk
CALL bin\phpsdk_setvars.bat
CD /D C:\php-sdk\php_53dev\vc9\x86\PHP_5_3

I'm wondering if you are running same CALLs as this.

I've got more debugging.

The search_paths() function in configure.js ...

function search_paths(thing_to_find, explicit_path, env_name)
{
var i, found =3D false, place =3D false, file, env;

STDOUT.Write("Checking for " + thing_to_find + " ... ");

thing_to_find =3D thing_to_find.replace(new RegExp("/", "g"), "\\");

if (explicit_path !=3D null) {
if (typeof(explicit_path) == "string") {
explicit_path =3D explicit_path.split(";");
}

for (i =3D 0; i < explicit_path.length; i++) {
STDOUT.WriteLine("Looking ... " + explicit_path[i] + "\\" + thing_to_fin=
d);
file =3D glob(explicit_path[i] + "\\" + thing_to_find);
if (file) {
found =3D true;
place =3D file[0];
place =3D place.substr(0, place.length - thing_to_find.length - 1);
break;
}
}
}

if (!found && env_name !=3D null) {
env =3D WshShell.Environment("Process").Item(env_name);
env =3D env.split(";");
for (i =3D 0; i < env.length; i++) {
STDOUT.WriteLine("Looking ... " + env[i] + "\\" + thing_to_find);
file =3D glob(env[i] + "\\" + thing_to_find);
if (file) {
found =3D true;
place =3D true;
break;
}
}
}

if (found && place == true) {
STDOUT.WriteLine(" ");
} else if (found) {
STDOUT.WriteLine(" " + place);
} else {
STDOUT.WriteLine(" ");
}
return place;
}



This will allow you to see exactly where configure.js is looking and
looking for what.

I get ...

Checking for cl.exe ... Looking ... \cygwin\bin\cl.exe
Looking ... \cygwin\usr\local\bin\cl.exe
Looking ... no\bin\cl.exe
Looking ... C:\Program Files\Microsoft Visual Studio 9.0\VC\Bin\cl.exe

cl.exe
15.00.30729.01
Detected compiler MSVC9 (Visual C++ 2008)
Detected 32-bit compiler



--=20
Richard Quadling
Twitter : EE : Zend
@RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY

--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: Compile Problem on Visual Studio 2010

am 22.10.2010 21:15:00 von Pierre Joye

On Fri, Oct 22, 2010 at 7:52 PM, Steven Scott wrote:

> I am running Visual Studio 2010, but the changes show:

VC10 works just fine here (many boxes). What do you use? Visual studio
console or the SDK (7.x includes VC10)? Both work well, but you may
have messed up your setup (or SDK install broke the paths, early
versions did that).


Cheers,
--
Pierre

@pierrejoye | http://blog.thepimp.net | http://www.libgd.org

--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: Compile Problem on Visual Studio 2010

am 22.10.2010 21:49:43 von Steven Scott

On Fri, Oct 22, 2010 at 3:15 PM, Pierre Joye wrote:
> On Fri, Oct 22, 2010 at 7:52 PM, Steven Scott wrote:
>
>> I am running Visual Studio 2010, but the changes show:
>
> VC10 works just fine here (many boxes). What do you use? Visual studio
> console or the SDK (7.x includes VC10)? Both work well, but you may
> have messed up your setup (or SDK install broke the paths, early
> versions did that).
>
>
> Cheers,
> --
> Pierre
>
> @pierrejoye | http://blog.thepimp.net | http://www.libgd.org
>

It appears that my environment after a Visual Studio 2010 environment
may be the problem. When running the Windows SDK 6.1 shell, I get:
The x86 compilers are not currently installed.
Please go to Add/Remove Programs to update your installation.
..
Setting SDK environment relative to C:\Program Files\Microsoft SDKs\Windows\v6.1
..
Targeting Windows Server 2003 x86 DEBUG

However, the software is installed and in the path. Running CL though
on its own gives me an error about the mspdb100.dll not being found.
I am going to try to repair my Visual Studio 2010 installation now.

--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: Compile Problem on Visual Studio 2010

am 22.10.2010 22:26:16 von Steven Scott

On Fri, Oct 22, 2010 at 3:49 PM, Steven Scott wrote:
> On Fri, Oct 22, 2010 at 3:15 PM, Pierre Joye wrote=
:
>> On Fri, Oct 22, 2010 at 7:52 PM, Steven Scott wro=
te:
>>
>>> I am running Visual Studio 2010, but the changes show:
>>
>> VC10 works just fine here (many boxes). What do you use? Visual studio
>> console or the SDK (7.x includes VC10)? Both work well, but you may
>> have messed up your setup (or SDK install broke the paths, early
>> versions did that).
>>
>>
>> Cheers,
>> --
>> Pierre
>>
>> @pierrejoye | http://blog.thepimp.net | http://www.libgd.org
>>
>
> It appears that my environment after a Visual Studio 2010 environment
> may be the problem. =A0When running the Windows SDK 6.1 shell, I get:
> The x86 compilers are not currently installed.
> Please go to Add/Remove Programs to update your installation.
> .
> Setting SDK environment relative to C:\Program Files\Microsoft SDKs\Windo=
ws\v6.1
> .
> Targeting Windows Server 2003 x86 DEBUG
>
> However, the software is installed and in the path. =A0Running CL though
> on its own gives me an error about the mspdb100.dll not being found.
> I am going to try to repair my Visual Studio 2010 installation now.
>

With the extra debug statements:
cscript /nologo configure.js "--enable-calendar" "--enable-cgi"
"--with-gettext"
Saving configure options to config.nice.bat
Checking for cl.exe ... Looking ... \cygwin\bin\cl.exe
Looking ... \cygwin\usr\local\bin\cl.exe
Looking ... no\bin\cl.exe
Looking ... \cl.exe
Looking ... C:\Program Files\Microsoft Visual Studio 9.0vcpackages\cl.exe
Looking ... C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\cl.exe
Looking ... C:\Program Files\Microsoft SDKs\Windows\v6.1\Bin\cl.exe
Looking ... C:\WINDOWS\Microsoft.NET\Framework\v3.5\cl.exe
Looking ... C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\cl.exe
Looking ... C:\WINDOWS\system32\cl.exe
Looking ... C:\WINDOWS\cl.exe
Looking ... C:\WINDOWS\System32\Wbem\cl.exe
Looking ... c:\Program Files\Microsoft SQL Server\100\Tools\Binn\\cl.exe
Looking ... c:\Program Files\Microsoft SQL Server\100\DTS\Binn\\cl.exe
Looking ... C:\WINDOWS\system32\WindowsPowerShell\v1.0\cl.exe
Looking ... C:\Program Files\Microsoft Visual Studio 10.0\VC\bin\cl.exe

C:\php5\source\configure.js(2510, 1) Microsoft JScript runtime error:
'PHP_CL' is undefined

--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: Compile Problem on Visual Studio 2010

am 25.10.2010 15:16:33 von Steven Scott

On Fri, Oct 22, 2010 at 4:26 PM, Steven Scott wrote:
> On Fri, Oct 22, 2010 at 3:49 PM, Steven Scott wrot=
e:
>> On Fri, Oct 22, 2010 at 3:15 PM, Pierre Joye wrot=
e:
>>> On Fri, Oct 22, 2010 at 7:52 PM, Steven Scott wr=
ote:
>>>
>>>> I am running Visual Studio 2010, but the changes show:
>>>
>>> VC10 works just fine here (many boxes). What do you use? Visual studio
>>> console or the SDK (7.x includes VC10)? Both work well, but you may
>>> have messed up your setup (or SDK install broke the paths, early
>>> versions did that).
>>>
>>>
>>> Cheers,
>>> --
>>> Pierre
>>>
>>> @pierrejoye | http://blog.thepimp.net | http://www.libgd.org
>>>
>>
>> It appears that my environment after a Visual Studio 2010 environment
>> may be the problem. =A0When running the Windows SDK 6.1 shell, I get:
>> The x86 compilers are not currently installed.
>> Please go to Add/Remove Programs to update your installation.
>> .
>> Setting SDK environment relative to C:\Program Files\Microsoft SDKs\Wind=
ows\v6.1
>> .
>> Targeting Windows Server 2003 x86 DEBUG
>>
>> However, the software is installed and in the path. =A0Running CL though
>> on its own gives me an error about the mspdb100.dll not being found.
>> I am going to try to repair my Visual Studio 2010 installation now.
>>
>
> With the extra debug statements:
> cscript /nologo configure.js =A0"--enable-calendar" "--enable-cgi"
> "--with-gettext"
> Saving configure options to config.nice.bat
> Checking for cl.exe ... Looking ... \cygwin\bin\cl.exe
> Looking ... \cygwin\usr\local\bin\cl.exe
> Looking ... no\bin\cl.exe
> Looking ... \cl.exe
> Looking ... C:\Program Files\Microsoft Visual Studio 9.0vcpackages\cl.exe
> Looking ... C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\cl.e=
xe
> Looking ... C:\Program Files\Microsoft SDKs\Windows\v6.1\Bin\cl.exe
> Looking ... C:\WINDOWS\Microsoft.NET\Framework\v3.5\cl.exe
> Looking ... C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\cl.exe
> Looking ... C:\WINDOWS\system32\cl.exe
> Looking ... C:\WINDOWS\cl.exe
> Looking ... C:\WINDOWS\System32\Wbem\cl.exe
> Looking ... c:\Program Files\Microsoft SQL Server\100\Tools\Binn\\cl.exe
> Looking ... c:\Program Files\Microsoft SQL Server\100\DTS\Binn\\cl.exe
> Looking ... C:\WINDOWS\system32\WindowsPowerShell\v1.0\cl.exe
> Looking ... C:\Program Files\Microsoft Visual Studio 10.0\VC\bin\cl.exe
> =A0
> C:\php5\source\configure.js(2510, 1) Microsoft JScript runtime error:
> 'PHP_CL' is undefined
>

Running the start script you have, I get the following:

The x86 compilers are not currently installed.
Please go to Add/Remove Programs to update your installation.
..
Setting SDK environment relative to C:\Program Files\Microsoft SDKs\Windows=
\v6.1
..
Targeting Windows XP x86 RELEASE

I am a little concerned with the first line indicating that the
compilers are not currently installed when they are. My path also
gets corrupted so the original path is lost which means that the
cscript.exe is not located anymore.

My path is corrupted by the
CALL "C:\Program Files\Microsoft SDKs\Windows\v6.1\Bin\SetEnv.Cmd"

Why is the PATH variable referenced with !PATH! instead of %PATH%?

--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: Compile Problem on Visual Studio 2010

am 25.10.2010 16:00:30 von Richard Quadling

On 25 October 2010 14:16, Steven Scott wrote:
> On Fri, Oct 22, 2010 at 4:26 PM, Steven Scott wrot=
e:
>> On Fri, Oct 22, 2010 at 3:49 PM, Steven Scott wro=
te:
>>> On Fri, Oct 22, 2010 at 3:15 PM, Pierre Joye wro=
te:
>>>> On Fri, Oct 22, 2010 at 7:52 PM, Steven Scott w=
rote:
>>>>
>>>>> I am running Visual Studio 2010, but the changes show:
>>>>
>>>> VC10 works just fine here (many boxes). What do you use? Visual studio
>>>> console or the SDK (7.x includes VC10)? Both work well, but you may
>>>> have messed up your setup (or SDK install broke the paths, early
>>>> versions did that).
>>>>
>>>>
>>>> Cheers,
>>>> --
>>>> Pierre
>>>>
>>>> @pierrejoye | http://blog.thepimp.net | http://www.libgd.org
>>>>
>>>
>>> It appears that my environment after a Visual Studio 2010 environment
>>> may be the problem.  When running the Windows SDK 6.1 shell, I get=
:
>>> The x86 compilers are not currently installed.
>>> Please go to Add/Remove Programs to update your installation.
>>> .
>>> Setting SDK environment relative to C:\Program Files\Microsoft SDKs\Win=
dows\v6.1
>>> .
>>> Targeting Windows Server 2003 x86 DEBUG
>>>
>>> However, the software is installed and in the path.  Running CL th=
ough
>>> on its own gives me an error about the mspdb100.dll not being found.
>>> I am going to try to repair my Visual Studio 2010 installation now.
>>>
>>
>> With the extra debug statements:
>> cscript /nologo configure.js  "--enable-calendar" "--enable-cgi"
>> "--with-gettext"
>> Saving configure options to config.nice.bat
>> Checking for cl.exe ... Looking ... \cygwin\bin\cl.exe
>> Looking ... \cygwin\usr\local\bin\cl.exe
>> Looking ... no\bin\cl.exe
>> Looking ... \cl.exe
>> Looking ... C:\Program Files\Microsoft Visual Studio 9.0vcpackages\cl.ex=
e
>> Looking ... C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\cl.=
exe
>> Looking ... C:\Program Files\Microsoft SDKs\Windows\v6.1\Bin\cl.exe
>> Looking ... C:\WINDOWS\Microsoft.NET\Framework\v3.5\cl.exe
>> Looking ... C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\cl.exe
>> Looking ... C:\WINDOWS\system32\cl.exe
>> Looking ... C:\WINDOWS\cl.exe
>> Looking ... C:\WINDOWS\System32\Wbem\cl.exe
>> Looking ... c:\Program Files\Microsoft SQL Server\100\Tools\Binn\\cl.exe
>> Looking ... c:\Program Files\Microsoft SQL Server\100\DTS\Binn\\cl.exe
>> Looking ... C:\WINDOWS\system32\WindowsPowerShell\v1.0\cl.exe
>> Looking ... C:\Program Files\Microsoft Visual Studio 10.0\VC\bin\cl.exe
>>  
>> C:\php5\source\configure.js(2510, 1) Microsoft JScript runtime error:
>> 'PHP_CL' is undefined
>>
>
> Running the start script you have, I get the following:
>
> The x86 compilers are not currently installed.
> Please go to Add/Remove Programs to update your installation.
> .
> Setting SDK environment relative to C:\Program Files\Microsoft SDKs\Windo=
ws\v6.1
> .
> Targeting Windows XP x86 RELEASE
>
> I am a little concerned with the first line indicating that the
> compilers are not currently installed when they are.  My path also
> gets corrupted so the original path is lost which means that the
> cscript.exe is not located anymore.
>
> My path is corrupted by the
> CALL "C:\Program Files\Microsoft SDKs\Windows\v6.1\Bin\SetEnv.Cmd"
>
> Why is the PATH variable referenced with !PATH! instead of %PATH%?
>

%PATH% is expanded at "compiletime" and !PATH! is expanded at "runtime".

So.

@ECHO OFF
SET VAR=3D
FOR %%A IN (add this to the var) DO SET VAR=3D%VAR%;%%A
ECHO %VAR%

is not going to do what you think it will.

Outputs ...

;var




@ECHO OFF
SET VAR=3D
FOR %%A IN (add this to the var) DO SET VAR=3D!VAR!;%%A
ECHO %VAR%

is better.

Outputs ...

;add;this;to;the;var



But you may need to do ...

@ECHO OFF
SETLOCAL ENABLEDELAYEDEXPANSION
SET VAR=3D
FOR %%A IN (add this to the var) DO SET VAR=3D!VAR!;%%A
ECHO %VAR%

Same output, but you may find you have not got delayed expansion
enabled permanently.




--=20
Richard Quadling
Twitter : EE : Zend
@RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY

--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php