php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #69055 Bison 3.0.2 not supported
Submitted: 2015-02-15 08:25 UTC Modified: 2017-10-03 08:42 UTC
Votes:6
Avg. Score:4.3 ± 0.9
Reproduced:5 of 5 (100.0%)
Same Version:0 (0.0%)
Same OS:3 (60.0%)
From: worldoffame at hotmail dot com Assigned: tyrael (profile)
Status: Closed Package: *Compile Issues
PHP Version: 5.6.27 OS: Ubuntu 14
Private report: No CVE-ID: None
 [2015-02-15 08:25 UTC] worldoffame at hotmail dot com
Description:
------------
Well it appears that for PHP 5.5 Bison 3.0 is not supported. I use command sudo apt-get install bison, which acquires Bison 3.0.2 for me. When I run the ./configure command as specified by PHP internal book on building PHP from source, I get an error message:

Documentation: http://www.phpinternalsbook.com/build_system/building_php.html

Error Message: checking for bison... bison -y
checking for bison version... invalid
configure: WARNING: bison versions supported for regeneration of the Zend/PHP parsers: 1.28 1.35 1.75 1.875 2.0 2.1 2.2 2.3 2.4 2.4.1 2.4.2 2.4.3 2.5 2.5.1 2.6 2.6.1 2.6.2 2.6.3 2.6.4 2.6.5 2.7 (found 3.0).

This appears to be a major problem as the only bison version I can get is Bison 3.0.2 using apt-get install bison. Tried Bison 2.7.1 with apt-get install bison=2:2.7.1.dfsg-1, but it says version number is invalid. For this reason, I am stuck with Bison 3.0.2. It is very inconvenient that Bison 3.0.2 is not supported for PHP 5.5, please fix this or maybe, release a patch? 



Patches

fix_bison_check (last revision 2016-10-14 15:33 UTC) by auroraeosrose@php.net)

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2015-02-15 08:57 UTC] rasmus@php.net
-Status: Open +Status: Wont fix
 [2015-02-15 08:57 UTC] rasmus@php.net
Use PHP 5.6, or install an older Bison:

wget http://launchpadlibrarian.net/140087283/libbison-dev_2.7.1.dfsg-1_amd64.deb
wget http://launchpadlibrarian.net/140087282/bison_2.7.1.dfsg-1_amd64.deb
dpkg -i libbison-dev_2.7.1.dfsg-1_amd64.deb
dpkg -i bison_2.7.1.dfsg-1_amd64.deb
 [2015-02-15 13:24 UTC] worldoffame at hotmail dot com
Okay, thanks. The code works, I use Bison 2.7.1 now.
 [2015-06-09 15:11 UTC] hek2mgl at metashock dot net
Even PHP 5.6 requires bison 2
 [2016-07-15 02:28 UTC] pbw at pbw dot id dot au
The bison check excludes bison 3.0, but the PHP manual at http://php.net/manual/en/install.unix.php
says of the bison requirement for building 5.6
bison:
PHP 5.6: 2.4 or later, excluding 3.0 only (3.0.1 and later are OK)

Is this true?  If it is, then the bison test needs to be extended to accommodate major.minor.whatever, so that the exclusion is specific to 3.0.  If not, the documentation needs to be changed.
 [2016-07-27 05:52 UTC] ju1ius at laposte dot net
This bug still exists as of today using PHP-5.6 git branch.
Bison 2 is not available in debian stable anymore. https://packages.debian.org/search?keywords=bison
According to the docs, 3.0.4 should work, but configure does not accept it.
 [2016-10-14 11:14 UTC] tyrael@php.net
-Status: Wont fix +Status: Re-Opened -PHP Version: 5.5Git-2015-02-15 (Git) +PHP Version: 5.6.27 -Assigned To: +Assigned To: tyrael
 [2016-10-14 11:14 UTC] tyrael@php.net
indeed, our exclude check only check major+micro version, so the current 3.0 in the PHP-5.6 branch won't allow 3.0.2 bison for example.
let me fix that.
 [2016-10-14 15:33 UTC] auroraeosrose@php.net
The following patch has been added/updated:

Patch Name: fix_bison_check
Revision:   1476459210
URL:        https://bugs.php.net/patch-display.php?bug=69055&patch=fix_bison_check&revision=1476459210
 [2016-10-16 16:15 UTC] auroraeosrose@php.net
With the patch non-zts versions are building/working just fine

But it seems that ZTS with bison 3 is NOT working right

the YYPARSE_PARAM and YYLEX_PARAM usage is deprecated in favor of 

%lex-param and %parse-param

still fiddling on a fix for that - that doesn't break the world (unfortunately parse-param also passes in to yyerror which makes everything harder)
 [2016-10-16 16:26 UTC] nikic@php.net
To clarify, PHP 5.6 does not support Bison 3.0 in any version -- the documentation is wrong about this, the configure check is correct. Bison 3.0 is supported as of PHP 7.
 [2016-10-16 16:45 UTC] auroraeosrose@php.net
Should we open a docs bug for the fix then?
 [2017-10-03 08:41 UTC] nikic@php.net
Automatic comment from SVN on behalf of nikic
Revision: http://svn.php.net/viewvc/?view=revision&revision=343175
Log: Fix Bison version info for 5.6 (see bug #69055)
 [2017-10-03 08:42 UTC] nikic@php.net
-Status: Re-Opened +Status: Closed
 [2017-10-03 08:42 UTC] nikic@php.net
I've adjusted the documentation in http://svn.php.net/viewvc/?view=revision&revision=343175. Reclassifying this as a doc bug and closing.
 
PHP Copyright © 2001-2018 The PHP Group
All rights reserved.
Last updated: Wed Nov 21 20:01:26 2018 UTC