Skip to content

pecl + PHP 7.3 build fails with php_memcached.c:1284:20: error: expression is not assignable #415

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

Closed
Synchro opened this issue Dec 17, 2018 · 2 comments

Comments

@Synchro
Copy link

Synchro commented Dec 17, 2018

Installing php-memcached from pecl using a PHP 7.3 installation from homebrew (which now requires the use of pecl) on macOS 10.11 (I can't upgrade past that) fails with this error. It appears to be the same cause as in #385, but the error message is different (so I'm posting it so others can find it), and I gather the merged #390 hasn't made it into a release yet, and I guess I should ping #408 too.

(I'm not sure why pear is showing 7.3 warnings either - it's fully updated too)

pecl install memcached                                                                  1 ↵  6099  19:03:18 
pecl/memcached can optionally use PHP extension "igbinary" (version >= 2.0)
pecl/memcached can optionally use PHP extension "msgpack" (version >= 2.0)
downloading memcached-3.0.4.tgz ...
Starting to download memcached-3.0.4.tgz (78,776 bytes)
..................done: 78,776 bytes

Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in Validator.php on line 1933

Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in /usr/local/Cellar/php/7.3.0/share/php/pear/PEAR/PackageFile/v2/Validator.php on line 1933
15 source files, building
running: phpize
Configuring for:
PHP Api Version:         20180731
Zend Module Api No:      20180731
Zend Extension Api No:   320180731
libmemcached directory [no] : /usr/local/opt/libmemcached
building in /private/tmp/pear/temp/pear-build-marcusI9ogcq/memcached-3.0.4
running: /private/tmp/pear/temp/memcached/configure --with-php-config=/usr/local/opt/php/bin/php-config --with-libmemcached-dir=/usr/local/opt/libmemcached
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for a sed that does not truncate output... /usr/bin/sed
checking for cc... cc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether cc accepts -g... yes
checking for cc option to accept ISO C89... none needed
checking how to run the C preprocessor... cc -E
checking for icc... no
checking for suncc... no
checking whether cc understands -c and -o together... yes
checking for system library directory... lib
checking if compiler supports -R... no
checking if compiler supports -Wl,-rpath,... yes
checking build system type... x86_64-apple-darwin15.6.0
checking host system type... x86_64-apple-darwin15.6.0
checking target system type... x86_64-apple-darwin15.6.0
checking for PHP prefix... /usr/local/Cellar/php/7.3.0
checking for PHP includes... -I/usr/local/Cellar/php/7.3.0/include/php -I/usr/local/Cellar/php/7.3.0/include/php/main -I/usr/local/Cellar/php/7.3.0/include/php/TSRM -I/usr/local/Cellar/php/7.3.0/include/php/Zend -I/usr/local/Cellar/php/7.3.0/include/php/ext -I/usr/local/Cellar/php/7.3.0/include/php/ext/date/lib
checking for PHP extension directory... /usr/local/Cellar/php/7.3.0/pecl/20180731
checking for PHP installed headers prefix... /usr/local/Cellar/php/7.3.0/include/php
checking if debug is enabled... no
checking if zts is enabled... no
checking for re2c... re2c
checking for re2c version... 1.1.1 (ok)
checking for gawk... gawk
checking whether to enable memcached support... yes, shared
checking for libmemcached... yes, shared
checking whether to enable memcached session handler support... yes
checking whether to enable memcached igbinary serializer support... no
checking whether to enable memcached json serializer support... no
checking whether to enable memcached msgpack serializer support... no
checking whether to enable memcached sasl support... yes
checking whether to enable memcached protocol support... no
checking whether to use system FastLZ bibrary... no
checking for ZLIB... yes, shared
checking for pkg-config... /usr/local/bin/pkg-config
checking for zlib location... /usr
checking for session includes... /usr/local/Cellar/php/7.3.0/include/php
checking for memcached session support... enabled
checking for memcached igbinary support... disabled
checking for memcached msgpack support... disabled
checking for libmemcached location... found version 1.0.18, under /usr/local/Cellar/libmemcached/1.0.18_2
checking whether to enable sasl support... yes
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking sasl/sasl.h usability... yes
checking sasl/sasl.h presence... yes
checking for sasl/sasl.h... yes
checking whether libmemcached supports sasl... yes
checking for sasl_client_init in -lsasl2... yes
checking whether memcached_exist is defined... yes
checking for memcached protocol support... disabled
checking for ld used by cc... /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld
checking if the linker (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld) is GNU ld... no
checking for /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld option to reload object files... -r
checking for BSD-compatible nm... /usr/local/bin/nm -B
checking whether ln -s works... yes
checking how to recognize dependent libraries... pass_all
checking dlfcn.h usability... yes
checking dlfcn.h presence... yes
checking for dlfcn.h... yes
checking the maximum length of command line arguments... 196608
checking command to parse /usr/local/bin/nm -B output from cc object... ok
checking for objdir... .libs
checking for ar... ar
checking for ranlib... ranlib
checking for strip... strip
checking for dsymutil... dsymutil
checking for nmedit... nmedit
checking for -single_module linker flag... yes
checking for -exported_symbols_list linker flag... yes
checking if cc supports -fno-rtti -fno-exceptions... yes
checking for cc option to produce PIC... -fno-common
checking if cc PIC flag -fno-common works... yes
checking if cc static flag -static works... no
checking if cc supports -c -o file.o... yes
checking whether the cc linker (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... darwin15.6.0 dyld
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no

creating libtool
appending configuration tag "CXX" to libtool
configure: creating ./config.status
config.status: creating config.h
running: make
/bin/sh /private/tmp/pear/temp/pear-build-marcusI9ogcq/memcached-3.0.4/libtool --mode=compile cc -I/usr/local/Cellar/php/7.3.0/include/php    -I. -I/private/tmp/pear/temp/memcached -DPHP_ATOM_INC -I/private/tmp/pear/temp/pear-build-marcusI9ogcq/memcached-3.0.4/include -I/private/tmp/pear/temp/pear-build-marcusI9ogcq/memcached-3.0.4/main -I/private/tmp/pear/temp/memcached -I/usr/local/Cellar/php/7.3.0/include/php -I/usr/local/Cellar/php/7.3.0/include/php/main -I/usr/local/Cellar/php/7.3.0/include/php/TSRM -I/usr/local/Cellar/php/7.3.0/include/php/Zend -I/usr/local/Cellar/php/7.3.0/include/php/ext -I/usr/local/Cellar/php/7.3.0/include/php/ext/date/lib -I/usr/local/Cellar/libmemcached/1.0.18_2/include  -DHAVE_CONFIG_H  -g -O2 -I/usr/local/Cellar/php/7.3.0/include/php -I/usr/local/Cellar/php/7.3.0/include/php/main -I/usr/local/Cellar/php/7.3.0/include/php/TSRM -I/usr/local/Cellar/php/7.3.0/include/php/Zend -I/usr/local/Cellar/php/7.3.0/include/php/ext -I/usr/local/Cellar/php/7.3.0/include/php/ext/date/lib -I/usr
/local/Cellar/libmemcached/1.0.18_2/include   -c /private/tmp/pear/temp/memcached/php_memcached.c -o php_memcached.lo
mkdir .libs
 cc -I/usr/local/Cellar/php/7.3.0/include/php -I. -I/private/tmp/pear/temp/memcached -DPHP_ATOM_INC -I/private/tmp/pear/temp/pear-build-marcusI9ogcq/memcached-3.0.4/include -I/private/tmp/pear/temp/pear-build-marcusI9ogcq/memcached-3.0.4/main -I/private/tmp/pear/temp/memcached -I/usr/local/Cellar/php/7.3.0/include/php -I/usr/local/Cellar/php/7.3.0/include/php/main -I/usr/local/Cellar/php/7.3.0/include/php/TSRM -I/usr/local/Cellar/php/7.3.0/include/php/Zend -I/usr/local/Cellar/php/7.3.0/include/php/ext -I/usr/local/Cellar/php/7.3.0/include/php/ext/date/lib -I/usr/local/Cellar/libmemcached/1.0.18_2/include -DHAVE_CONFIG_H -g -O2 -I/usr/local/Cellar/php/7.3.0/include/php -I/usr/local/Cellar/php/7.3.0/include/php/main -I/usr/local/Cellar/php/7.3.0/include/php/TSRM -I/usr/local/Cellar/php/7.3.0/include/php/Zend -I/usr/local/Cellar/php/7.3.0/include/php/ext -I/usr/local/Cellar/php/7.3.0/include/php/ext/date/lib -I/usr/local/Cellar/libmemcached/1.0.18_2/include -c /private/tmp/pear/temp/memcached/php_memcached.c  -
fno-common -DPIC -o .libs/php_memcached.o
/private/tmp/pear/temp/memcached/php_memcached.c:438:6: warning: 'sasl_client_init' is deprecated: first deprecated in macOS 10.11 [-Wdeprecated-declarations]
        if (sasl_client_init(NULL) != SASL_OK) {
            ^
/usr/include/sasl/sasl.h:924:17: note: 'sasl_client_init' has been explicitly marked deprecated here
LIBSASL_API int sasl_client_init(const sasl_callback_t *callbacks) __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0,__MAC_10_11,__IPHONE_NA,__IPHONE_NA);
                ^
/private/tmp/pear/temp/memcached/php_memcached.c:454:68: warning: format specifies type 'char *' but the argument 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);
                                           ~~                                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/private/tmp/pear/temp/memcached/php_memcached.c:1284:20: error: expression is not assignable
                GC_REFCOUNT(&le) = 1;
                ~~~~~~~~~~~~~~~~ ^
