php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #74766 Error building Opcache as an additional module
Submitted: 2017-06-16 06:41 UTC Modified: 2017-11-10 05:55 UTC
From: naf at altlinux dot org Assigned:
Status: Open Package: opcache
PHP Version: master-Git-2017-06-16 (Git) OS:
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2017-06-16 06:41 UTC] naf at altlinux dot org
Description:
------------
If PHP builds with disabled opcache, then the HAVE_OPCACHE_FILE_CACHE macro
is undefined in the global php_config.h .

Compiling Opcache as an additional module with --enable-opcache-file 
in that case produces opcache.so with references to the zend_file_cache.h
functions from ZendAccelerator.c, but functions itself does not compiles
and links in the result opcache.so as HAVE_OPCACHE_FILE_CACHE is undef 
in the zend_file_cache.c .

(And compiling Opcache as an additional module with --disable-opcache-file 
goes fine, as HAVE_OPCACHE_FILE_CACHE is disable both in the global 
php_config.h and ZendAccelerator.c .)


Test script:
---------------
Compile PHP without Opcache (with --disable-opcache --disable-opcache-file)
and install it.
Then compile Opcache as a module:
cd ext/opcache
phpize
./configure --enable-opcache --enable-opcache-file
make
make install


Expected result:
----------------
php -r 'print "OK\n";'
OK


Actual result:
--------------
php -r 'print "OK\n";'
Failed loading opcache.so:  opcache.so: undefined symbol: zend_file_cache_script_load
OK


Patches

opcache-zend_file_cache.patch (last revision 2017-06-16 06:42 UTC) by naf at altlinux dot org)

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2017-11-10 05:55 UTC] krakjoe@php.net
I don't appear able to reproduce this, anyone else ?
 
PHP Copyright © 2001-2017 The PHP Group
All rights reserved.
Last updated: Sun Nov 19 01:31:42 2017 UTC