awslabs / aws-elasticache-cluster-client-memcached-for-php

Amazon ElastiCache Cluster Client is an enhanced PHP library to connect to ElastiCache clusters. This client library has been built upon libmemcached and is released under the Apache License.
Other
62 stars 33 forks source link

PHP 7 Support? #1

Closed majksner closed 8 years ago

majksner commented 8 years ago

Are there any plans for PHP 7 support since release will be very soon and we'll need to test our apps against PHP 7 and this extension?

QuChen88 commented 8 years ago

Personally I think it may be worth a try to build this library against PHP 7 installation.

majksner commented 8 years ago

I'll try and let you know results.

majksner commented 8 years ago

It's not possible to compile against PHP 7.

After cloning repository, phpize and configure commands runs successfully, make fails with this output:

vagrant@vagrant:/tmp/aws-elasticache-cluster-client-memcached-for-php$ make
/bin/bash /tmp/aws-elasticache-cluster-client-memcached-for-php/libtool --mode=compile cc -I/usr/include/php/20151012  -I. -I/tmp/aws-elasticache-cluster-client-memcached-for-php -DPHP_ATOM_INC -I/tmp/aws-elasticache-cluster-client-memcached-for-php/include -I/tmp/aws-elasticache-cluster-client-memcached-for-php/main -I/tmp/aws-elasticache-cluster-client-memcached-for-php -I/usr/include/php/20151012 -I/usr/include/php/20151012/main -I/usr/include/php/20151012/TSRM -I/usr/include/php/20151012/Zend -I/usr/include/php/20151012/ext -I/usr/include/php/20151012/ext/date/lib  -DHAVE_CONFIG_H  -g -O2   -c /tmp/aws-elasticache-cluster-client-memcached-for-php/php_memcached.c -o php_memcached.lo
libtool: compile:  cc -I/usr/include/php/20151012 -I. -I/tmp/aws-elasticache-cluster-client-memcached-for-php -DPHP_ATOM_INC -I/tmp/aws-elasticache-cluster-client-memcached-for-php/include -I/tmp/aws-elasticache-cluster-client-memcached-for-php/main -I/tmp/aws-elasticache-cluster-client-memcached-for-php -I/usr/include/php/20151012 -I/usr/include/php/20151012/main -I/usr/include/php/20151012/TSRM -I/usr/include/php/20151012/Zend -I/usr/include/php/20151012/ext -I/usr/include/php/20151012/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /tmp/aws-elasticache-cluster-client-memcached-for-php/php_memcached.c  -fPIC -DPIC -o .libs/php_memcached.o
/tmp/aws-elasticache-cluster-client-memcached-for-php/php_memcached.c:54:40: fatal error: ext/standard/php_smart_str.h: No such file or directory
 #include <ext/standard/php_smart_str.h>
                                        ^
compilation terminated.
make: *** [php_memcached.lo] Error 1
vagrant@vagrant:/tmp/aws-elasticache-cluster-client-memcached-for-php$
``
elyobo commented 8 years ago

PHP7 stable will hopefully be out soon, it would be great to have this available.

majksner commented 8 years ago

Can somebody give any timeline when this extension will be available for PHP 7.0? @QuChen88 @danzamansky @hyandell Thanks!

boedy commented 8 years ago

+1

lubax commented 8 years ago

+1

nikolay commented 8 years ago

@QuChen88 Any update? More than a month has passed and neither we've got info on HHVM, nor on PHP 7. For people who try to use modern PHP, ElastiCache client has always been an anchor not allow us to move forward! How hard is to release at least a PHP 7 client? It's the latest stable PHP release, it's been in the works for years, and you were able to prepare for its release and release support along with the official launch! I really am getting frustrated with Amazon neglecting basic building blocks!

decaluwepatrick commented 8 years ago

@nikolay I was going to write exactly the same.. Hope they will support PHP7 very soon

cabernet-zerve commented 8 years ago

+1

bayrak commented 8 years ago

+1

bastman commented 8 years ago

+1

brutuscat commented 8 years ago

+++ :+1:

Kspen commented 8 years ago

+1 now() is the time :+1: really need this!

nikolay commented 8 years ago

@QuChen88 Hello? Do you want us to start begging you?

nikolay commented 8 years ago

@QuChen88 Can we have either HHVM or PHP 7? Our company is waiting on your guys releasing support for the modern PHP platform, which is times faster than PHP 5.6 (well, maybe you want us to spend more money on EC2 sticking with PHP 5.6 and needing more instances, I guess). I'm sure we're not alone in this frustration. It's no wonder so very few people choose ElastiCache - you always have to be at your mercy to pay attention and spend a day or two to recompile. Given that pre-release versions of PHP 7 have been available for more than an year, you should've been prepared well before its stable release and not wait months after it's released!

Kspen commented 8 years ago

I can't even get 5.6 version working:

php -v

PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-zts-20131226/amazon-elasticache-cluster-client.so' - /usr/local/lib/php/extensions/no-debug-zts-20131226/amazon-elasticache-cluster-client.so: undefined symbol: executor_globals in Unknown on line 0 PHP 5.6.18 (cli) (built: Feb 23 2016 18:08:08) Copyright (c) 1997-2016 The PHP Group Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies

cabernet-zerve commented 8 years ago

You can continue using elasticache, you just have to use native PHP clients and won't be able to take advantage of automatic node discovery.

Kspen commented 8 years ago

That defeats the purpose of an elasticache cluster. When a node goes down and/or a new one comes up, I would lose caching without auto discovery. Apparently, Amazon is not too concerned about this service or my inability to use it. To anyone reading, good luck with this broken code and its barely supported Elasticache service. Maybe elasticache is the greatest thing since sliced bread. I wouldn't know because their code won't compile on a perfectly fine server with no dependency issues, and this PECL install binary also fails (see above). Rolling my own memcached cluster. Give me a shout when Elasticache has code that works with PHP7. Later dudes.

stevenscg commented 8 years ago

+1. Just replicated OP's make error with PHP 7.0.3.

Will probably switch away from ElastiCache to EC2 with Consul DNS or consul-template feeding PHP apps with a list of active and healthy servers. AFAICT, might be at parity with the ElasticCache offering.

QuChen88 commented 8 years ago

We appreciate your feedback and are actively working on adding PHP 7 support. You can expect this code to be available by early next week.

elyobo commented 8 years ago

@QuChen88 Thanks, much appreciated. Now, back to buging Amazon to include a PHP7 build in the next Amazon Linux release... ;)

tdlm commented 8 years ago

:+1:

nikolay commented 8 years ago

@QuChen88 :+1: No HHVM support (#2) in the plans, I assume?

chrisdlangton commented 8 years ago

@QuChen88 any updates for us?

Elasticache is literally the last piece we need for our stack to be on php7 and support a large user base.

Thanks!

nikolay commented 8 years ago

@chrisdlangton Same here! I can't believe Amazon has a single developer assigned to this!

QuChen88 commented 8 years ago

The code for PHP 7 client is available now! Please try it out.

https://github.com/awslabs/aws-elasticache-cluster-client-memcached-for-php/tree/php7

stevenscg commented 8 years ago

Nice! Can't wait to try it (though I had already transitioned to memcached on EC2).

nikolay commented 8 years ago

@QuChen88 When can we expect the client download to become available here?

nikolay commented 8 years ago

@QuChen88 Hello?

nikolay commented 8 years ago

@bryangreen He doesn't seem to care! Static compilation support was dropped for whatever reason and although officially announced, the support for PHP 7 is actually not available.

My suggestion is to bug @JeffBarr here or on Twitter here. This is getting ridiculous! Somebody needs to pull @QuChen88's ear for keeping a bunch of people hostages! Honestly, I'm so pissed of having to wait for this that I'm on the verge of abandoning ElastiCache and launching my own memcached cluster with ECS!

Upvote on Hacker News here as well!

Kspen commented 8 years ago

Abandoned service and built my own memcached servers. Less expensive and zero headaches. As far as I'm concerned, elasticate doesn't exist. On Mar 21, 2016 1:50 PM, "Nikolay Kolev" notifications@github.com wrote:

@bryangreen https://github.com/bryangreen He doesn't seem to care! Static compilation support was dropped for whatever reason and although officially announced https://aws.amazon.com/about-aws/whats-new/2016/03/amazon-elasticache-now-supports-memcached-auto-discovery-for-php7/, the support for PHP 7 is actually not available.

My suggestion is to bug @JeffBarr https://github.com/JeffBarr here or on Twitter here https://twitter.com/jeffbarr. This is getting ridiculous! Somebody needs to pull @QuChen88 https://github.com/QuChen88's ear for keeping a bunch of people hostages! Honestly, I'm so pissed of having to wait for this that I'm on the verge of abandoning ElastiCache and launching my own memcached cluster with ECS!

Upvote on Hacker News here https://news.ycombinator.com/item?id=11327728 as well!

— You are receiving this because you commented. Reply to this email directly or view it on GitHub https://github.com/awslabs/aws-elasticache-cluster-client-memcached-for-php/issues/1#issuecomment-199422584

nikolay commented 8 years ago

@Kspen makes sense given how neglected and unsupported this is and the crappy attitude of the only developer at whose mercy we are gotta be! Freedom has its price and here - it's actually cheaper! ElastiCache and CloudFormation are some of the most neglected projects and it's a shame for AWS to keep going on like this for years!

chrisdlangton commented 8 years ago

@QuChen88 Here is the output of a fresh Amazon Linux AMI with php7;

PHP 7.0.3 (cli) (built: Feb  4 2016 21:15:42) ( NTS )
Copyright (c) 1997-2016 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2016 Zend Technologies
    with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2016, by Zend Technologies

phpize

Configuring for:
PHP Api Version:         20151012
Zend Module Api No:      20151012
Zend Extension Api No:   320151012
configure.in:149: warning: AC_LANG_CONFTEST: no AC_LANG_SOURCE call detected in body
../../lib/autoconf/lang.m4:193: AC_LANG_CONFTEST is expanded from...
../../lib/autoconf/general.m4:2661: _AC_LINK_IFELSE is expanded from...
../../lib/autoconf/general.m4:2678: AC_LINK_IFELSE is expanded from...
aclocal.m4:4134: _LT_SYS_MODULE_PATH_AIX is expanded from...
aclocal.m4:7273: _LT_LINKER_SHLIBS is expanded from...
aclocal.m4:8348: _LT_LANG_C_CONFIG is expanded from...
aclocal.m4:3250: _LT_SETUP is expanded from...
aclocal.m4:3179: LT_INIT is expanded from...
aclocal.m4:3214: AC_PROG_LIBTOOL is expanded from...
configure.in:149: the top level
configure.in:149: warning: AC_LANG_CONFTEST: no AC_LANG_SOURCE call detected in body
../../lib/autoconf/lang.m4:193: AC_LANG_CONFTEST is expanded from...
../../lib/autoconf/general.m4:2661: _AC_LINK_IFELSE is expanded from...
../../lib/autoconf/general.m4:2678: AC_LINK_IFELSE is expanded from...
aclocal.m4:7273: _LT_LINKER_SHLIBS is expanded from...
aclocal.m4:8348: _LT_LANG_C_CONFIG is expanded from...
aclocal.m4:3250: _LT_SETUP is expanded from...
aclocal.m4:3179: LT_INIT is expanded from...
aclocal.m4:3214: AC_PROG_LIBTOOL is expanded from...
configure.in:149: the top level
configure.in:149: warning: AC_LANG_CONFTEST: no AC_LANG_SOURCE call detected in body
../../lib/autoconf/lang.m4:193: AC_LANG_CONFTEST is expanded from...
../../lib/autoconf/general.m4:2661: _AC_LINK_IFELSE is expanded from...
../../lib/autoconf/general.m4:2678: AC_LINK_IFELSE is expanded from...
aclocal.m4:4134: _LT_SYS_MODULE_PATH_AIX is expanded from...
aclocal.m4:7273: _LT_LINKER_SHLIBS is expanded from...
aclocal.m4:8348: _LT_LANG_C_CONFIG is expanded from...
aclocal.m4:3250: _LT_SETUP is expanded from...
aclocal.m4:3179: LT_INIT is expanded from...
aclocal.m4:3214: AC_PROG_LIBTOOL is expanded from...
configure.in:149: the top level
configure.in:149: warning: AC_LANG_CONFTEST: no AC_LANG_SOURCE call detected in body
../../lib/autoconf/lang.m4:193: AC_LANG_CONFTEST is expanded from...
../../lib/autoconf/general.m4:2661: _AC_LINK_IFELSE is expanded from...
../../lib/autoconf/general.m4:2678: AC_LINK_IFELSE is expanded from...
aclocal.m4:7273: _LT_LINKER_SHLIBS is expanded from...
aclocal.m4:8348: _LT_LANG_C_CONFIG is expanded from...
aclocal.m4:3250: _LT_SETUP is expanded from...
aclocal.m4:3179: LT_INIT is expanded from...
aclocal.m4:3214: AC_PROG_LIBTOOL is expanded from...
configure.in:149: the top level

configure

checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for a sed that does not truncate output... /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-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking for PHP prefix... /usr
checking for PHP includes... -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib
checking for PHP extension directory... /usr/lib64/php/modules
checking for PHP installed headers prefix... /usr/include/php
checking if debug is enabled... no
checking if zts is enabled... no
checking for re2c... no
configure: WARNING: You will need re2c 0.13.4 or later if you want to regenerate PHP parsers.
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... no
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/bin/pkg-config
checking for zlib location... /usr
checking for session includes... /usr/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.8, under /usr
checking whether to enable sasl support... no
checking whether memcached_exist is defined... no
checking for memcached protocol support... disabled
checking for a sed that does not truncate output... (cached) /bin/sed
checking for fgrep... /bin/grep -F
checking for ld used by cc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for ar... ar
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from cc object... ok
checking for dlfcn.h... yes
checking for objdir... .libs
checking if cc supports -fno-rtti -fno-exceptions... no
checking for cc option to produce PIC... -fPIC -DPIC
checking if cc PIC flag -fPIC -DPIC works... yes
checking if cc static flag -static works... no
checking if cc supports -c -o file.o... yes
checking if cc supports -c -o file.o... (cached) yes
checking whether the cc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
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
configure: creating ./config.status
config.status: creating config.h
config.status: executing libtool commands

make

/bin/sh /home/ec2-user/aws-elasticache-cluster-client-memcached-for-php/libtool --mode=compile cc -I/usr/include/php    -I. -I/home/ec2-user/aws-elasticache-cluster-client-memcached-for-php -DPHP_ATOM_INC -I/home/ec2-user/aws-elasticache-cluster-client-memcached-for-php/include -I/home/ec2-user/aws-elasticache-cluster-client-memcached-for-php/main -I/home/ec2-user/aws-elasticache-cluster-client-memcached-for-php -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib  -DHAVE_CONFIG_H  -g -O2 -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib   -c /home/ec2-user/aws-elasticache-cluster-client-memcached-for-php/php_memcached.c -o php_memcached.lo 
libtool: compile:  cc -I/usr/include/php -I. -I/home/ec2-user/aws-elasticache-cluster-client-memcached-for-php -DPHP_ATOM_INC -I/home/ec2-user/aws-elasticache-cluster-client-memcached-for-php/include -I/home/ec2-user/aws-elasticache-cluster-client-memcached-for-php/main -I/home/ec2-user/aws-elasticache-cluster-client-memcached-for-php -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -c /home/ec2-user/aws-elasticache-cluster-client-memcached-for-php/php_memcached.c  -fPIC -DPIC -o .libs/php_memcached.o
/home/ec2-user/aws-elasticache-cluster-client-memcached-for-php/php_memcached.c: In function ‘s_stat_execute_cb’:
/home/ec2-user/aws-elasticache-cluster-client-memcached-for-php/php_memcached.c:2647:3: warning: passing argument 4 of ‘add_assoc_stringl_ex’ discards ‘const’ qualifier from pointer target type [enabled by default]
   add_assoc_stringl_ex(server_values, key, key_length, value, value_length);
   ^
In file included from /usr/include/php/main/php.h:39:0,
                 from /home/ec2-user/aws-elasticache-cluster-client-memcached-for-php/php_memcached.h:22,
                 from /home/ec2-user/aws-elasticache-cluster-client-memcached-for-php/php_memcached.c:25:
/usr/include/php/Zend/zend_API.h:397:14: note: expected ‘char *’ but argument is of type ‘const char *’
 ZEND_API int add_assoc_stringl_ex(zval *arg, const char *key, size_t key_len, char *str, size_t length);
              ^
/home/ec2-user/aws-elasticache-cluster-client-memcached-for-php/php_memcached.c: In function ‘s_server_cursor_list_servers_cb’:
/home/ec2-user/aws-elasticache-cluster-client-memcached-for-php/php_memcached.c:3365:2: warning: passing argument 4 of ‘add_assoc_string_ex’ discards ‘const’ qualifier from pointer target type [enabled by default]
  add_assoc_string(&array, "host", memcached_server_name(instance));
  ^
In file included from /usr/include/php/main/php.h:39:0,
                 from /home/ec2-user/aws-elasticache-cluster-client-memcached-for-php/php_memcached.h:22,
                 from /home/ec2-user/aws-elasticache-cluster-client-memcached-for-php/php_memcached.c:25:
/usr/include/php/Zend/zend_API.h:396:14: note: expected ‘char *’ but argument is of type ‘const char *’
 ZEND_API int add_assoc_string_ex(zval *arg, const char *key, size_t key_len, char *str);
              ^
/home/ec2-user/aws-elasticache-cluster-client-memcached-for-php/php_memcached.c:3367:2: warning: passing argument 4 of ‘add_assoc_string_ex’ discards ‘const’ qualifier from pointer target type [enabled by default]
  add_assoc_string(&array, "type", memcached_server_type(instance));
  ^
In file included from /usr/include/php/main/php.h:39:0,
                 from /home/ec2-user/aws-elasticache-cluster-client-memcached-for-php/php_memcached.h:22,
                 from /home/ec2-user/aws-elasticache-cluster-client-memcached-for-php/php_memcached.c:25:
/usr/include/php/Zend/zend_API.h:396:14: note: expected ‘char *’ but argument is of type ‘const char *’
 ZEND_API int add_assoc_string_ex(zval *arg, const char *key, size_t key_len, char *str);
              ^
/home/ec2-user/aws-elasticache-cluster-client-memcached-for-php/php_memcached.c: In function ‘php_memc_register_constants’:
/home/ec2-user/aws-elasticache-cluster-client-memcached-for-php/php_memcached.c:4231:50: error: ‘MEMCACHED_BEHAVIOR_CLIENT_MODE’ undeclared (first use in this function)
  REGISTER_MEMC_CLASS_CONST_LONG(OPT_CLIENT_MODE, MEMCACHED_BEHAVIOR_CLIENT_MODE);
                                                  ^
/home/ec2-user/aws-elasticache-cluster-client-memcached-for-php/php_memcached.c:4171:131: note: in definition of macro ‘REGISTER_MEMC_CLASS_CONST_LONG’
  #define REGISTER_MEMC_CLASS_CONST_LONG(name, value) zend_declare_class_constant_long(php_memc_get_ce() , ZEND_STRS( #name ) - 1, value)
                                                                                                                                   ^
/home/ec2-user/aws-elasticache-cluster-client-memcached-for-php/php_memcached.c:4231:50: note: each undeclared identifier is reported only once for each function it appears in
  REGISTER_MEMC_CLASS_CONST_LONG(OPT_CLIENT_MODE, MEMCACHED_BEHAVIOR_CLIENT_MODE);
                                                  ^
/home/ec2-user/aws-elasticache-cluster-client-memcached-for-php/php_memcached.c:4171:131: note: in definition of macro ‘REGISTER_MEMC_CLASS_CONST_LONG’
  #define REGISTER_MEMC_CLASS_CONST_LONG(name, value) zend_declare_class_constant_long(php_memc_get_ce() , ZEND_STRS( #name ) - 1, value)
                                                                                                                                   ^
/home/ec2-user/aws-elasticache-cluster-client-memcached-for-php/php_memcached.c:4232:68: error: ‘MEMCACHED_BEHAVIOR_DYNAMIC_POLLING_THRESHOLD_SECS’ undeclared (first use in this function)
  REGISTER_MEMC_CLASS_CONST_LONG(OPT_DYNAMIC_POLLING_INTERVAL_SECS, MEMCACHED_BEHAVIOR_DYNAMIC_POLLING_THRESHOLD_SECS);
                                                                    ^
/home/ec2-user/aws-elasticache-cluster-client-memcached-for-php/php_memcached.c:4171:131: note: in definition of macro ‘REGISTER_MEMC_CLASS_CONST_LONG’
  #define REGISTER_MEMC_CLASS_CONST_LONG(name, value) zend_declare_class_constant_long(php_memc_get_ce() , ZEND_STRS( #name ) - 1, value)
                                                                                                                                   ^
/home/ec2-user/aws-elasticache-cluster-client-memcached-for-php/php_memcached.c:4322:65: error: ‘MEMCACHED_NO_CONFIG_SERVER’ undeclared (first use in this function)
  REGISTER_MEMC_CLASS_CONST_LONG(RES_MEMCACHED_NO_CONFIG_SERVER, MEMCACHED_NO_CONFIG_SERVER);
                                                                 ^
/home/ec2-user/aws-elasticache-cluster-client-memcached-for-php/php_memcached.c:4171:131: note: in definition of macro ‘REGISTER_MEMC_CLASS_CONST_LONG’
  #define REGISTER_MEMC_CLASS_CONST_LONG(name, value) zend_declare_class_constant_long(php_memc_get_ce() , ZEND_STRS( #name ) - 1, value)
                                                                                                                                   ^
/home/ec2-user/aws-elasticache-cluster-client-memcached-for-php/php_memcached.c:4343:53: error: ‘STATIC_MODE’ undeclared (first use in this function)
  REGISTER_MEMC_CLASS_CONST_LONG(STATIC_CLIENT_MODE, STATIC_MODE);
                                                     ^
/home/ec2-user/aws-elasticache-cluster-client-memcached-for-php/php_memcached.c:4171:131: note: in definition of macro ‘REGISTER_MEMC_CLASS_CONST_LONG’
  #define REGISTER_MEMC_CLASS_CONST_LONG(name, value) zend_declare_class_constant_long(php_memc_get_ce() , ZEND_STRS( #name ) - 1, value)
                                                                                                                                   ^
/home/ec2-user/aws-elasticache-cluster-client-memcached-for-php/php_memcached.c:4344:54: error: ‘DYNAMIC_MODE’ undeclared (first use in this function)
  REGISTER_MEMC_CLASS_CONST_LONG(DYNAMIC_CLIENT_MODE, DYNAMIC_MODE); 
                                                      ^
/home/ec2-user/aws-elasticache-cluster-client-memcached-for-php/php_memcached.c:4171:131: note: in definition of macro ‘REGISTER_MEMC_CLASS_CONST_LONG’
  #define REGISTER_MEMC_CLASS_CONST_LONG(name, value) zend_declare_class_constant_long(php_memc_get_ce() , ZEND_STRS( #name ) - 1, value)
                                                                                                                                   ^
make: *** [php_memcached.lo] Error 1

Clearly if a fresh Amazon Linux AMI doesn't work we have a serious issue that needs immediate action - considering the announcement PHP7 support.

QuChen88 commented 8 years ago

I was able to compile the client on Amazon Linux with PHP 7. Instead of running "configure", you should run "configure --with-libmemcached-dir=" like I indicated in the README.markdown file.

Please also note that you need to compile the dependent package aws-elasticache-cluster-client-libmemcached before compiling this package.

LucPettett commented 8 years ago

@QuChen88 , are you using an AWS AMI? I have the same issues as @chrisdlangton on a fresh AMI using your readme instructions.

chrisdlangton commented 8 years ago

@QuChen88 I did run the configure command correctly, provided by my output the libmemcached is found under /usr (specifically /usr/include/) and valid.

What leads you to the conclusion the configure step failed in my output? "make" fails in my scenario on Amazon Linux AMI not "./configure" unless i am mistaken.

These are my steps

git clone -b php7 https://github.com/awslabs/aws-elasticache-cluster-client-memcached-for-php.git && cd aws*

phpize

./configure --with-libmemcached-dir=/usr --disable-memcached-sasl

make

Could you test your package on an Amazon Linux AMI also and see if it fails for you?

QuChen88 commented 8 years ago

Today I launched a new EC2 instance from AMZN 201509 AMI, and compiled aws-elasticache-cluster-client-libmemcached package on it. I then checked out the aws-elasticache-cluster-client-memcached-for-php package and executed the same set of commands you had above and was able to compile the client.

What is different is that my custom installation of libmemcached is under another directory which I specified.

And the way I compiled the libmemcached library is as follows:

git clone https://github.com/awslabs/aws-elasticache-cluster-client-libmemcached.git cd aws-elasticache-cluster-client-libmemcached ./configure --prefix=/home/ec2-user/aws-elasticache-cluster-client-libmemcached/build make make install

Then for PHP, I ran

phpize ./configure --with-libmemcached-dir=/home/ec2-user/aws-elasticache-cluster-client-libmemcached/build --disable-memcached-sasl make

chrisdlangton commented 8 years ago

@QuChen88

We tried your supplied commands also, this time it failed on libmemcached make install due to not having the gcc-c++ package installed via yum.

After installing gcc-c++ we encountered further issues;

[root@ip-10-249-38-21 ec2-user]# git clone https://github.com/awslabs/aws-elasticache-cluster-client-libmemcached.git
Cloning into 'aws-elasticache-cluster-client-libmemcached'...
remote: Counting objects: 866, done.
remote: Total 866 (delta 0), reused 0 (delta 0), pack-reused 866
Receiving objects: 100% (866/866), 1.33 MiB | 537.00 KiB/s, done.
Resolving deltas: 100% (461/461), done.
Checking connectivity... done.
[root@ip-10-249-38-21 ec2-user]# cd aws-elasticache-cluster-client-libmemcached/
[root@ip-10-249-38-21 aws-elasticache-cluster-client-libmemcached]# ./configure --prefix=/home/ec2-user/aws-elasticache-cluster-client-libmemcached/build
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for style of include used by make... GNU
checking for gcc... gcc
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 gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking dependency style of gcc... gcc3
checking dependency style of gcc... (cached) gcc3
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
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 minix/config.h usability... no
checking minix/config.h presence... no
checking for minix/config.h... no
checking whether it is safe to define __EXTENSIONS__... yes
checking for isainfo... no
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking dependency style of g++... gcc3
checking dependency style of g++... (cached) gcc3
checking whether gcc and cc understand -c and -o together... yes
checking how to create a ustar tar archive... gnutar
checking whether __SUNPRO_C is declared... no
checking whether __ICC is declared... no
checking "C Compiler version--yes"... "gcc (GCC) 4.8.3 20140911 (Red Hat 4.8.3-9)"
checking "C++ Compiler version"... "g++ (GCC) 4.8.3 20140911 (Red Hat 4.8.3-9)"
checking whether time.h and sys/time.h may both be included... yes
checking whether struct tm is in sys/time.h or time.h... time.h
checking for size_t... yes
checking for special C compiler options needed for large files... no
checking for _FILE_OFFSET_BITS value needed for large files... no
checking for library containing clock_gettime... none required
checking sys/socket.h usability... yes
checking sys/socket.h presence... yes
checking for sys/socket.h... yes
checking size of off_t... 8
checking size of size_t... 8
checking size of long long... 8
checking if time_t is unsigned... no
checking for setsockopt... yes
checking for bind... yes
checking whether the compiler provides atomic builtins... yes
checking assert.h usability... yes
checking assert.h presence... yes
checking for assert.h... yes
checking whether to enable assertions... yes
checking whether it is safe to use -fdiagnostics-show-option... yes
checking whether it is safe to use -floop-parallelize-all... yes
checking whether it is safe to use -Wextra... yes
checking whether it is safe to use -Wformat... yes
checking whether it is safe to use -Wconversion... yes
checking whether it is safe to use -Wconversion with htons... yes
checking whether it is safe to use -Wmissing-declarations from C++... yes
checking whether it is safe to use -Wframe-larger-than... yes
checking whether it is safe to use -Wlogical-op... yes
checking whether it is safe to use -Wredundant-decls from C++... yes
checking whether it is safe to use -Wattributes from C++... no
checking whether it is safe to use -Wno-attributes... no
checking for perl... perl
checking for dpkg-gensymbols... no
checking for lcov... no
checking for genhtml... no
checking for sphinx-build... no
checking for working -pipe... yes
checking for bison... no
checking for flex... no
checking how to print strings... printf
checking for a sed that does not truncate output... /bin/sed
checking for fgrep... /bin/grep -F
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking how to convert x86_64-unknown-linux-gnu file names to x86_64-unknown-linux-gnu format... func_convert_file_noop
checking how to convert x86_64-unknown-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for sysroot... no
checking for mt... no
checking if : is a manifest tool... no
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... no
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
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... yes
checking how to run the C++ preprocessor... g++ -E
checking for ld used by g++... /usr/bin/ld -m elf_x86_64
checking if the linker (/usr/bin/ld -m elf_x86_64) is GNU ld... yes
checking whether the g++ linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking for g++ option to produce PIC... -fPIC -DPIC
checking if g++ PIC flag -fPIC -DPIC works... yes
checking if g++ static flag -static works... no
checking if g++ supports -c -o file.o... yes
checking if g++ supports -c -o file.o... (cached) yes
checking whether the g++ linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking dynamic linker characteristics... (cached) GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether the -Werror option is usable... yes
checking for simple visibility declarations... yes
checking for ISO C++ 98 include files... 
checking whether memcached executable path has been provided... no
checking for memcached... no
checking whether memcached_sasl executable path has been provided... no
checking for memcached_sasl... no
checking whether gearmand executable path has been provided... no
checking for gearmand... no
checking libgearman/gearmand.h usability... no
checking libgearman/gearmand.h presence... no
checking for libgearman/gearmand.h... no
checking for library containing getopt_long... none required
checking for library containing gethostbyname... none required
checking for the pthreads library -lpthreads... no
checking whether pthreads work without any flags... no
checking whether pthreads work with -Kthread... no
checking whether pthreads work with -kthread... no
checking for the pthreads library -llthread... no
checking whether pthreads work with -pthread... yes
checking for joinable pthread attribute... PTHREAD_CREATE_JOINABLE
checking if more special flags are required for pthreads... no
checking for PTHREAD_PRIO_INHERIT... yes
checking the location of cstdint... <tr1/cstdint>
checking the location of cinttypes... <tr1/cinttypes>
checking whether byte ordering is bigendian... no
checking for htonll... no
checking for working SO_SNDTIMEO... yes
checking for working SO_RCVTIMEO... yes
checking for supported struct padding... yes
checking for alarm... yes
checking for dup2... yes
checking for getline... yes
checking for gettimeofday... yes
checking for memchr... yes
checking for memmove... yes
checking for memset... yes
checking for pipe2... yes
checking for select... yes
checking for setenv... yes
checking for socket... yes
checking for sqrt... yes
checking for strcasecmp... yes
checking for strchr... yes
checking for strdup... yes
checking for strerror... yes
checking for strtol... yes
checking for strtoul... yes
checking for strtoull... yes
checking arpa/inet.h usability... yes
checking arpa/inet.h presence... yes
checking for arpa/inet.h... yes
checking errno.h usability... yes
checking errno.h presence... yes
checking for errno.h... yes
checking execinfo.h usability... yes
checking execinfo.h presence... yes
checking for execinfo.h... yes
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking for inttypes.h... (cached) yes
checking libintl.h usability... yes
checking libintl.h presence... yes
checking for libintl.h... yes
checking limits.h usability... yes
checking limits.h presence... yes
checking for limits.h... yes
checking malloc.h usability... yes
checking malloc.h presence... yes
checking for malloc.h... yes
checking math.h usability... yes
checking math.h presence... yes
checking for math.h... yes
checking netdb.h usability... yes
checking netdb.h presence... yes
checking for netdb.h... yes
checking netinet/in.h usability... yes
checking netinet/in.h presence... yes
checking for netinet/in.h... yes
checking pthread.h usability... yes
checking pthread.h presence... yes
checking for pthread.h... yes
checking stdarg.h usability... yes
checking stdarg.h presence... yes
checking for stdarg.h... yes
checking stddef.h usability... yes
checking stddef.h presence... yes
checking for stddef.h... yes
checking for stdlib.h... (cached) yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking for unistd.h... (cached) yes
checking cxxabi.h usability... yes
checking cxxabi.h presence... yes
checking for cxxabi.h... yes
checking sys/sysctl.h usability... yes
checking sys/sysctl.h presence... yes
checking for sys/sysctl.h... yes
checking umem.h usability... no
checking umem.h presence... no
checking for umem.h... no
checking for C++ compiler vendor... gnu
checking for working alloca.h... yes
checking for alloca... yes
checking for error_at_line... yes
checking for pid_t... yes
checking vfork.h usability... no
checking vfork.h presence... no
checking for vfork.h... no
checking for fork... yes
checking for vfork... yes
checking for working fork... yes
checking for working vfork... (cached) yes
checking for stdlib.h... (cached) yes
checking for GNU libc compatible malloc... yes
checking for stdlib.h... (cached) yes
checking for GNU libc compatible realloc... yes
checking whether strerror_r is declared... yes
checking for strerror_r... yes
checking whether strerror_r returns char *... yes
checking for stdbool.h that conforms to C99... yes
checking for _Bool... no
checking for int16_t... yes
checking for int32_t... yes
checking for int64_t... yes
checking for int8_t... yes
checking for off_t... yes
checking for pid_t... (cached) yes
checking for ssize_t... yes
checking for uint16_t... yes
checking for uint32_t... yes
checking for uint64_t... yes
checking for uint8_t... yes
checking whether byte ordering is bigendian... (cached) no
checking for an ANSI C-conforming const... yes
checking for inline... inline
checking for working volatile... yes
checking for C/C++ restrict keyword... __restrict
checking whether the compiler supports GCC C++ ABI name demangling... yes
checking sasl/sasl.h usability... yes
checking sasl/sasl.h presence... yes
checking for sasl/sasl.h... yes
checking for main in -lsasl2... yes
checking uuid/uuid.h usability... no
checking uuid/uuid.h presence... no
checking for uuid/uuid.h... no
checking for clock_gettime in -lrt... yes
checking for floor in -lm... yes
checking for sigignore... yes
checking atomic.h usability... no
checking atomic.h presence... no
checking for atomic.h... no
checking for setppriv... no
checking for winsock2.h... no
checking for poll.h... yes
checking for sys/wait.h... yes
checking for fnmatch.h... yes
checking for MSG_NOSIGNAL... yes
checking for MSG_DONTWAIT... yes
checking for MSG_MORE... yes
checking event.h usability... no
checking event.h presence... no
checking for event.h... no
configure: WARNING: Unable to find libevent
checking for endianness... little
configure: creating ./config.status
config.status: creating Makefile
config.status: creating docs/conf.py
config.status: creating libhashkit-1.0/configure.h
config.status: creating libmemcached-1.0/configure.h
config.status: creating libmemcached-1.2/configure.h
config.status: creating libmemcached-2.0/configure.h
config.status: creating support/libmemcached.pc
config.status: creating support/libmemcached.spec
config.status: creating support/libmemcached-fc.spec
config.status: creating libtest/version.h
config.status: creating config.h
config.status: executing depfiles commands
config.status: executing libtool commands
---
Configuration summary for libmemcached version 1.0.8

   * Installation prefix:       /home/ec2-user/aws-elasticache-cluster-client-libmemcached/build
   * System type:               unknown-linux-gnu
   * Host CPU:                  x86_64
   * C Compiler:                gcc (GCC) 4.8.3 20140911 (Red Hat 4.8.3-9)
   * Assertions enabled:        yes
   * Debug enabled:             no
   * Warnings as failure:       no
   * SASL support:              

---
[root@ip-10-249-38-21 aws-elasticache-cluster-client-libmemcached]# make
CDPATH="${ZSH_VERSION+.}:" && cd . && /bin/sh /home/ec2-user/aws-elasticache-cluster-client-libmemcached/config/missing --run aclocal-1.11 -I m4
/home/ec2-user/aws-elasticache-cluster-client-libmemcached/config/missing: line 52: aclocal-1.11: command not found
WARNING: `aclocal-1.11' is missing on your system.  You should only need it if
         you modified `acinclude.m4' or `configure.ac'.  You might want
         to install the `Automake' and `Perl' packages.  Grab them from
         any GNU archive site.
 cd . && /bin/sh /home/ec2-user/aws-elasticache-cluster-client-libmemcached/config/missing --run automake-1.11 --foreign
/home/ec2-user/aws-elasticache-cluster-client-libmemcached/config/missing: line 52: automake-1.11: command not found
WARNING: `automake-1.11' is missing on your system.  You should only need it if
         you modified `Makefile.am', `acinclude.m4' or `configure.ac'.
         You might want to install the `Automake' and `Perl' packages.
         Grab them from any GNU archive site.
CDPATH="${ZSH_VERSION+.}:" && cd . && /bin/sh /home/ec2-user/aws-elasticache-cluster-client-libmemcached/config/missing --run autoconf
aclocal.m4:16: warning: this file was generated for autoconf 2.68.
You have another version of autoconf.  It may work, but is not guaranteed to.
If you have problems, you may need to regenerate the build system entirely.
To do so, use the procedure documented by the package, typically `autoreconf'.
/bin/sh ./config.status --recheck
running CONFIG_SHELL=/bin/sh /bin/sh ./configure --prefix=/home/ec2-user/aws-elasticache-cluster-client-libmemcached/build --no-create --no-recursion
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for style of include used by make... GNU
checking for gcc... gcc
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 gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking dependency style of gcc... gcc3
checking dependency style of gcc... (cached) gcc3
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
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 minix/config.h usability... no
checking minix/config.h presence... no
checking for minix/config.h... no
checking whether it is safe to define __EXTENSIONS__... yes
checking for isainfo... no
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking dependency style of g++... gcc3
checking dependency style of g++... (cached) gcc3
checking whether gcc and cc understand -c and -o together... yes
checking how to create a ustar tar archive... gnutar
checking whether __SUNPRO_C is declared... no
checking whether __ICC is declared... no
checking "C Compiler version--yes"... "gcc (GCC) 4.8.3 20140911 (Red Hat 4.8.3-9)"
checking "C++ Compiler version"... "g++ (GCC) 4.8.3 20140911 (Red Hat 4.8.3-9)"
checking whether time.h and sys/time.h may both be included... yes
checking whether struct tm is in sys/time.h or time.h... time.h
checking for size_t... yes
checking for special C compiler options needed for large files... no
checking for _FILE_OFFSET_BITS value needed for large files... no
checking for library containing clock_gettime... none required
checking sys/socket.h usability... yes
checking sys/socket.h presence... yes
checking for sys/socket.h... yes
checking size of off_t... 8
checking size of size_t... 8
checking size of long long... 8
checking if time_t is unsigned... no
checking for setsockopt... yes
checking for bind... yes
checking whether the compiler provides atomic builtins... yes
checking assert.h usability... yes
checking assert.h presence... yes
checking for assert.h... yes
checking whether to enable assertions... yes
checking whether it is safe to use -fdiagnostics-show-option... yes
checking whether it is safe to use -floop-parallelize-all... yes
checking whether it is safe to use -Wextra... yes
checking whether it is safe to use -Wformat... yes
checking whether it is safe to use -Wconversion... yes
checking whether it is safe to use -Wconversion with htons... yes
checking whether it is safe to use -Wmissing-declarations from C++... yes
checking whether it is safe to use -Wframe-larger-than... yes
checking whether it is safe to use -Wlogical-op... yes
checking whether it is safe to use -Wredundant-decls from C++... yes
checking whether it is safe to use -Wattributes from C++... no
checking whether it is safe to use -Wno-attributes... no
checking for perl... perl
checking for dpkg-gensymbols... no
checking for lcov... no
checking for genhtml... no
checking for sphinx-build... no
checking for working -pipe... yes
checking for bison... no
checking for flex... no
checking how to print strings... printf
checking for a sed that does not truncate output... /bin/sed
checking for fgrep... /bin/grep -F
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking how to convert x86_64-unknown-linux-gnu file names to x86_64-unknown-linux-gnu format... func_convert_file_noop
checking how to convert x86_64-unknown-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for sysroot... no
checking for mt... no
checking if : is a manifest tool... no
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... no
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
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... yes
checking how to run the C++ preprocessor... g++ -E
checking for ld used by g++... /usr/bin/ld -m elf_x86_64
checking if the linker (/usr/bin/ld -m elf_x86_64) is GNU ld... yes
checking whether the g++ linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking for g++ option to produce PIC... -fPIC -DPIC
checking if g++ PIC flag -fPIC -DPIC works... yes
checking if g++ static flag -static works... no
checking if g++ supports -c -o file.o... yes
checking if g++ supports -c -o file.o... (cached) yes
checking whether the g++ linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking dynamic linker characteristics... (cached) GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether the -Werror option is usable... yes
checking for simple visibility declarations... yes
checking for ISO C++ 98 include files... 
checking whether memcached executable path has been provided... no
checking for memcached... no
checking whether memcached_sasl executable path has been provided... no
checking for memcached_sasl... no
checking whether gearmand executable path has been provided... no
checking for gearmand... no
checking libgearman/gearmand.h usability... no
checking libgearman/gearmand.h presence... no
checking for libgearman/gearmand.h... no
checking for library containing getopt_long... none required
checking for library containing gethostbyname... none required
checking for the pthreads library -lpthreads... no
checking whether pthreads work without any flags... no
checking whether pthreads work with -Kthread... no
checking whether pthreads work with -kthread... no
checking for the pthreads library -llthread... no
checking whether pthreads work with -pthread... yes
checking for joinable pthread attribute... PTHREAD_CREATE_JOINABLE
checking if more special flags are required for pthreads... no
checking for PTHREAD_PRIO_INHERIT... yes
checking the location of cstdint... <tr1/cstdint>
checking the location of cinttypes... <tr1/cinttypes>
checking whether byte ordering is bigendian... no
checking for htonll... no
checking for working SO_SNDTIMEO... yes
checking for working SO_RCVTIMEO... yes
checking for supported struct padding... yes
checking for alarm... yes
checking for dup2... yes
checking for getline... yes
checking for gettimeofday... yes
checking for memchr... yes
checking for memmove... yes
checking for memset... yes
checking for pipe2... yes
checking for select... yes
checking for setenv... yes
checking for socket... yes
checking for sqrt... yes
checking for strcasecmp... yes
checking for strchr... yes
checking for strdup... yes
checking for strerror... yes
checking for strtol... yes
checking for strtoul... yes
checking for strtoull... yes
checking arpa/inet.h usability... yes
checking arpa/inet.h presence... yes
checking for arpa/inet.h... yes
checking errno.h usability... yes
checking errno.h presence... yes
checking for errno.h... yes
checking execinfo.h usability... yes
checking execinfo.h presence... yes
checking for execinfo.h... yes
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking for inttypes.h... (cached) yes
checking libintl.h usability... yes
checking libintl.h presence... yes
checking for libintl.h... yes
checking limits.h usability... yes
checking limits.h presence... yes
checking for limits.h... yes
checking malloc.h usability... yes
checking malloc.h presence... yes
checking for malloc.h... yes
checking math.h usability... yes
checking math.h presence... yes
checking for math.h... yes
checking netdb.h usability... yes
checking netdb.h presence... yes
checking for netdb.h... yes
checking netinet/in.h usability... yes
checking netinet/in.h presence... yes
checking for netinet/in.h... yes
checking pthread.h usability... yes
checking pthread.h presence... yes
checking for pthread.h... yes
checking stdarg.h usability... yes
checking stdarg.h presence... yes
checking for stdarg.h... yes
checking stddef.h usability... yes
checking stddef.h presence... yes
checking for stddef.h... yes
checking for stdlib.h... (cached) yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking for unistd.h... (cached) yes
checking cxxabi.h usability... yes
checking cxxabi.h presence... yes
checking for cxxabi.h... yes
checking sys/sysctl.h usability... yes
checking sys/sysctl.h presence... yes
checking for sys/sysctl.h... yes
checking umem.h usability... no
checking umem.h presence... no
checking for umem.h... no
checking for C++ compiler vendor... gnu
checking for working alloca.h... yes
checking for alloca... yes
checking for error_at_line... yes
checking for pid_t... yes
checking vfork.h usability... no
checking vfork.h presence... no
checking for vfork.h... no
checking for fork... yes
checking for vfork... yes
checking for working fork... yes
checking for working vfork... (cached) yes
checking for stdlib.h... (cached) yes
checking for GNU libc compatible malloc... yes
checking for stdlib.h... (cached) yes
checking for GNU libc compatible realloc... yes
checking whether strerror_r is declared... yes
checking for strerror_r... yes
checking whether strerror_r returns char *... yes
checking for stdbool.h that conforms to C99... yes
checking for _Bool... no
checking for int16_t... yes
checking for int32_t... yes
checking for int64_t... yes
checking for int8_t... yes
checking for off_t... yes
checking for pid_t... (cached) yes
checking for ssize_t... yes
checking for uint16_t... yes
checking for uint32_t... yes
checking for uint64_t... yes
checking for uint8_t... yes
checking whether byte ordering is bigendian... (cached) no
checking for an ANSI C-conforming const... yes
checking for inline... inline
checking for working volatile... yes
checking for C/C++ restrict keyword... __restrict
checking whether the compiler supports GCC C++ ABI name demangling... yes
checking sasl/sasl.h usability... yes
checking sasl/sasl.h presence... yes
checking for sasl/sasl.h... yes
checking for main in -lsasl2... yes
checking uuid/uuid.h usability... no
checking uuid/uuid.h presence... no
checking for uuid/uuid.h... no
checking for clock_gettime in -lrt... yes
checking for floor in -lm... yes
checking for sigignore... yes
checking atomic.h usability... no
checking atomic.h presence... no
checking for atomic.h... no
checking for setppriv... no
checking for winsock2.h... no
checking for poll.h... yes
checking for sys/wait.h... yes
checking for fnmatch.h... yes
checking for MSG_NOSIGNAL... yes
checking for MSG_DONTWAIT... yes
checking for MSG_MORE... yes
checking event.h usability... no
checking event.h presence... no
checking for event.h... no
configure: WARNING: Unable to find libevent
checking for endianness... little
configure: creating ./config.status
---
Configuration summary for libmemcached version 1.0.8

   * Installation prefix:       /home/ec2-user/aws-elasticache-cluster-client-libmemcached/build
   * System type:               unknown-linux-gnu
   * Host CPU:                  x86_64
   * C Compiler:                gcc (GCC) 4.8.3 20140911 (Red Hat 4.8.3-9)
   * Assertions enabled:        yes
   * Debug enabled:             no
   * Warnings as failure:       yes
   * SASL support:              

---
 /bin/sh ./config.status
config.status: creating Makefile
config.status: creating docs/conf.py
config.status: creating libhashkit-1.0/configure.h
config.status: creating libmemcached-1.0/configure.h
config.status: creating libmemcached-1.2/configure.h
config.status: creating libmemcached-2.0/configure.h
config.status: creating support/libmemcached.pc
config.status: creating support/libmemcached.spec
config.status: creating support/libmemcached-fc.spec
config.status: creating libtest/version.h
config.status: creating config.h
config.status: config.h is unchanged
config.status: executing depfiles commands
config.status: executing libtool commands
(CDPATH="${ZSH_VERSION+.}:" && cd . && /bin/sh /home/ec2-user/aws-elasticache-cluster-client-libmemcached/config/missing --run autoheader)
rm -f stamp-h1
touch config.in
cd . && /bin/sh ./config.status config.h
config.status: creating config.h
make  all-am
make[1]: Entering directory `/home/ec2-user/aws-elasticache-cluster-client-libmemcached'
  CXX    libhashkit/libhashkit_libhashkit_la-aes.lo
  CXX    libhashkit/libhashkit_libhashkit_la-algorithm.lo
  CXX    libhashkit/libhashkit_libhashkit_la-behavior.lo
  CXX    libhashkit/libhashkit_libhashkit_la-crc32.lo
  CXX    libhashkit/libhashkit_libhashkit_la-digest.lo
  CXX    libhashkit/libhashkit_libhashkit_la-encrypt.lo
  CXX    libhashkit/libhashkit_libhashkit_la-fnv_32.lo
  CXX    libhashkit/libhashkit_libhashkit_la-fnv_64.lo
  CXX    libhashkit/libhashkit_libhashkit_la-function.lo
  CXX    libhashkit/libhashkit_libhashkit_la-has.lo
  CXX    libhashkit/libhashkit_libhashkit_la-hashkit.lo
  CXX    libhashkit/libhashkit_libhashkit_la-jenkins.lo
  CXX    libhashkit/libhashkit_libhashkit_la-ketama.lo
  CXX    libhashkit/libhashkit_libhashkit_la-md5.lo
  CXX    libhashkit/libhashkit_libhashkit_la-murmur.lo
  CXX    libhashkit/libhashkit_libhashkit_la-one_at_a_time.lo
  CXX    libhashkit/libhashkit_libhashkit_la-rijndael.lo
  CXX    libhashkit/libhashkit_libhashkit_la-str_algorithm.lo
  CXX    libhashkit/libhashkit_libhashkit_la-strerror.lo
  CXX    libhashkit/libhashkit_libhashkit_la-string.lo
  CXX    libhashkit/libhashkit_libhashkit_la-nohsieh.lo
  CXXLD  libhashkit/libhashkit.la
  CXX    libmemcached/csl/libmemcached_libmemcached_la-context.lo
  CXX    libmemcached/csl/libmemcached_libmemcached_la-parser.lo
  CXX    libmemcached/csl/libmemcached_libmemcached_la-scanner.lo
  CXX    libhashkit/libmemcached_libmemcached_la-aes.lo
  CXX    libhashkit/libmemcached_libmemcached_la-algorithm.lo
  CXX    libhashkit/libmemcached_libmemcached_la-behavior.lo
  CXX    libhashkit/libmemcached_libmemcached_la-crc32.lo
  CXX    libhashkit/libmemcached_libmemcached_la-digest.lo
  CXX    libhashkit/libmemcached_libmemcached_la-encrypt.lo
  CXX    libhashkit/libmemcached_libmemcached_la-fnv_32.lo
  CXX    libhashkit/libmemcached_libmemcached_la-fnv_64.lo
  CXX    libhashkit/libmemcached_libmemcached_la-function.lo
  CXX    libhashkit/libmemcached_libmemcached_la-has.lo
  CXX    libhashkit/libmemcached_libmemcached_la-hashkit.lo
  CXX    libhashkit/libmemcached_libmemcached_la-jenkins.lo
  CXX    libhashkit/libmemcached_libmemcached_la-ketama.lo
  CXX    libhashkit/libmemcached_libmemcached_la-md5.lo
  CXX    libhashkit/libmemcached_libmemcached_la-murmur.lo
  CXX    libhashkit/libmemcached_libmemcached_la-one_at_a_time.lo
  CXX    libhashkit/libmemcached_libmemcached_la-rijndael.lo
  CXX    libhashkit/libmemcached_libmemcached_la-str_algorithm.lo
  CXX    libhashkit/libmemcached_libmemcached_la-strerror.lo
  CXX    libhashkit/libmemcached_libmemcached_la-string.lo
  CXX    libhashkit/libmemcached_libmemcached_la-nohsieh.lo
  CXX    libmemcached/libmemcached_libmemcached_la-allocators.lo
  CXX    libmemcached/libmemcached_libmemcached_la-analyze.lo
  CC     libmemcached/libmemcached_libmemcached_la-array.lo
  CXX    libmemcached/libmemcached_libmemcached_la-auto.lo
  CXX    libmemcached/libmemcached_libmemcached_la-backtrace.lo
^[`  CXX    libmemcached/libmemcached_libmemcached_la-behavior.lo
  CXX    libmemcached/libmemcached_libmemcached_la-byteorder.lo
  CXX    libmemcached/libmemcached_libmemcached_la-callback.lo
  CXX    libmemcached/libmemcached_libmemcached_la-connect.lo
  CXX    libmemcached/libmemcached_libmemcached_la-delete.lo
  CXX    libmemcached/libmemcached_libmemcached_la-do.lo
  CXX    libmemcached/libmemcached_libmemcached_la-dump.lo
  CXX    libmemcached/libmemcached_libmemcached_la-error.lo
  CXX    libmemcached/libmemcached_libmemcached_la-exist.lo
  CXX    libmemcached/libmemcached_libmemcached_la-fetch.lo
  CXX    libmemcached/libmemcached_libmemcached_la-flush.lo
  CXX    libmemcached/libmemcached_libmemcached_la-flush_buffers.lo
  CXX    libmemcached/libmemcached_libmemcached_la-get.lo
  CXX    libmemcached/libmemcached_libmemcached_la-hash.lo
  CXX    libmemcached/libmemcached_libmemcached_la-hosts.lo
  CXX    libmemcached/libmemcached_libmemcached_la-initialize_query.lo
  CXX    libmemcached/libmemcached_libmemcached_la-io.lo
  CXX    libmemcached/libmemcached_libmemcached_la-key.lo
  CXX    libmemcached/libmemcached_libmemcached_la-memcached.lo
  CXX    libmemcached/libmemcached_libmemcached_la-encoding_key.lo
  CXX    libmemcached/libmemcached_libmemcached_la-namespace.lo
  CXX    libmemcached/libmemcached_libmemcached_la-options.lo
  CXX    libmemcached/libmemcached_libmemcached_la-parse.lo
  CXX    libmemcached/libmemcached_libmemcached_la-purge.lo
  CXX    libmemcached/libmemcached_libmemcached_la-quit.lo
  CXX    libmemcached/libmemcached_libmemcached_la-response.lo
  CXX    libmemcached/libmemcached_libmemcached_la-result.lo
  CXX    libmemcached/libmemcached_libmemcached_la-sasl.lo
  CXX    libmemcached/libmemcached_libmemcached_la-server.lo
  CXX    libmemcached/libmemcached_libmemcached_la-server_list.lo
  CXX    libmemcached/libmemcached_libmemcached_la-stats.lo
  CXX    libmemcached/libmemcached_libmemcached_la-storage.lo
  CXX    libmemcached/libmemcached_libmemcached_la-strerror.lo
  CXX    libmemcached/libmemcached_libmemcached_la-string.lo
  CXX    libmemcached/libmemcached_libmemcached_la-touch.lo
  CXX    libmemcached/libmemcached_libmemcached_la-verbosity.lo
  CXX    libmemcached/libmemcached_libmemcached_la-version.lo
  CXX    libmemcached/libmemcached_libmemcached_la-udp.lo
  CC     libmemcached/libmemcached_libmemcached_la-virtual_bucket.lo
  CXXLD  libmemcached/libmemcached.la
copying selected object files to avoid basename conflicts...
  CXX    libmemcached/libmemcached_libmemcachedutil_la-backtrace.lo
In file included from ./libmemcached-1.0/memcached.h:113:0,
                 from ./libmemcached/common.h:83,
                 from libmemcached/backtrace.cc:38:
./libmemcached-1.0/server.h:118:82: error: type qualifiers ignored on function return type [-Werror=ignored-qualifiers]
 const bool has_memcached_server_ipaddress(const memcached_server_instance_st self);
                                                                                  ^
cc1plus: all warnings being treated as errors
make[1]: *** [libmemcached/libmemcached_libmemcachedutil_la-backtrace.lo] Error 1
make[1]: Leaving directory `/home/ec2-user/aws-elasticache-cluster-client-libmemcached'
make: *** [all] Error 2

Perhaps there is a list of dependencies needed to compile the client you could list for us?

Additionally, the README file install steps are outdated based on your last post here, could you kindly provide updated steps complete per operating system, Debian, Centos/Amazon AMI, ect.

On a side note, the elasticache php7 compatibility has been announced yet we still are required to build our clients from source of a branch not master, i would like to learn when should we expect an officially php7 compatible elasticache client install package to be available? One that is officially official and doesn't require building from source.

QuChen88 commented 8 years ago

chrisdlangton@ We made changes to libmemcached to support auto-discovery feature for ElastiCache memcached, so yes we do have a custom fork of the libmemcached for our client.

https://github.com/awslabs/aws-elasticache-cluster-client-libmemcached

Looks like you are running into compilation error due to warnings being treated as errors. You need to update the Makefile to not treat warnings as errors as I indicated in the README file in the aws-elasticache-cluster-client-libmemcached package.

One other thing worth a try here as well - I attached my compiled memcached.so artifact from my compilation on Amazon Linux earlier today. You can unzip it and try to link this extension in your PHP7 installation and see if this works for you or not.

chrisdlangton commented 8 years ago

@QuChen88

I looked into changing the setting for "cc1plus: all warnings being treated as errors" as you suggest, there were 2 files called Makefile with different extensions.

As I understand it, there would be a specific dependency or included file that is being compiled with the argument "-Werror=ignored-qualifiers" somewhere, and simply removing that argument would allow the warning to be treated as a warning not an error?

I couldn't locate this in either;

cat Makefile.am | grep "ignored-qualifiers"'
cat Makefile.in | grep "ignored-qualifiers"

i did a search like this also in an attempt to find the correct settings;

cat Makefile.in | grep -i "warning"

$(top_srcdir)/m4/pandora_warnings.m4 \
BOOSTSKIP_WARNINGS = @BOOSTSKIP_WARNINGS@
INNOBASE_SKIP_WARNINGS = @INNOBASE_SKIP_WARNINGS@
INTLTOOL_WARNINGS = @INTLTOOL_WARNINGS@
PERMISSIVE_C_WARNINGS = @PERMISSIVE_C_WARNINGS@
PERMISSIVE_WARNINGS = @PERMISSIVE_WARNINGS@
PROTOSKIP_WARNINGS = @PROTOSKIP_WARNINGS@
SPHINX_WARNINGS = @SPHINX_WARNINGS@
SPHINXOPTS = ${SPHINX_WARNINGS}

Though none appear to be appropriate..

Honestly digging this deep into compiling issues is beyond what AWS should expect of their customers.

These issues I am trying to resolve with you is to assist in your efforts to get PHP7 support as i fear the other AWS customers seeking PHP7 support have lost hope already.

It would be nice to have the proven method well documented along side the Elasticache installation guide here;

http://docs.aws.amazon.com/AmazonElastiCache/latest/UserGuide/Appendix.InstallingClients.html

Do you think this will be updated soon?

We did try your extension file - thank you - this is what we encountered;

PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/memcached.so' - libmemcachedutil.so.2: cannot open shared object file: No such file or directory in Unknown on line 0

It is similar to the libmemcachedutil issues during compilation which makes perfect sense. There are no shortcuts here it seems.

QuChen88 commented 8 years ago

chrisdlangton@ thanks for your help. I think you are missing a dependency. I encountered the same error on a freshly started Amazon Linux instance and I was able to fix the issue by installing libmemcached-devel.

[ec2-user@ip-10-154-248-200 modules]$ php -v PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/memcached.so' - libmemcachedutil.so.2: cannot open shared object file: No such file or directory in Unknown on line 0 PHP 7.0.4 (cli) (built: Mar 5 2016 01:22:48) ( NTS ) Copyright (c) 1997-2016 The PHP Group Zend Engine v3.0.0, Copyright (c) 1998-2016 Zend Technologies

[ec2-user@ip-10-154-248-200 modules]$ sudo yum install libmemcached-devel ....

[ec2-user@ip-10-154-248-200 modules]$ php -v PHP 7.0.4 (cli) (built: Mar 5 2016 01:22:48) ( NTS ) Copyright (c) 1997-2016 The PHP Group Zend Engine v3.0.0, Copyright (c) 1998-2016 Zend Technologies

I will see what I can do to make the installation steps easier for people who wants to use PHP7. Agree that compiling from code is a bit of hassle sometimes.

chrisdlangton commented 8 years ago

@QuChen88

Much appreciated.

libmemcached-devel was not installed, after installation however the outcome has not changed. The error provided here regarding libmemcachedutil still occur unfortunately.

Any other suggestions?

QuChen88 commented 8 years ago

Hmm. Sorry, I think I uploaded a bad build artifact yesterday. Please try the other artifact I have on this other thread. I think that will work.

https://github.com/awslabs/aws-elasticache-cluster-client-memcached-for-php/issues/4

chrisdlangton commented 8 years ago

the extension is now being loaded - thank you.

php -r 'phpinfo();' | grep memcache
memcached
memcached support => enabled
libmemcached version => 1.0.8
memcached.compression_factor => 1.3 => 1.3
memcached.compression_threshold => 2000 => 2000
memcached.compression_type => fastlz => fastlz
memcached.default_binary_protocol => 0 => 0
memcached.default_connect_timeout => 0 => 0
memcached.default_consistent_hash => 0 => 0
memcached.serializer => php => php
memcached.sess_binary_protocol => 1 => 1
memcached.sess_connect_timeout => 0 => 0
memcached.sess_consistent_hash => 1 => 1
memcached.sess_lock_expire => 0 => 0
memcached.sess_lock_max_wait => not set => not set
memcached.sess_lock_retries => 5 => 5
memcached.sess_lock_wait => not set => not set
memcached.sess_lock_wait_max => 2000 => 2000
memcached.sess_lock_wait_min => 1000 => 1000
memcached.sess_locking => 1 => 1
memcached.sess_number_of_replicas => 0 => 0
memcached.sess_persistent => 0 => 0
memcached.sess_prefix => memc.sess. => memc.sess.
memcached.sess_randomize_replica_read => 0 => 0
memcached.sess_remove_failed_servers => 0 => 0
memcached.sess_sasl_password => no value => no value
memcached.sess_sasl_username => no value => no value
memcached.sess_server_failure_limit => 0 => 0
memcached.store_retry_count => 2 => 2
Registered save handlers => files user memcached 

We are now able to continue working towards PHP7 for our application but i would still consider the bug not fixed.

danzamansky commented 8 years ago

Hi guys,

ElastiCache product team here. Thanks everyone for your useful feedback. We have released an ElastiCache client with Auto Discovery support for PHP 7.0, you can download it here: https://s3.amazonaws.com/elasticache-downloads/ClusterClient/PHP-7.0/latest-64bit

We have also updated the instructions to install it in the README.markdown file.

Please keep sharing your thoughts and requests about using ElastiCache, our roadmap is heavily based on customer feedback like that.

Thanks, Dan

LucPettett commented 8 years ago

THANK-YOU! The AWS gods have delivered.

elyobo commented 8 years ago

Thanks @danzamansky and @QuChen88.

I think the main request here (and on other related issues) is that the release be timely; PHP7 has been a long time in the works, and is a big improvement that people are keen to jump on, but there was no announcement of a timeframe for a compatible cluster client here and for a long time no compatible client either.

It's not something that happens often, but the next time PHP has a major release which requires changes to the extensions, it would be useful if some sort of announcement of intention to support/not support was made, with expected timelines (e.g. we will have a release ready when the stable PHP release is made) and ideally timelines that align with the release so that people aren't left hanging.

This hasn't personally been a pain for me, as we're slow movers on PHP7 (waiting for it to be included in Amazon Linux), but I can see that there was a lot of frustration for some people here.

chrisdlangton commented 8 years ago

@danzamansky and @QuChen88 awesome work, thank you

danzamansky commented 8 years ago

Understood @elyobo, appreciate the feedback. Your comment is valid, as a customer it helps to have visibility into both existing and upcoming features on the roadmap. While unfortunately for obvious reasons we cannot publicly disclose a product roadmap, we definitely track forums like this one for customer requests and take them into account as we always try to make your experience with ElastiCache better. I realize that you are building important apps using our services and we want to make that journey as smooth as possible.