arthurnn / memcached

A Ruby interface to the libmemcached C client
Academic Free License v3.0
432 stars 125 forks source link

compile error in memcached gem #17

Closed jboutelle closed 14 years ago

jboutelle commented 14 years ago

Greetings Even,

We are looking to use the memcached ruby gem that you wrote to help with performance. We encountered this compilation bug when we attempted to install the gem.

Thoughts / ideas?

Actions taken:

  1. clean EC2 instance US-West: ami-e32273a6 (CentOS 5.4) m1.small (32 bit)
  2. compiled and installed: libevent-1.4.13-stable
  3. compiled and installed: memcached-1.4.5
  4. created /etc/ld.so.conf.d/memcached.conf 1 line of content: /usr/local/lib
  5. gem install memcached

Skipping a lot of compiling information; this was the error we received:

creating Makefile

make gcc -I. -I/usr/lib/ruby/1.8/i386-linux -I/usr/lib/ruby/1.8/i386-linux -I. -fPIC -I/usr/lib/ruby/gems/1.8/gems/memcached-0.19.2/ext/include -L/usr/lib/ruby/gems/1.8/gems/memcached-0.19.2/ext/lib -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables -Wall -fno-strict-aliasing -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables -Wall -fno-strict-aliasing -fPIC -c rlibmemcached_wrap.c rlibmemcached_wrap.c: In function '_wrap_MemcachedSt_sasl_callbacks_set': rlibmemcached_wrap.c:6669: error: 'sasl_callback_t' undeclared (first use in this function) rlibmemcached_wrap.c:6669: error: (Each undeclared identifier is reported only once rlibmemcached_wrap.c:6669: error: for each function it appears in.) rlibmemcached_wrap.c:6669: error: 'arg2' undeclared (first use in this function) rlibmemcached_wrap.c:6669: error: expected expression before ')' token rlibmemcached_wrap.c:6687: error: expected expression before ')' token rlibmemcached_wrap.c:6688: error: 'struct memcached_st' has no member named 'sasl_callbacks' rlibmemcached_wrap.c:6688: error: expected ')' before 'const' rlibmemcached_wrap.c:6688: error: expected ';' before 'arg2' rlibmemcached_wrap.c: In function '_wrap_MemcachedSt_sasl_callbacks_get': rlibmemcached_wrap.c:6700: error: 'sasl_callback_t' undeclared (first use in this function) rlibmemcached_wrap.c:6700: error: 'result' undeclared (first use in this function) rlibmemcached_wrap.c:6711: error: expected expression before ')' token rlibmemcached_wrap.c:6711: error: 'struct memcached_st' has no member named 'sasl_callbacks' rlibmemcached_wrap.c: In function '_wrap_memcached_set_sasl_callbacks': rlibmemcached_wrap.c:12021: error: 'sasl_callback_t' undeclared (first use in this function) rlibmemcached_wrap.c:12021: error: 'arg2' undeclared (first use in this function) rlibmemcached_wrap.c:12021: error: expected expression before ')' token rlibmemcached_wrap.c:12039: error: expected expression before ')' token rlibmemcached_wrap.c:12040: warning: implicit declaration of function 'memcached_set_sasl_callbacks' rlibmemcached_wrap.c:12040: error: expected ')' before 'const' rlibmemcached_wrap.c:12040: error: expected ')' before 'arg2' rlibmemcached_wrap.c: In function '_wrap_memcached_set_sasl_auth_data': rlibmemcached_wrap.c:12081: warning: implicit declaration of function 'memcached_set_sasl_auth_data' rlibmemcached_wrap.c: In function '_wrap_memcached_destroy_sasl_auth_data': rlibmemcached_wrap.c:12109: warning: implicit declaration of function 'memcached_destroy_sasl_auth_data' rlibmemcached_wrap.c: In function '_wrap_memcached_get_sasl_callbacks': rlibmemcached_wrap.c:12122: error: 'sasl_callback_t' undeclared (first use in this function) rlibmemcached_wrap.c:12122: error: 'result' undeclared (first use in this function) rlibmemcached_wrap.c:12133: error: expected expression before ')' token rlibmemcached_wrap.c: In function '_wrap_memcached_sasl_authenticate_connection': rlibmemcached_wrap.c:12157: warning: implicit declaration of function 'memcached_sasl_authenticate_connection' rlibmemcached_wrap.c: In function 'Init_rlibmemcached': rlibmemcached_wrap.c:13285: warning: implicit declaration of function 'sasl_client_init' rlibmemcached_wrap.c:13285: error: 'SASL_OK' undeclared (first use in this function) make: *\ [rlibmemcached_wrap.o] Error 1

Gem files will remain installed in /usr/lib/ruby/gems/1.8/gems/memcached-0.19.2 for inspection. Results logged to /usr/lib/ruby/gems/1.8/gems/memcached-0.19.2/ext/gem_make.out [root@ip-10-160-255-245 ~]# exit

ghost commented 14 years ago

Not sure but you may need a SASL2 development package installed on Centos.

seamusabshere commented 14 years ago

fauna's suggestion worked for me on vagrant/ubuntu:

sudo apt-get install libsasl2-dev

asoules commented 14 years ago

libsasl2-dev fixed this problem for me, on Ubuntu 9.10.

darscan commented 14 years ago

Seems that libsasl2 is called cyrus-sasl on Centos, but even after installing cyrus-sasl and cyrus-sasl-devel I couldn't get the gem to install. Has anyone managed to get this running on Centos?

chirantan commented 14 years ago

I already have libsasl2-dev installed but I still got this issue on Ubuntu 10.04 - the Lucid Lynx. This was because I already had a partial (failed) gem installation in my gems directory. I did an rm -rf on the directory and has tried re-installing the gem. This time it worked.

ajeje commented 13 years ago

I had the same problem on Ubuntu 11.04. Installing libsasl2-dev fixed the problem for me.

lanrion commented 12 years ago

me too.

padcom commented 12 years ago

Works with Ubuntu 12.04 too

egonSchiele commented 11 years ago

extconf didn't notify me about sasl, but installing cyrus-sasl and cyrus-sasl-devel on CentOS v 6.3 worked for me.