php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #69036 Compilation Fails on windows when building in x64 mode with VC11
Submitted: 2015-02-12 08:13 UTC Modified: 2015-02-13 07:16 UTC
Votes:2
Avg. Score:5.0 ± 0.0
Reproduced:2 of 2 (100.0%)
Same Version:2 (100.0%)
Same OS:2 (100.0%)
From: apoorvdeshmukh at live dot in Assigned:
Status: Not a bug Package: Compile Failure
PHP Version: 5.6.5 OS: Windows 7
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: apoorvdeshmukh at live dot in
New email:
PHP Version: OS:

 

 [2015-02-12 08:13 UTC] 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.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2015-02-12 09:39 UTC] ab@php.net
-Status: Open +Status: Feedback
 [2015-02-12 09:39 UTC] ab@php.net
Please remove Zend/zend_ini_parser.c and rerun buildconf, configure and nmake. That should help.

Thanks.
 [2015-02-12 17:41 UTC] apoorvdeshmukh at live dot in
-Status: Feedback +Status: Open
 [2015-02-12 17:41 UTC] 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 18:43 UTC] ab@php.net
-Status: Open +Status: Feedback
 [2015-02-12 18:43 UTC] 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-13 04:22 UTC] apoorvdeshmukh at live dot in
-Status: Feedback +Status: Open
 [2015-02-13 04:22 UTC] 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-13 05:13 UTC] apoorvdeshmukh at live dot in
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.
 [2015-02-13 07:16 UTC] ab@php.net
-Status: Open +Status: Not a bug
 [2015-02-13 07:16 UTC] ab@php.net
Thanks for the update. I think this ticket can be closed now.

Yeah, cygwin and VS collide quite often. Probably better to hold them on separate VMs or alike, except a few cases it's justified.

Thanks.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Mar 28 17:01:29 2024 UTC