awslabs / aws-elasticache-cluster-client-libmemcached

Libmemcached library support for Amazon ElastiCache Memcached Cluster for PHP. The client is available at https://github.com/awslabs/aws-elasticache-cluster-client-memcached-for-php.
Other
26 stars 24 forks source link

Error compiling on Ubuntu 14.04 #1

Closed dbabst closed 9 years ago

dbabst commented 9 years ago

I've been trying to compile on a stock Ubuntu 14.04 LTS server in vagrant. All of the necessary packages are installed.

Every time I run make I get the following error:

make[1]: *** No rule to make target `libmemcached-1.0/struct/configuration_server.h', needed by `all-am'.  Stop.
make[1]: Leaving directory `/tmp/aws-elasticache-cluster-client-libmemcached'
make: *** [all] Error 2

Here are the steps I'm using. I don't edit the Makefile as it isn't as reliable as updating configure, but the results are the same anyway.

cd /tmp
git clone https://github.com/awslabs/aws-elasticache-cluster-client-libmemcached.git
cd aws-elasticache-cluster-client-libmemcached
aclocal
automake --add-missing
automake
sed -i "s|-Werror -pedantic|-pedantic|g" configure
sed -i "s|-Werror -Wcheck|-Wcheck|g" configure
sed -i "s|CFLAGS -Werror|CFLAGS|g" configure
./configure --prefix=/usr/local
make
make install

./config summary


---
Configuration summary for libmemcached version 1.0.8

   * Installation prefix:       /usr/local
   * System type:               unknown-linux-gnu
   * Host CPU:                  x86_64
   * C Compiler:                gcc (Ubuntu 4.8.4-2ubuntu1~14.04) 4.8.4
   * Assertions enabled:        yes
   * Debug enabled:             no
   * Warnings as failure:       no
   * SASL support:

---

The file `libmemcached-1.0/struct/configuration_server.h' is missing:

root@WB Base Ubuntu 14:/tmp/aws-elasticache-cluster-client-libmemcached# ls -al libmemcached-1.0/struct/
total 56
drwxr-xr-x 2 root root 4096 Sep  1 22:40 .
drwxr-xr-x 5 root root 4096 Sep  1 22:41 ..
-rw-r--r-- 1 root root 1869 Sep  1 22:40 allocator.h
-rw-r--r-- 1 root root 1990 Sep  1 22:40 analysis.h
-rw-r--r-- 1 root root 1816 Sep  1 22:40 callback.h
-rw-r--r-- 1 root root  542 Sep  1 22:40 include.am
-rw-r--r-- 1 root root 5237 Sep  1 22:40 memcached.h
-rw-r--r-- 1 root root 2075 Sep  1 22:40 result.h
-rw-r--r-- 1 root root 2019 Sep  1 22:40 sasl.h
-rw-r--r-- 1 root root 4136 Sep  1 22:40 server.h
-rw-r--r-- 1 root root 2614 Sep  1 22:40 stat.h
-rw-r--r-- 1 root root 2171 Sep  1 22:40 string.h
QuChen88 commented 9 years ago

I was able to compile libmemcached on Ubuntu 14.04.2 LTS AMI. I have updated the README.md file with compilation instructions on Ubuntu.

dbabst commented 9 years ago

In order to get it to compile I had to do the configure/make in a build subdirectory.

      cd /var/tmp
      git clone https://github.com/awslabs/aws-elasticache-cluster-client-libmemcached.git
      cd aws-elasticache-cluster-client-libmemcached
      mkdir build
      cd build
      ../configure
      make
      make install