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

From: Date: Mon, 13 Jul 2015 20:43:43 +0000
Subject: Bug #70067 [NEW]: Cross-compile failure in opcache when SIZEOF_ZEND_LONG < SIZEOF_SIZE_T
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-194419@lists.php.net to get a copy of this message
From: bishop Operating system: PHP version: master-Git-2015-07-13 (Git) Package: Compile Failure Bug Type: Bug Bug description:Cross-compile failure in opcache when SIZEOF_ZEND_LONG < SIZEOF_SIZE_T 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 bug report at https://bugs.php.net/bug.php?id=70067&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=70067&r=trysnapshot54 Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=70067&r=trysnapshot55 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=70067&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=70067&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=70067&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=70067&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=70067&r=needscript Try newer version: https://bugs.php.net/fix.php?id=70067&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=70067&r=support Expected behavior: https://bugs.php.net/fix.php?id=70067&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=70067&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=70067&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=70067&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=70067&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=70067&r=dst IIS Stability: https://bugs.php.net/fix.php?id=70067&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=70067&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=70067&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=70067&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=70067&r=mysqlcfg

« previous php.bugs (#194419) next »