php.net |  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
 [2019-03-18 09:12 UTC] seaheart_2006 at 126 dot com
Description:
------------
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 (https://github.com/php/php-src/commit/63802a8446691869371bb37078d55b99cae7eb95). Could you please help to take a look? Thanks in advance.

The error info:
nmake 

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'
Stop.



Expected result:
----------------
PHP should build successfully.

Actual result:
--------------
PHP failed to build

Patches

Pull Requests

Pull requests:

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2019-03-18 09:18 UTC] nikic@php.net
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] cmb@php.net
-Status: Open +Status: Feedback -Assigned To: +Assigned To: cmb
 [2019-03-18 09:54 UTC] cmb@php.net
You need bison 3.x.  Which version do you use?
 [2019-03-18 11:03 UTC] nikic@php.net
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] cmb@php.net
The following pull request has been associated:

Patch Name: Add bison version check to configure
On GitHub:  https://github.com/php/php-src/pull/3956
Patch:      https://github.com/php/php-src/pull/3956.patch
 [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
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 [2019-03-19 07:43 UTC] cmb@php.net
> We are using bison 2.7.

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

[1] <https://wiki.php.net/internals/windows/stepbystepbuild_sdk_2>
 [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-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 14:01:32 2024 UTC