Re: Compile Problem on Visual Studio 2010

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 22 October 2010 18:52, Steven Scott <chowarmaan@xxxxxxxxx> wrote:
> On Fri, Oct 22, 2010 at 12:26 PM, Richard Quadling <rquadling@xxxxxxxxx> wrote:
>> On 22 October 2010 17:21, Steven Scott <chowarmaan@xxxxxxxxx> wrote:
>>> On Fri, Oct 22, 2010 at 12:16 PM, Richard Quadling <rquadling@xxxxxxxxx> wrote:
>>>> On 22 October 2010 17:07, Steven Scott <chowarmaan@xxxxxxxxx> wrote:
>>>>> On Fri, Oct 22, 2010 at 11:17 AM, Pierre Joye <pierre.php@xxxxxxxxx> 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 ... Â<in default path>
>>>>> 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 = 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 = 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 ... Â<in default path>
> 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 = false, place = false, file, env;

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

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

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

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

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

	if (found && place == true) {
		STDOUT.WriteLine(" <in default path>");
	} else if (found) {
		STDOUT.WriteLine(" " + place);
	} else {
		STDOUT.WriteLine(" <not found>");
	}
	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
 <in default path>
cl.exe
15.00.30729.01
  Detected compiler MSVC9 (Visual C++ 2008)
  Detected 32-bit compiler



-- 
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




[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Database Programming]     [PHP Install]     [Kernel Newbies]     [Yosemite Forum]     [PHP Books]

  Powered by Linux