php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #64503 Compilation fails with error: conflicting types for 'zendparse'
Submitted: 2013-03-24 15:40 UTC Modified: 2013-12-14 16:08 UTC
Votes:22
Avg. Score:4.4 ± 0.9
Reproduced:21 of 21 (100.0%)
Same Version:8 (38.1%)
Same OS:6 (28.6%)
From: stormbyte at gmail dot com Assigned: laruence (profile)
Status: Closed Package: Compile Failure
PHP Version: 5.5.0beta1 OS: Gentoo
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: stormbyte at gmail dot com
New email:
PHP Version: OS:

 

 [2013-03-24 15:40 UTC] stormbyte at gmail dot com
Description:
------------
These are the last lines for compile log output:

/var/tmp/portage/dev-lang/php-5.5.0_beta1-r2/work/sapis-
build/cli/Zend/zend_language_parser.h:331:5: error: conflicting types for 
'zendparse'
In file included from /var/tmp/portage/dev-lang/php-5.5.0_beta1-r2/work/sapis-
build/cli/Zend/zend_globals.h:28:0,
                 from /var/tmp/portage/dev-lang/php-5.5.0_beta1-r2/work/sapis-
build/cli/Zend/zend_compile.h:418,
                 from /var/tmp/portage/dev-lang/php-5.5.0_beta1-r2/work/sapis-
build/cli/Zend/zend_modules.h:26,
                 from /var/tmp/portage/dev-lang/php-5.5.0_beta1-r2/work/sapis-
build/cli/Zend/zend_API.h:26,
                 from /var/tmp/portage/dev-lang/php-5.5.0_beta1-r2/work/sapis-
build/cli/main/php.h:38,
                 from /var/tmp/portage/dev-lang/php-5.5.0_beta1-r2/work/sapis-
build/cli/ext/tokenizer/tokenizer_data.c:26:
/var/tmp/portage/dev-lang/php-5.5.0_beta1-r2/work/sapis-
build/cli/Zend/zend_globals_macros.h:35:5: note: previous declaration of 
'zendparse' was here
distcc[20503] ERROR: compile /var/tmp/portage/dev-lang/php-5.5.0_beta1-
r2/work/sapis-build/cli/ext/tokenizer/tokenizer_data.c on localhost failed
make: *** [ext/tokenizer/tokenizer_data.lo] Error 1
make: *** Waiting for unfinished jobs....
In file included from /var/tmp/portage/dev-lang/php-5.5.0_beta1-r2/work/sapis-
build/cli/ext/tokenizer/tokenizer.c:33:0:
/var/tmp/portage/dev-lang/php-5.5.0_beta1-r2/work/sapis-
build/cli/Zend/zend_language_parser.h:331:5: error: conflicting types for 
'zendparse'
In file included from /var/tmp/portage/dev-lang/php-5.5.0_beta1-r2/work/sapis-
build/cli/Zend/zend_globals.h:28:0,
                 from /var/tmp/portage/dev-lang/php-5.5.0_beta1-r2/work/sapis-
build/cli/Zend/zend_compile.h:418,
                 from /var/tmp/portage/dev-lang/php-5.5.0_beta1-r2/work/sapis-
build/cli/Zend/zend_modules.h:26,
                 from /var/tmp/portage/dev-lang/php-5.5.0_beta1-r2/work/sapis-
build/cli/Zend/zend_API.h:26,
                 from /var/tmp/portage/dev-lang/php-5.5.0_beta1-r2/work/sapis-
build/cli/main/php.h:38,
                 from /var/tmp/portage/dev-lang/php-5.5.0_beta1-r2/work/sapis-
build/cli/ext/tokenizer/tokenizer.c:25:
/var/tmp/portage/dev-lang/php-5.5.0_beta1-r2/work/sapis-
build/cli/Zend/zend_globals_macros.h:35:5: note: previous declaration of 
'zendparse' was here
distcc[20491] ERROR: compile /var/tmp/portage/dev-lang/php-5.5.0_beta1-
r2/work/sapis-build/cli/ext/tokenizer/tokenizer.c on localhost failed
make: *** [ext/tokenizer/tokenizer.lo] Error 1

Test script:
---------------
In my case, just emerge php OR try to compile it

Expected result:
----------------
Compilation successful

Actual result:
--------------
Compile error

Patches

bison_build_2a.patch (last revision 2013-12-14 13:45 UTC by sebastian dot abshoff at freaque dot net)
bison_build_2.patch (last revision 2013-03-25 05:46 UTC by laruence@php.net)
bison_build.patch (last revision 2013-03-25 05:16 UTC by laruence@php.net)

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2013-03-25 05:16 UTC] laruence@php.net
The following patch has been added/updated:

Patch Name: bison_build.patch
Revision:   1364188606
URL:        https://bugs.php.net/patch-display.php?bug=64503&patch=bison_build.patch&revision=1364188606
 [2013-03-25 05:46 UTC] laruence@php.net
The following patch has been added/updated:

Patch Name: bison_build_2.patch
Revision:   1364190380
URL:        https://bugs.php.net/patch-display.php?bug=64503&patch=bison_build_2.patch&revision=1364190380
 [2013-03-25 10:59 UTC] laruence@php.net
-Assigned To: +Assigned To: remi
 [2013-03-25 10:59 UTC] laruence@php.net
Remi, could you please test with the patches? personally, I prefer the sencode 
one. since it's simple
 [2013-03-25 14:43 UTC] remi@php.net
Sorry for the delay.

Test done with 201303251230 snapshot, and, to ensure file being regenerated
rm Zend/zend_{language,ini}_parser.[ch]
Do you think this is enough ?


Fedora 18, bison 2.6.1: ok.
Fedora 17, bison 2.5.1: ok
RHEL 6.4, bison 2.4.1; HS

/builddir/build/BUILD/php5.5-201303251230/ext/tokenizer/tokenizer_data.c: In function 'tokenizer_register_constants':
/builddir/build/BUILD/php5.5-201303251230/ext/tokenizer/tokenizer_data.c:32: error: 'T_REQUIRE_ONCE' undeclared (first use in this function)
/builddir/build/BUILD/php5.5-201303251230/ext/tokenizer/tokenizer_data.c:32: error: (Each undeclared identifier is reported only once
/builddir/build/BUILD/php5.5-201303251230/ext/tokenizer/tokenizer_data.c:32: error: for each function it appears in.)
/builddir/build/BUILD/php5.5-201303251230/ext/tokenizer/tokenizer_data.c:33: error: 'T_REQUIRE' undeclared (first use in this function)
...

But this seems a parallel build issue, as running a "make" after failue succeed... need more tests.
 [2013-03-25 15:35 UTC] remi@php.net
Sorry for bad previous tests.

Adding, before the build to ensure correct generation
rm Zend/zend_{language,ini}_parser.[ch]
./genfiles

Fedora 18, bison 2.6.1, NTS: ok.
Fedora 18, bison 2.6.1, ZTS: ok.
Fedora 17, bison 2.5.1, NTS: ok
Fedora 17, bison 2.5.1, ZTS: ok
RHEL 6.4,  bison 2.4.1, NTS: ok
RHEL 6.4,  bison 2.4.1, ZTS: ok

So I think you can commit the bison_build_2.patch
 [2013-03-25 15:35 UTC] remi@php.net
-Assigned To: remi +Assigned To: laruence
 [2013-03-25 15:48 UTC] laruence@php.net
-Status: Assigned +Status: Closed
 [2013-03-25 15:48 UTC] laruence@php.net
Automatic comment on behalf of laruence
Revision: http://git.php.net/?p=php-src.git;a=commit;h=975d26667bf7dbd0f4b739eca2e49d398105980a
Log: Fixed bug #64503 (Compilation fails with error: conflicting types for 'zendparse').
 [2013-03-25 15:49 UTC] laruence@php.net
Automatic comment on behalf of laruence
Revision: http://git.php.net/?p=php-src.git;a=commit;h=975d26667bf7dbd0f4b739eca2e49d398105980a
Log: Fixed bug #64503 (Compilation fails with error: conflicting types for 'zendparse').
 [2013-08-19 18:19 UTC] stas@php.net