/private/tmp/pear/temp/memcached/php_memcached.c:2623:27: warning: field precision should have type 'int', but argument has type 'size_t' (aka 'unsigned long') [-Wformat]
        spprintf (&buffer, 0, "%.*s", value_length, value);
                               ~~^~   ~~~~~~~~~~~~
/private/tmp/pear/temp/memcached/php_memcached.c:4408:3: warning: 'sasl_done' is deprecated: first deprecated in macOS 10.11 [-Wdeprecated-declarations]
                sasl_done();
                ^
/usr/include/sasl/sasl.h:727:18: note: 'sasl_done' has been explicitly marked deprecated here
LIBSASL_API void sasl_done(void) __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0,__MAC_10_11,__IPHONE_NA,__IPHONE_NA);
                 ^
4 warnings and 1 error generated.
make: *** [php_memcached.lo] Error 1
ERROR: `make' failed
joshbetz added a commit to joshbetz/docker-wordpress that referenced this issue Dec 17, 2018
The memcached extension doesn't compile under php 7.3 yet

php-memcached-dev/php-memcached#415
@tvlooy
Copy link
Contributor

tvlooy commented Dec 20, 2018

a release supporting 7.3 is not out yet #408 (comment)

@sodabrew
Copy link
Contributor

memcached 3.1.0 is released!
https://pecl.php.net/package-changelog.php?package=memcached&release=3.1.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants