Libmemcached cinttypes problem on complie using gc++ complier for memcached library

---------------------------------------------------------------------------------------------------------
Problem
---------------------------------------------------------------------------------------------------------
The compilation failed on a configure without any options:
----
  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
In file included from ./libmemcached/common.h:72,
                 from ./libmemcached/csl/common.h:40,
                 from libmemcached/csl/context.cc:38:
./libmemcached-1.0/memcached.h:46:27: error: tr1/cinttypes: No such file or directory
make[1]: *** [libmemcached/csl/libmemcached_libmemcached_la-context.lo] Error 1
make[1]: Leaving directory `/root/libmemcached/libmemcached-1.0.8'
make: *** [all] Error 2
---------------------------------------------------------------------------------------------------------
Solution
--------------------------------------------------------------------------------------------------------- 
This issue occurs because of complier version problem. So we should the gc++ complier. Use below command to install gc++ improved version.

If you login with root previliage, you can use below command.

yum install gcc44 gcc44-c++ libstdc++44-devel

If your not root user, please user below command

sudo yum install gcc44 gcc44-c++ libstdc++44-devel

Once you have installed, compile the libmemcached using below command.

CC=gcc44 CXX=g++44 ./configure

Now your should be able to compile without issue.

Comments

Popular posts from this blog

Azure Cloud service problem "The current service model is out of sync"

Creating an Image Watermark

Drupal 8 Media Library with SVG upload