Automatic comment on behalf of laruence
Revision: http://git.php.net/?p=php-src.git;a=commit;h=a4862503d485abf449e0565ac03157d859a31bf7
Log: Fixed bug #64503 (Compilation fails with error: conflicting types for 'zendparse').
 [2013-08-19 18:19 UTC] stas@php.net
Automatic comment on behalf of laruence
Revision: http://git.php.net/?p=php-src.git;a=commit;h=7a79cf0206de62e61f3afe17e0665cb076a8a925
Log: Fixed bug #64503 (Compilation fails with error: conflicting types for 'zendparse').
 [2013-11-17 09:30 UTC] laruence@php.net
Automatic comment on behalf of laruence
Revision: http://git.php.net/?p=php-src.git;a=commit;h=7a79cf0206de62e61f3afe17e0665cb076a8a925
Log: Fixed bug #64503 (Compilation fails with error: conflicting types for 'zendparse').
 [2013-11-17 09:31 UTC] laruence@php.net
Automatic comment on behalf of laruence
Revision: http://git.php.net/?p=php-src.git;a=commit;h=975d26667bf7dbd0f4b739eca2e49d398105980a
Log: Fixed bug #64503 (Compilation fails with error: conflicting types for 'zendparse').
 [2013-12-06 21:42 UTC] felipe@php.net
What was the bison version used to get this build error?
 [2013-12-13 10:18 UTC] andy at webtatic dot com
This bug appears to be present in the latest PHP 5.3.28 release for the same reasons.
 [2013-12-13 18:50 UTC] aharvey@php.net
-Status: Closed +Status: Re-Opened
 [2013-12-13 18:50 UTC] aharvey@php.net
This is definitely affecting 5.3.28 tarballs configured with --enable-maintainer-zts on CentOS 5 (at least):

/bin/sh /tmp/php-5.3.28/libtool --silent --preserve-dup-deps --mode=compile /tmp/php-5.3.28/meta_ccld  -Iext/standard/ -I/tmp/php-5.3.28/ext/standard/ -DPHP_ATOM_INC -I/tmp/php-5.3.28/include -I/tmp/php-5.3.28/main -I/tmp/php-5.3.28 -I/tmp/php-5.3.28/ext/date/lib -I/tmp/php-5.3.28/ext/ereg/regex -I/tmp/php-5.3.28/TSRM -I/tmp/php-5.3.28/Zend  -D_REENTRANT  -g -O2 -fvisibility=hidden -pthread -DZTS  -c /tmp/php-5.3.28/ext/standard/basic_functions.c -o ext/standard/basic_functions.lo
In file included from /tmp/php-5.3.28/ext/standard/basic_functions.c:49:
/tmp/php-5.3.28/Zend/zend_language_parser.h:317: error: conflicting types for ‘zendparse’
/tmp/php-5.3.28/Zend/zend_globals_macros.h:35: error: previous declaration of ‘zendparse’ was here
make: *** [ext/standard/basic_functions.lo] Error 1

Laruence, are we able to backport this fix to 5.3 somehow? (I know it bumps the bison version requirement, which isn't ideal — are there any other possibilities?)
 [2013-12-14 13:43 UTC] sebastian dot abshoff at freaque dot net
I encountered this bug with PHP 5.3.28 on a Gentoo system. I manually applied the patch above together with the bison_any_version.patch from the Gentoo repository to bump to bison 2.7. Works like a charm. :)
 [2013-12-14 16:08 UTC] laruence@php.net
5.3 are only security fix now.. so I don't think we should do that..
 [2013-12-15 10:29 UTC] andy at webtatic dot com
Note this wasn't a problem in 5.3.27, for that reason I think it should be fixed, or simply the build dependencies for creating the tarballs use the old bison 2.3 process I believe used to be used for this.
 [2013-12-15 10:47 UTC] andy at webtatic dot com
Sorry, I mean 2.4.1, which appears to be the version that the PHP 5.3.27 tarball files were generated from.
 [2013-12-17 17:51 UTC] ben dot harper at rackspace dot com
I am also running into this issue when attempting to compile on RHEL 5 and 6.  I can understand not wanting to make changes to 5.3 since it is now security fixes only, but I can not understand leaving things broken.  The changes to zend don't appear to be connected with the two points in the change log.

