Bug #69036 [Opn]: Compilation Fails on windows when building in x64 mode with VC11
Edit report at https://bugs.php.net/bug.php?id=69036&edit=1
ID: 69036
User updated by: apoorvdeshmukh at live dot in
Reported by: apoorvdeshmukh at live dot in
Summary: Compilation Fails on windows when building in x64
mode with VC11
Status: Open
Type: Bug
Package: Compile Failure
Operating System: Windows 7
PHP Version: 5.6.5
Block user comment: N
Private report: N
New Comment:
Hello Again,
Cygwin indeed messed up the current build environment.
On top of that, nmake clean and removing cygwin temporarily did not appear to be enough to start
fresh.
I logged out and logged in again to the system to make sure that changes to windows PATH are in
effect. Deleted the previous source dir and extracted it again from the archive.
Then followed the usual steps
buildconf
configure (Noticed that bison n other utilities were picked up from their default path)
nmake
I was able to build successfully.
Thanks for pointing me out to cygwin whose utilities did cause the problem.
Previous Comments:
------------------------------------------------------------------------
[2015-02-13 04:22:16] apoorvdeshmukh at live dot in
Hi,
Thanks for the response.
I followed the steps mentioned here only
https://wiki.php.net/internals/windows/stepbystepbuild
I do have cygwin installed but it wasn't really for building PHP.
However, I realized that during configure step, it would take utilities such as bison from cygwin
directory instead of taking it from default path.
I removed cygwin temporarily for that.
I cleaned everything, started fresh, with buildconf, configure and nmake but I am still getting same
error in zend_ini_scanner.c
------------------------------------------------------------------------
[2015-02-12 18:43:30] ab@php.net
Ahh, you're using cygwin. I would suggest you to fetch an express version of Visual Studio, not
even sure it is possible to build PHP with cygwin nowadays. We also have this doc https://wiki.php.net/internals/windows/stepbystepbuild
.
Whereby cygwin is known to break VS sometimes, at least one should count with a possibility. So if
having some weird errors, it's probably sign for that.
Btw that file should reappear, it's being generated. I just thought it were some switch between
ts/nts which could have left that file not updated. But with cygwin, it's unlikely to get
support nowadays, i guess.
Thanks.
------------------------------------------------------------------------
[2015-02-12 17:41:53] apoorvdeshmukh at live dot in
I tried that but the file Zend\zend_ini_scanner.c keeps reappearing every time I do nmake.
.
.
.
Type 'nmake' to build PHP
C:\php-sdk\phpdev\vc11\x64\php-5.6.5-src>rm Zend\zend_ini_parser.c
rm: cannot remove 'Zend\\zend_ini_parser.c': No such file or directory
C:\php-sdk\phpdev\vc11\x64\php-5.6.5-src>nmake
Microsoft (R) Program Maintenance Utility Version 11.00.50727.1
Copyright (C) Microsoft Corporation. All rights reserved.
Recreating build dirs
Recreating build dirs
\cygwin\bin\bison.exe --output=Zend/zend_ini_parser.c -v -d -p ini_ Zend
/zend_ini_parser.y
Zend/zend_ini_parser.y:256.1-12: warning: deprecated directive, use '%pure-parse
r' [-Wdeprecated]
%pure_parser
^^^^^^^^^^^^
zend_ini_parser.c
c:\php-sdk\phpdev\vc11\x64\php-5.6.5-src\zend\zend_execute.h(247) : warning C426
7: 'function' : conversion from 'size_t' to 'int', possible loss of
data
Zend/zend_ini_parser.y(158) : warning C4267: '=' : conversion from 'size_t' to
'
int', possible loss of data
Zend/zend_ini_parser.y(176) : warning C4267: '=' : conversion from 'size_t' to
'
int', possible loss of data
Zend/zend_ini_parser.c(387) : warning C4028: formal parameter 1 different from d
eclaration
Zend/zend_ini_parser.c(1457) : error C2198: 'ini_lex' : too few arguments for ca
ll
Zend/zend_ini_parser.y(289) : error C2065: 'tsrm_ls' : undeclared identifier
Zend/zend_ini_parser.y(289) : warning C4022: 'function through pointer' : pointe
r mismatch for actual parameter 6
Zend/zend_ini_parser.y(296) : error C2065: 'tsrm_ls' : undeclared identifier
Zend/zend_ini_parser.y(296) : warning C4022: 'function through pointer' : pointe
r mismatch for actual parameter 6
Zend/zend_ini_parser.y(304) : error C2065: 'tsrm_ls' : undeclared identifier
Zend/zend_ini_parser.y(304) : warning C4022: 'function through pointer' : pointe
r mismatch for actual parameter 6
Zend/zend_ini_parser.y(309) : error C2065: 'tsrm_ls' : undeclared identifier
Zend/zend_ini_parser.y(309) : warning C4022: 'function through pointer' : pointe
r mismatch for actual parameter 6
Zend/zend_ini_parser.y(366) : error C2065: 'tsrm_ls' : undeclared identifier
Zend/zend_ini_parser.y(366) : warning C4022: 'zend_ini_get_var' : pointer mismat
ch for actual parameter 3
Zend/zend_ini_parser.y(378) : error C2065: 'tsrm_ls' : undeclared identifier
Zend/zend_ini_parser.y(378) : warning C4022: 'zend_ini_get_constant' : pointer m
ismatch for actual parameter 3
Zend/zend_ini_parser.c(1910) : warning C4090: 'function' : different 'const' qua
lifiers
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 11.0
\VC\BIN\x86_amd64\cl.exe"' : return code '0x2'
Stop.
------------------------------------------------------------------------
[2015-02-12 09:39:36] ab@php.net
Please remove Zend/zend_ini_parser.c and rerun buildconf, configure and nmake. That should help.
Thanks.
------------------------------------------------------------------------
[2015-02-12 08:13:46] apoorvdeshmukh at live dot in
Description:
------------
Zend/zend_ini_parser.y(158) : warning C4267: '=' : conversion from 'size_t' to
'
int', possible loss of data
Zend/zend_ini_parser.y(176) : warning C4267: '=' : conversion from 'size_t' to
'
int', possible loss of data
Zend/zend_ini_parser.c(387) : warning C4028: formal parameter 1 different from d
eclaration
Zend/zend_ini_parser.c(1457) : error C2198: 'ini_lex' : too few arguments for ca
ll
Zend/zend_ini_parser.y(289) : error C2065: 'tsrm_ls' : undeclared identifier
Zend/zend_ini_parser.y(289) : warning C4022: 'function through pointer' : pointe
r mismatch for actual parameter 6
Zend/zend_ini_parser.y(296) : error C2065: 'tsrm_ls' : undeclared identifier
Zend/zend_ini_parser.y(296) : warning C4022: 'function through pointer' : pointe
r mismatch for actual parameter 6
Zend/zend_ini_parser.y(304) : error C2065: 'tsrm_ls' : undeclared identifier
Zend/zend_ini_parser.y(304) : warning C4022: 'function through pointer' : pointe
r mismatch for actual parameter 6
Zend/zend_ini_parser.y(309) : error C2065: 'tsrm_ls' : undeclared identifier
Zend/zend_ini_parser.y(309) : warning C4022: 'function through pointer' : pointe
r mismatch for actual parameter 6
Zend/zend_ini_parser.y(366) : error C2065: 'tsrm_ls' : undeclared identifier
Zend/zend_ini_parser.y(366) : warning C4022: 'zend_ini_get_var' : pointer mismat
ch for actual parameter 3
Zend/zend_ini_parser.y(378) : error C2065: 'tsrm_ls' : undeclared identifier
Zend/zend_ini_parser.y(378) : warning C4022: 'zend_ini_get_constant' : pointer m
ismatch for actual parameter 3
Zend/zend_ini_parser.c(1910) : warning C4090: 'function' : different 'const' qua
lifiers
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 11.0
\VC\BIN\x86_amd64\cl.exe"' : return code '0x2'
Stop.
Expected result:
----------------
Successful compilation
Actual result:
--------------
Zend/zend_ini_parser.y(158) : warning C4267: '=' : conversion from 'size_t' to
'
int', possible loss of data
Zend/zend_ini_parser.y(176) : warning C4267: '=' : conversion from 'size_t' to
'
int', possible loss of data
Zend/zend_ini_parser.c(387) : warning C4028: formal parameter 1 different from d
eclaration
Zend/zend_ini_parser.c(1457) : error C2198: 'ini_lex' : too few arguments for ca
ll
Zend/zend_ini_parser.y(289) : error C2065: 'tsrm_ls' : undeclared identifier
Zend/zend_ini_parser.y(289) : warning C4022: 'function through pointer' : pointe
r mismatch for actual parameter 6
Zend/zend_ini_parser.y(296) : error C2065: 'tsrm_ls' : undeclared identifier
Zend/zend_ini_parser.y(296) : warning C4022: 'function through pointer' : pointe
r mismatch for actual parameter 6
Zend/zend_ini_parser.y(304) : error C2065: 'tsrm_ls' : undeclared identifier
Zend/zend_ini_parser.y(304) : warning C4022: 'function through pointer' : pointe
r mismatch for actual parameter 6
Zend/zend_ini_parser.y(309) : error C2065: 'tsrm_ls' : undeclared identifier
Zend/zend_ini_parser.y(309) : warning C4022: 'function through pointer' : pointe
r mismatch for actual parameter 6
Zend/zend_ini_parser.y(366) : error C2065: 'tsrm_ls' : undeclared identifier
Zend/zend_ini_parser.y(366) : warning C4022: 'zend_ini_get_var' : pointer mismat
ch for actual parameter 3
Zend/zend_ini_parser.y(378) : error C2065: 'tsrm_ls' : undeclared identifier
Zend/zend_ini_parser.y(378) : warning C4022: 'zend_ini_get_constant' : pointer m
ismatch for actual parameter 3
Zend/zend_ini_parser.c(1910) : warning C4090: 'function' : different 'const' qua
lifiers
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 11.0
\VC\BIN\x86_amd64\cl.exe"' : return code '0x2'
Stop.
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=69036&edit=1
Thread (7 messages)