How to install libmemcached for Mac OS X Yosemite 10.10 to install PHP memcached.so extension on Mamp 3?

I need to install libmemcached on my MacBook Pro running Mac OS X Yosemite.

I already installed the memcached daemon, but in order to make the PHP memcached.so PECL extension to work, I need to install libmemcached.

I downloaded tar.gz from https://launchpad.net/libmemcached/+download , looked at the README.FIRST file:

Hi!

If you are getting this code from http://launchpad.net/libmemcached then
continue reading. Otherwise these directions are not for you (well maybe...).

To obtain code from http://bazaar.launchpad.net/libmemcached you will need to
issue the following command:

bzr branch lp:libmemcached

Once the tree is cloned you will need to build the "configure" script. You
can do this by running the script:

./bootstrap.sh autoreconf

It will set up all of the files you need to build libmemcached. At that
point it is just the typical "./configure; make; make test; make install"

For a tarball release do a "make dist" and for an RPM type "make rpm".

For patches, we prefer you push a branch to launchpad and then submit that 
branch to be merged. For more information, see:

https://help.launchpad.net/Code/UploadingABranch
https://help.launchpad.net/Code/Review

Thanks and keep hacking!

Cheers,
  -Brian
  Seattle, WA.

So, I installed Bazaar and then typed the following command:

bzr branch lp:libmemcached

But I get:

    bzr: warning: unsupported locale setting
  bzr could not set the application locale.
  Although this should be no problem for bzr itself, it might
  cause problems with some plugins. To investigate the issue,
  look at the output of the locale(1p) tool.
Not checking SSL certificate for xmlrpc.launchpad.net.
You have not informed bzr of your Launchpad ID, and you must do this to
write to Launchpad or access private data.  See "bzr help launchpad-login".
bzr: ERROR: Target directory "libmemcached" already exists.  

And if I try to run. / configure, and then I do, I get a lot of warnings like:

./libmemcached/server.hpp:82:62: warning: implicit conversion loses integer precision: 'uint64_t'
  (aka 'unsigned long long') to 'uint32_t' (aka 'unsigned int') [-Wshorten-64-to-32]

libmemcached/csl/scanner.cc:2070:2: warning: 'register' storage class specifier is deprecated
      [-Wdeprecated-register]

libmemcached/byteorder.cc:75:10: error: use of undeclared identifier 'htonll'

And 2 errors:

2 errors generated.
make[1]: *** [libmemcached/libmemcached_libmemcached_la-byteorder.lo] Error 1
make: *** [all] Error 2

So actually I can not install libmemcached. Is there any option that I can try, how can I solve this problem? Why are all these errors?

!

.

+4
1

libmemcached OSX 10.10.3, script .

configure :

if ac_fn_cxx_try_compile "$LINENO"; then :
    ac_cv_have_htonll=yes
else
    ac_cv_have_htonll=no
fi

ac_cv_have_htonll=no

clients/memflush.cc :

if (opt_servers == false)

if (opt_servers == NULL)

configure, make, sudo make install ( ). , , , pylibmc .

+7

All Articles