Bug #70067 [Opn->Csd]: Cross-compile failure in opcache when SIZEOF_ZEND_LONG < SIZEOF_SIZE_T

From: Date: Tue, 14 Jul 2015 11:09:22 +0000
Subject: Bug #70067 [Opn->Csd]: Cross-compile failure in opcache when SIZEOF_ZEND_LONG < SIZEOF_SIZE_T
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-194433@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=70067&edit=1 ID: 70067 Updated by: laruence@php.net Reported by: bishop@php.net Summary: Cross-compile failure in opcache when SIZEOF_ZEND_LONG < SIZEOF_SIZE_T -Status: Open +Status: Closed Type: Bug Package: Compile Failure PHP Version: master-Git-2015-07-13 (Git) Block user comment: N Private report: N New Comment: Automatic comment on behalf of laruence Revision: http://git.php.net/?p=php-src.git;a=commit;h=453ec91dfe0ce53e1867241625958f27fbee17d2 Log: Fixed bug #70067 (Cross-compile failure in opcache when SIZEOF_ZEND_LONG &lt; SIZEOF_SIZE_T) Previous Comments: ------------------------------------------------------------------------ [2015-07-13 20:43:41] bishop@php.net Description: ------------ Using gcc -m32 to compile 32-bit version of PHP CLI on a 64-bit system. Failure occurs in ext/opcache/zend_accelerator_util_funcs.c, where the macro definition of accel_xlat_get to zend_hash_str_find_ptr does not match implementation. Running ./configure --enable-opcache=no bypasses this error. Test script: --------------- $ uname -a Linux m.i.re 3.14.44-32.39.amzn1.x86_64 #1 SMP Thu Jun 11 20:33:38 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux $ EXTRA_CFLAGS=-m32 make Actual result: -------------- /tmp/php-src/ext/opcache/zend_accelerator_util_funcs.c: In function ‘zend_clone_zval’: /tmp/php-src/ext/opcache/zend_accelerator_util_funcs.c:160:36: error: macro "accel_xlat_get" requires 2 arguments, but only 1 given ptr = accel_xlat_get(Z_REF_P(src)); ^ /tmp/php-src/ext/opcache/zend_accelerator_util_funcs.c:160:9: error: ‘accel_xlat_get’ undeclared (first use in this function) ptr = accel_xlat_get(Z_REF_P(src)); ^ /tmp/php-src/ext/opcache/zend_accelerator_util_funcs.c:160:9: note: each undeclared identifier is reported only once for each function it appears in /tmp/php-src/ext/opcache/zend_accelerator_util_funcs.c:168:4: warning: passing argument 4 of ‘zend_hash_str_add_new_ptr’ makes pointer from integer without a cast [enabled by default] accel_xlat_set(old, Z_REF_P(src)); ^ In file included from /tmp/php-src/Zend/zend.h:36:0, from /tmp/php-src/Zend/zend_modules.h:25, from /tmp/php-src/Zend/zend_API.h:26, from /tmp/php-src/ext/opcache/zend_accelerator_util_funcs.c:22: /tmp/php-src/Zend/zend_hash.h:497:33: note: expected ‘void *’ but argument is of type ‘unsigned int’ static zend_always_inline void *zend_hash_str_add_new_ptr(HashTable *ht, const char *str, size_t len, void *pData) ^ /tmp/php-src/ext/opcache/zend_accelerator_util_funcs.c:168:4: error: too many arguments to function ‘zend_hash_str_add_new_ptr’ accel_xlat_set(old, Z_REF_P(src)); ^ In file included from /tmp/php-src/Zend/zend.h:36:0, from /tmp/php-src/Zend/zend_modules.h:25, from /tmp/php-src/Zend/zend_API.h:26, from /tmp/php-src/ext/opcache/zend_accelerator_util_funcs.c:22: /tmp/php-src/Zend/zend_hash.h:497:33: note: declared here static zend_always_inline void *zend_hash_str_add_new_ptr(HashTable *ht, const char *str, size_t len, void *pData) ^ /tmp/php-src/ext/opcache/zend_accelerator_util_funcs.c:168:37: error: expected ‘)’ before ‘;’ token accel_xlat_set(old, Z_REF_P(src)); ^ /tmp/php-src/ext/opcache/zend_accelerator_util_funcs.c:170:3: error: expected ‘;’ before ‘}’ token } ^ /tmp/php-src/ext/opcache/zend_accelerator_util_funcs.c:173:66: error: macro "accel_xlat_get" requires 2 arguments, but only 1 given if (Z_REFCOUNT_P(src) > 1 && (ptr = accel_xlat_get(Z_AST_P(src))) != NULL) { ^ /tmp/php-src/ext/opcache/zend_accelerator_util_funcs.c:181:5: warning: passing argument 4 of ‘zend_hash_str_add_new_ptr’ makes pointer from integer without a cast [enabled by default] accel_xlat_set(old, Z_AST_P(src)); ^ In file included from /tmp/php-src/Zend/zend.h:36:0, from /tmp/php-src/Zend/zend_modules.h:25, from /tmp/php-src/Zend/zend_API.h:26, from /tmp/php-src/ext/opcache/zend_accelerator_util_funcs.c:22: /tmp/php-src/ext/opcache/zend_accelerator_util_funcs.c:181:5: warning: passing argument 4 of ‘zend_hash_str_add_new_ptr’ makes pointer from integer without a cast [enabled by default] accel_xlat_set(old, Z_AST_P(src)); ^ In file included from /tmp/php-src/Zend/zend.h:36:0, from /tmp/php-src/Zend/zend_modules.h:25, from /tmp/php-src/Zend/zend_API.h:26, from /tmp/php-src/ext/opcache/zend_accelerator_util_funcs.c:22: /tmp/php-src/Zend/zend_hash.h:497:33: note: expected ‘void *’ but argument is of type ‘unsigned int’ static zend_always_inline void *zend_hash_str_add_new_ptr(HashTable *ht, const char *str, size_t len, void *pData) ^ /tmp/php-src/ext/opcache/zend_accelerator_util_funcs.c:181:5: error: too many arguments to function ‘zend_hash_str_add_new_ptr’ accel_xlat_set(old, Z_AST_P(src)); ^ In file included from /tmp/php-src/Zend/zend.h:36:0, from /tmp/php-src/Zend/zend_modules.h:25, from /tmp/php-src/Zend/zend_API.h:26, from /tmp/php-src/ext/opcache/zend_accelerator_util_funcs.c:22: /tmp/php-src/Zend/zend_hash.h:497:33: note: declared here static zend_always_inline void *zend_hash_str_add_new_ptr(HashTable *ht, const char *str, size_t len, void *pData) ^ /tmp/php-src/ext/opcache/zend_accelerator_util_funcs.c:181:38: error: expected ‘)’ before ‘;’ token accel_xlat_set(old, Z_AST_P(src)); ^ /tmp/php-src/ext/opcache/zend_accelerator_util_funcs.c:182:4: error: expected ‘;’ before ‘}’ token } ^ make: *** [ext/opcache/zend_accelerator_util_funcs.lo] Error 1 ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=70067&edit=1

« previous php.bugs (#194433) next »