Did the follow changes to zend get included by accident?

$ diff -q ./php-5.3.27/Zend/ ./php-5.3.28/Zend/
Files ./php-5.3.27/Zend/acinclude.m4 and ./php-5.3.28/Zend/acinclude.m4 differ
Common subdirectories: ./php-5.3.27/Zend/RFCs and ./php-5.3.28/Zend/RFCs
Common subdirectories: ./php-5.3.27/Zend/tests and ./php-5.3.28/Zend/tests
Only in ./php-5.3.28/Zend/: zend_config.h
Files ./php-5.3.27/Zend/zend_ini_parser.c and ./php-5.3.28/Zend/zend_ini_parser.c differ
Files ./php-5.3.27/Zend/zend_ini_parser.h and ./php-5.3.28/Zend/zend_ini_parser.h differ
Files ./php-5.3.27/Zend/zend_ini_parser.output and ./php-5.3.28/Zend/zend_ini_parser.output differ
Files ./php-5.3.27/Zend/zend_language_parser.c and ./php-5.3.28/Zend/zend_language_parser.c differ
Files ./php-5.3.27/Zend/zend_language_parser.h and ./php-5.3.28/Zend/zend_language_parser.h differ
Files ./php-5.3.27/Zend/zend_language_parser.output and ./php-5.3.28/Zend/zend_language_parser.output differ

-Ben
 [2014-05-12 19:30 UTC] mamfelt at gmail dot com
FYI: same error with make on AIX

        /bin/sh /data/prj/php/php-5.3.28/libtool --silent --preserve-dup-deps --mode=compile xlc_r  -Iext/standard/ -I/data/prj/php/php-5.3.28/ext/standard/ -DPHP_ATOM_INC -I/data/prj/php/php-5.3.28/include -I/data/prj/php/php-5.3.28/main -I/data/prj/php/php-5.3.28 -I/data/prj/php/php-5.3.28/ext/date/lib -I/data/prj/php/php-5.3.28/ext/ereg/regex -I/opt/include/libxml2 -I/opt/include -I/opt/include/freetype2 -I/data/prj/php/php-5.3.28/ext/mbstring/oniguruma -I/data/prj/php/php-5.3.28/ext/mbstring/libmbfl -I/data/prj/php/php-5.3.28/ext/mbstring/libmbfl/mbfl -I/opt/mysql/include -I/data/prj/php/php-5.3.28/ext/sqlite3/libsqlite -I/data/prj/php/php-5.3.28/TSRM -I/data/prj/php/php-5.3.28/Zend  -D_THREAD_SAFE  -I/usr/include -O2 -g -qlanglvl=extc99 -qmaxmem=65536 -I/opt/include -DAIX -DZTS   -c /data/prj/php/php-5.3.28/ext/standard/basic_functions.c -o ext/standard/basic_functions.lo 
"/data/prj/php/php-5.3.28/Zend/zend_language_parser.h", line 317.5: 1506-343 (S) Redeclaration of zendparse differs from previous declaration on line 35 of "/data/prj/php/php-5.3.28/Zend/zend_globals_macros.h".
"/data/prj/php/php-5.3.28/Zend/zend_language_parser.h", line 317.5: 1506-376 (I) Redeclaration of zendparse has a different number of fixed parameters than the previous declaration.
make: 1254-004 The error code from the last command is 1.
 [2014-10-07 23:17 UTC] stas@php.net
Automatic comment on behalf of laruence
Revision: http://git.php.net/?p=php-src-security.git;a=commit;h=a4862503d485abf449e0565ac03157d859a31bf7
Log: Fixed bug #64503 (Compilation fails with error: conflicting types for 'zendparse').
 [2014-10-07 23:17 UTC] stas@php.net
-Status: Re-Opened +Status: Closed
 [2014-10-07 23:28 UTC] stas@php.net
Automatic comment on behalf of laruence
Revision: http://git.php.net/?p=php-src-security.git;a=commit;h=a4862503d485abf449e0565ac03157d859a31bf7
Log: Fixed bug #64503 (Compilation fails with error: conflicting types for 'zendparse').
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Nov 21 13:01:29 2024 UTC