websupport-sk / pecl-memcache

PHP Extension - Memcache module with support of newer PHP 7.x and PHP 8.x
https://pecl.php.net/package/memcache
Other
328 stars 101 forks source link

Compilation errors in php 8.0-dev due to removed macros. #69

Closed TysonAndre closed 4 years ago

TysonAndre commented 4 years ago
  1. ZEND_ARG_PASS_INFO is a deprecated macro, ZEND_ARG_INFO(0, paramname) should probably be used instead. Also see #64
  2. TSRMLS_CC, TSRMLS_C, and TSRMLS_DC were no-op macros since php 7.0 was released, and can safely be taken out, I think
/tmp/pear/temp/memcache/php7/memcache.c:42:2: warning: implicit declaration of function ‘ZEND_ARG_PASS_INFO’ [-Wimplicit-function-declaration]
  ZEND_ARG_PASS_INFO(0)
  ^
/tmp/pear/temp/memcache/php7/memcache.c:42:2: error: initializer element is not constant
/tmp/pear/temp/memcache/php7/memcache.c:42:2: note: (near initialization for ‘arginfo_memcache_get[1].name’)
/tmp/pear/temp/memcache/php7/memcache.c:43:2: error: expected ‘}’ before ‘ZEND_ARG_PASS_INFO’
  ZEND_ARG_PASS_INFO(0)
  ^
/tmp/pear/temp/memcache/php7/memcache.c:49:2: error: initializer element is not constant
  ZEND_ARG_PASS_INFO(0)
  ^
/tmp/pear/temp/memcache/php7/memcache.c:49:2: note: (near initialization for ‘arginfo_memcache_object_get[1].name’)
/tmp/pear/temp/memcache/php7/memcache.c:50:2: error: expected ‘}’ before ‘ZEND_ARG_PASS_INFO’
  ZEND_ARG_PASS_INFO(1)
  ^
/tmp/pear/temp/memcache/php7/memcache.c: In function ‘OnUpdatePrefixStaticKey’:
/tmp/pear/temp/memcache/php7/memcache.c:272:27: error: expected ‘)’ before ‘TSRMLS_CC’
     php_error_docref(NULL TSRMLS_CC, E_WARNING, "memcache.session_prefix_static_key cannot have dot inside (.)");
                           ^
/tmp/pear/temp/memcache/php7/memcache.c:272:5: error: too few arguments to function ‘php_error_docref’
     php_error_docref(NULL TSRMLS_CC, E_WARNING, "memcache.session_prefix_static_key cannot have dot inside (.)");
     ^
In file included from /tmp/pear/temp/memcache/php7/memcache.c:26:0:
/home/tyson/php-8.0.0-dev-install-experiments/include/php/main/php.h:339:23: note: declared here
 PHPAPI ZEND_COLD void php_error_docref(const char *docref, int type, const char *format, ...)
                       ^
/tmp/pear/temp/memcache/php7/memcache.c: In function ‘zm_activate_memcache’:
/tmp/pear/temp/memcache/php7/memcache.c:461:58: error: ‘TSRMLS_C’ undeclared (first use in this function)
  MEMCACHE_G(session_key_prefix) = get_session_key_prefix(TSRMLS_C);
                                                          ^
/tmp/pear/temp/memcache/php7/memcache.c:461:58: note: each undeclared identifier is reported only once for each function it appears in
Makefile:209: recipe for target 'php7/memcache.lo' failed
make: *** [php7/memcache.lo] Error 1
ERROR: `make' failed
tomassrnka commented 4 years ago

Hi,

we've started some preliminary work on support for php8, thank you for making the ticket. We will work on it in the upcoming weeks.

I've created a new branch for it php8 - https://github.com/websupport-sk/pecl-memcache/tree/php8 .

tomassrnka commented 4 years ago

resolved in NON_BLOCKING_IO_php8 branch