Bug #74766 [Opn->Fbk]: Error building Opcache as an additional module

From: Date: Sat, 19 Oct 2019 07:43:57 +0000
Subject: Bug #74766 [Opn->Fbk]: Error building Opcache as an additional module
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-223286@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=74766&edit=1

 ID:                 74766
 Updated by:         cmb@php.net
 Reported by:        naf at altlinux dot org
 Summary:            Error building Opcache as an additional module
-Status:             Open
+Status:             Feedback
 Type:               Bug
 Package:            opcache
 PHP Version:        master-Git-2017-06-16 (Git)
-Assigned To:        
+Assigned To:        cmb
 Block user comment: N
 Private report:     N

 New Comment:

Is this still a problem?


Previous Comments:
------------------------------------------------------------------------
[2017-11-10 05:55:49] krakjoe@php.net

I don't appear able to reproduce this, anyone else ?

------------------------------------------------------------------------
[2017-06-16 06:41:56] 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



------------------------------------------------------------------------



--
Edit this bug report at https://bugs.php.net/bug.php?id=74766&edit=1


Thread (4 messages)

« previous php.bugs (#223286) next »