|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #77760 PHP failed to build with error invalid directive: `%precedence'
Submitted: 2019-03-18 09:12 UTC Modified: 2019-03-31 04:22 UTC
From: seaheart_2006 at 126 dot com Assigned: cmb (profile)
Status: No Feedback Package: Compile Failure
PHP Version: master-Git-2019-03-18 (Git) OS: Windows Server 2016
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.
Block user comment
Status: Assign to:
Bug Type:
From: seaheart_2006 at 126 dot com
New email:
PHP Version: OS:


 [2019-03-18 09:12 UTC] seaheart_2006 at 126 dot com
Environment: Windiows Server 2016 + VS2017

I tried to build PHP with master branch latest revision on Windows.It failed to build due to "Zend/zend_language_parser.y:54.1-11: invalid directive: `%precedence'" This issue can be reproduced form master branch revision 63802a8 ( Could you please help to take a look? Thanks in advance.

The error info:

Microsoft (R) Program Maintenance Utility Version 14.20.27516.96
Copyright (C) Microsoft Corporation.  All rights reserved.

Recreating build dirs
	bison.exe --output=Zend/zend_ini_parser.c -v -d -p ini_ Zend/zend_ini_parser.y
	bison.exe --output=Zend/zend_language_parser.c -v -d -p zend Zend/zend_language_parser.y
Zend/zend_language_parser.y:54.1-11: invalid directive: `%precedence'
Zend/zend_language_parser.y:58.1-11: invalid directive: `%precedence'
Zend/zend_language_parser.y:59.1-11: invalid directive: `%precedence'
Zend/zend_language_parser.y:60.1-11: invalid directive: `%precedence'
Zend/zend_language_parser.y:61.1-11: invalid directive: `%precedence'
Zend/zend_language_parser.y:62.1-11: invalid directive: `%precedence'
Zend/zend_language_parser.y:75.1-11: invalid directive: `%precedence'
Zend/zend_language_parser.y:76.1-11: invalid directive: `%precedence'
Zend/zend_language_parser.y:77.1-11: invalid directive: `%precedence'
Zend/zend_language_parser.y:79.1-11: invalid directive: `%precedence'
Zend/zend_language_parser.y:82.1-11: invalid directive: `%precedence'
Zend/zend_language_parser.y:83.1-11: invalid directive: `%precedence'
Zend/zend_language_parser.y:84.1-11: invalid directive: `%precedence'
NMAKE : fatal error U1077: 'D:\PHP7\sdk\bin\bison.exe' : return code '0x1'

Expected result:
PHP should build successfully.

Actual result:
PHP failed to build


Add a Patch

Pull Requests

Pull requests:

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2019-03-18 09:18 UTC]
This means that your bison version is too old. As our AppVeyor builds are still working, maybe this is just a matter of an outdated SDK version?
 [2019-03-18 09:54 UTC]
-Status: Open +Status: Feedback -Assigned To: +Assigned To: cmb
 [2019-03-18 09:54 UTC]
You need bison 3.x.  Which version do you use?
 [2019-03-18 11:03 UTC]
It might be good to add a bison version check in the win32 configure. There is one for re2c version, but not bison version.
 [2019-03-18 11:46 UTC]
The following pull request has been associated:

Patch Name: Add bison version check to configure
On GitHub:
 [2019-03-19 05:44 UTC] seaheart_2006 at 126 dot com
We are using bison 2.7. We will try to use 3.x. Thanks for your help.

bison (GNU Bison) 2.7
Written by Robert Corbett and Richard Stallman.

Copyright (C) 2012 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
 [2019-03-19 07:43 UTC]
> We are using bison 2.7.

Hmm, don't you use the PHP SDK 2[1]?

[1] <>
 [2019-03-31 04:22 UTC] php-bugs at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.
PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Mon Dec 04 14:01:28 2023 UTC