php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #66755 Cannot compile Zend OPcache 7.0.3 for PHP 5.2.0
Submitted: 2014-02-22 21:54 UTC Modified: 2020-10-23 14:24 UTC
Votes:2
Avg. Score:4.5 ± 0.5
Reproduced:2 of 2 (100.0%)
Same Version:1 (50.0%)
Same OS:2 (100.0%)
From: php at thomasmccorkell dot me dot uk Assigned: cmb (profile)
Status: Closed Package: opcache
PHP Version: Irrelevant OS: Linux 2.6.17.14 on Sparc
Private report: No CVE-ID: None
 [2014-02-22 21:54 UTC] php at thomasmccorkell dot me dot uk
Description:
------------
Trying to compile Zend OPcache 7.0.3 for PHP 5.2.0 failed due to at least two errors. I found a workaround for the first but not the second.

Note that Zend OPcache lists a minimum PHP version of 5.2.0 so this should work.

The system is a Netgear ReadyNAS Duo (which is based on I think Debian sarge), running a 2.6.17.14 kernel on a Sparc CPU. The PHP install came from the relevant Debian packages and has had Xdebug 2.2.3 added by building the latter from source. phpinfo lists the version as "PHP Version 5.2.0-8+etch9~bpo31+1".

I'm compiling directly on the NAS without a cross-compiler. I additionally had to update config.guess and config.sub to get configure to run as it couldn't auto-detect my system (a sparc-unknown-linux-gnu).

Test script:
---------------
With a PHP 5.2.0 install, download http://pecl.php.net/get/zendopcache-7.0.3.tgz. Attempt to build with phpize, ./configure, make.

Expected result:
----------------
Successful compilation.

Actual result:
--------------
Compilation initially failed with:

zendopcache-7.0.3/zend_accelerator_util_funcs.c: In function `zend_clone_zval':
zendopcache-7.0.3/zend_accelerator_util_funcs.c:236: error: `zend_uintptr_t' undeclared (first use in this function)

After modifying /usr/include/php5/Zend/zend_types.h to include "typedef unsigned long zend_uintptr_t;" (see also bug 58331), compilation then failed with:

zendopcache-7.0.3/Optimizer/zend_optimizer.c: In function `zend_optimizer':
zendopcache-7.0.3/Optimizer/zend_optimizer.c:310: error: `ZEND_ACC_INTERACTIVE' undeclared (first use in this function)

I couldn't find anything online about this error and so gave up at that point.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2020-10-23 12:33 UTC] cmb@php.net
-Status: Open +Status: Feedback -Assigned To: +Assigned To: cmb
 [2020-10-23 12:33 UTC] cmb@php.net
I assume that has been fixed in the meantime, or do you still
experience this issue with any of the actively supported PHP
versions[1]?

[1] <https://www.php.net/supported-versions.php>
 [2020-10-23 13:49 UTC] php at thomasmccorkell dot me dot uk
-Status: Feedback +Status: Assigned
 [2020-10-23 13:49 UTC] php at thomasmccorkell dot me dot uk
Unfortunately I've since decommissioned the NAS I encountered this bug on, so I'm not able to re-test this.
 [2020-10-23 14:24 UTC] cmb@php.net
-Status: Assigned +Status: Closed
 [2020-10-23 14:24 UTC] cmb@php.net
Thanks for the swift reply!  Given that this ticket didn't get any
feedback for that long, and that Zend OPcache 7.0.3 and PHP 5.2.0
are very old versions, I'm closing this ticket.  If there are
still issues regarding cross-compilation, a new ticket could be
opened.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 12:01:31 2024 UTC