php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #28930 [PATCH] PHP sources pick wrong header files generated by bison
Submitted: 2004-06-25 22:33 UTC Modified: 2004-12-30 16:24 UTC
Votes:8
Avg. Score:4.6 ± 0.5
Reproduced:8 of 8 (100.0%)
Same Version:2 (25.0%)
Same OS:4 (50.0%)
From: eggert at gnu dot org Assigned: sniper (profile)
Status: Closed Package: Compile Failure
PHP Version: 4CVS, 5CVS OS: *
Private report: No CVE-ID: None
 [2004-06-25 22:33 UTC] eggert at gnu dot org
Description:
------------
"make install" fails as described under "actual result".
The problem is that the source files are picking up the wrong include files: they should be including the new files generated by Bison 1.875, but they are including the prebuilt files generated by Bison 1.35. Here is a patch. This patch should fix PHP bug 21802.

diff -prU2 php-4.3.7/Zend/zend_compile.c php-4.3.7-fix/Zend/zend_compile.c
--- php-4.3.7/Zend/zend_compile.c	2003-08-28 09:08:11 -0700
+++ php-4.3.7-fix/Zend/zend_compile.c	2004-06-25 13:11:23 -0700
@@ -19,5 +19,5 @@
 
 
-#include "zend_language_parser.h"
+#include <zend_language_parser.h>
 #include "zend.h"
 #include "zend_compile.h"
diff -prU2 php-4.3.7/Zend/zend_highlight.c php-4.3.7-fix/Zend/zend_highlight.c
--- php-4.3.7/Zend/zend_highlight.c	2003-12-25 10:57:28 -0800
+++ php-4.3.7-fix/Zend/zend_highlight.c	2004-06-25 13:10:57 -0700
@@ -20,5 +20,5 @@
 
 #include "zend.h"
-#include "zend_language_parser.h"
+#include <zend_language_parser.h>
 #include "zend_compile.h"
 #include "zend_highlight.h"
diff -prU2 php-4.3.7/Zend/zend_indent.c php-4.3.7-fix/Zend/zend_indent.c
--- php-4.3.7/Zend/zend_indent.c	2002-12-31 08:23:03 -0800
+++ php-4.3.7-fix/Zend/zend_indent.c	2004-06-25 13:11:02 -0700
@@ -23,5 +23,5 @@
 
 #include "zend.h"
-#include "zend_language_parser.h"
+#include <zend_language_parser.h>
 #include "zend_compile.h"
 #include "zend_indent.h"
diff -prU2 php-4.3.7/Zend/zend_ini_scanner.l php-4.3.7-fix/Zend/zend_ini_scanner.l
--- php-4.3.7/Zend/zend_ini_scanner.l	2003-07-24 01:44:28 -0700
+++ php-4.3.7-fix/Zend/zend_ini_scanner.l	2004-06-25 13:10:34 -0700
@@ -31,5 +31,5 @@
 #include "zend.h"
 #include "zend_globals.h"
-#include "zend_ini_parser.h"
+#include <zend_ini_parser.h>
 #include "zend_ini_scanner.h"
 
diff -prU2 php-4.3.7/Zend/zend_language_scanner.l php-4.3.7-fix/Zend/zend_language_scanner.l
--- php-4.3.7/Zend/zend_language_scanner.l	2004-02-03 06:31:19 -0800
+++ php-4.3.7-fix/Zend/zend_language_scanner.l	2004-06-25 13:11:16 -0700
@@ -48,5 +48,5 @@
 #include "zend.h"
 #include "zend_alloc.h"
-#include "zend_language_parser.h"
+#include <zend_language_parser.h>
 #include "zend_compile.h"
 #include "zend_language_scanner.h"


Reproduce code:
---------------
To reproduce the problem, install Bison 1.875 and
build PHP 4.3.7 with the following commands:

mkdir obj
cd obj
sh ../php-4.3.7/configure
make
make install

Expected result:
----------------
Expected a clean make install.

Actual result:
--------------
$ make install
Installing PHP SAPI module:       cgi
Installing PHP CGI into: /tmp/prefix/bin/
Installing PEAR environment:      /tmp/prefix/lib/php/

Parse error: syntax error, unexpected T_WHITESPACE in /home/eggert/src/php/php-4.3.7/pear/install-pear.php on line 3
make[1]: *** [install-pear-installer] Error 255
make: *** [install-pear] Error 2


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-07-08 12:15 UTC] sniper@php.net
Verified. (I misunderstood the problem first, sorry..)

 [2004-11-30 22:13 UTC] mej at eterm dot org
Tested this patch against 4.3.9.  It applies cleanly and does indeed fix bug #21802.
 [2004-12-30 16:24 UTC] sniper@php.net
This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Dec 03 17:01:29 2024 UTC