Skip to content

Installing memcached in php 7.3.0-dev with ZTS #378

@davemccall

Description

@davemccall

I can't install memcached extension.

I have two php executables installed on ubuntu 17. One is at /etc/php/7.0 and the other at /etc/php/7.0zts. Memcached works fine for the non-zts version. It was installed via apt-get. I manually compiled the second version with ZTS support so I could run pthreads. When I go through the following steps to install, I can't get it to work.

sudo git clone https://github.com/php-memcached-dev/php-memcached.git
cd php-memcached
sudo git checkout php7
sudo /etc/php/7.0zts/bin/phpize
sudo ./configure --with-php-config=/etc/php/7.0zts/bin/php-config
sudo make

/bin/bash /home/ubuntu/php-memcached/libtool --mode=compile cc -I/etc/php/7.0zts/include/php -I. -I/home/ubuntu/php-memcached -DPHP_ATOM_INC -I/home/ubuntu/php-memcached/include -I/home/ubuntu/php-memcached/main -I/home/ubuntu/php-memcached -I/etc/php/7.0zts/include/php -I/etc/php/7.0zts/include/php/main -I/etc/php/7.0zts/include/php/TSRM -I/etc/php/7.0zts/include/php/Zend -I/etc/php/7.0zts/include/php/ext -I/etc/php/7.0zts/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O0 -I/etc/php/7.0zts/include/php -I/etc/php/7.0zts/include/php/main -I/etc/php/7.0zts/include/php/TSRM -I/etc/php/7.0zts/include/php/Zend -I/etc/php/7.0zts/include/php/ext -I/etc/php/7.0zts/include/php/ext/date/lib -c /home/ubuntu/php-memcached/php_memcached.c -o php_memcached.lo
cc -I/etc/php/7.0zts/include/php -I. -I/home/ubuntu/php-memcached -DPHP_ATOM_INC -I/home/ubuntu/php-memcached/include -I/home/ubuntu/php-memcached/main -I/home/ubuntu/php-memcached -I/etc/php/7.0zts/include/php -I/etc/php/7.0zts/include/php/main -I/etc/php/7.0zts/include/php/TSRM -I/etc/php/7.0zts/include/php/Zend -I/etc/php/7.0zts/include/php/ext -I/etc/php/7.0zts/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O0 -I/etc/php/7.0zts/include/php -I/etc/php/7.0zts/include/php/main -I/etc/php/7.0zts/include/php/TSRM -I/etc/php/7.0zts/include/php/Zend -I/etc/php/7.0zts/include/php/ext -I/etc/php/7.0zts/include/php/ext/date/lib -c /home/ubuntu/php-memcached/php_memcached.c -fPIC -DPIC -o .libs/php_memcached.o
/home/ubuntu/php-memcached/php_memcached.c: In function ‘php_memc_printable_func’:
/home/ubuntu/php-memcached/php_memcached.c:454:25: warning: format ‘%s’ expects argument of type ‘char *’, but argument 5 has type ‘zend_string * {aka struct _zend_string }’ [-Wformat=]
spprintf (&buffer, 0, "%s::%s", ZSTR_VAL(fci->object->ce->name), fci_cache->function_handler->common.function_name);
^
/home/ubuntu/php-memcached/php_memcached.c: In function ‘zim_Memcached___construct’:
/home/ubuntu/php-memcached/php_memcached.c:1282:20: error: lvalue required as left operand of assignment
GC_REFCOUNT(&le) = 1;
^
/home/ubuntu/php-memcached/php_memcached.c: In function ‘s_stat_execute_cb’:
/home/ubuntu/php-memcached/php_memcached.c:2640:24: warning: field precision specifier ‘.
’ expects argument of type ‘int’, but argument 4 has type ‘size_t {aka long unsigned int}’ [-Wformat=]
spprintf (&buffer, 0, "%.*s", value_length, value);
^
Makefile:194: recipe for target 'php_memcached.lo' failed
make: *** [php_memcached.lo] Error 1

I've looked here and I can't seem to find anything that helps:
#218

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions