New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installing memcached in php 7.3.0-dev with ZTS #378

Closed
davemccall opened this Issue Jan 11, 2018 · 8 comments

Comments

Projects
None yet
5 participants
@davemccall
Copy link

davemccall commented Jan 11, 2018

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

@sodabrew

This comment has been minimized.

Copy link
Contributor

sodabrew commented Jan 11, 2018

@sodabrew sodabrew closed this Jan 17, 2018

@bojanpog

This comment has been minimized.

Copy link

bojanpog commented Dec 7, 2018

Hello!

Same error still after PHP 7.3 final is out. Does anyone has a patch for that?

Thanks, Bojan

@salvor-hardin

This comment has been minimized.

Copy link

salvor-hardin commented Dec 12, 2018

Same issue happening here

also not working (it worked ok with 7.2.x) =>

pecl install memcached

@bojanpog

This comment has been minimized.

Copy link

bojanpog commented Dec 12, 2018

Hello!

I've then successfully compiled Master branch without a problem, not php7 branch as I used to for PHP7.0-PHP7.2

BR, Bojan

@salvor-hardin

This comment has been minimized.

Copy link

salvor-hardin commented Dec 12, 2018

@sodabrew

This comment has been minimized.

Copy link
Contributor

sodabrew commented Dec 12, 2018

The release is not posted yet. I'm trying to move one of the dependencies forward (msgpack serialization) otherwise will relnote that the msgpack serialization is unsupported in PHP 7.3. I've been trying for months to get that module updated so that this will be a smooth release for php-memcached.

@salvor-hardin

This comment has been minimized.

Copy link

salvor-hardin commented Dec 12, 2018

@bscheshirwork

This comment has been minimized.

Copy link

bscheshirwork commented Dec 19, 2018

any news?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment