RJ / ketama

C library for consistent hashing, and langauge bindings

Home Page:http://www.metabrew.com/article/libketama-consistent-hashing-algo-memcached-clients

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Unable to compile php-extension in Ubuntu 12.10

sfernandez opened this issue · comments

Once properly compiled and installed libketama (installed in /usr/lib), I'm unable to compile the php extension.

steps:

  • phpize
  • configure
    and the following error will appear:
    checking for ketama_roll in -lketama... no

Ok the solution is the following;

  • change the following line of libketama Makefile build target:
    gcc -shared -Wl,-soname,libketama.so.1 -o libketama.so.1 -lm ketama.o md5.o ---> gcc -shared
    -Wl,-soname,libketama.so.1 -o libketama.so.1 ketama.o md5.o -lm

in php_ketama execute ./configure --with-ketama instead of ./configure