Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm trying to build libmemcached with SASL support on OS X Mountain Lion.

I have built memcached (1.4.15) with SASL support:

    $ memcached -S -vv
    Initialized SASL.
    slab class   1: chunk size        96 perslab   10922
    ...
    slab class  42: chunk size   1048576 perslab       1
    <17 server listening (binary)
    <18 server listening (binary)
    <19 send buffer was 9216, now 3728270
    <20 send buffer was 9216, now 3728270
    <19 server listening (udp)
    <20 server listening (udp)
    ...

I am trying to build libmemcached with SASL support too. I have tried the following:

    $ ./configure --prefix=/usr/local \
      --with-memcached-sasl=/usr/local/bin/memcached
    ...
    $ ./configure --prefix=/usr/local \
      --with-memcached-sasl="/usr/local/bin/memcached -S"
    ...

But the resulting configuration summary is the same for both:

Configuration summary for libmemcached version 1.0.11
       * Installation prefix:       /usr/local
       * System type:               apple-darwin12.2.0
       * Host CPU:                  x86_64
       * C Compiler:                i686-apple-darwin11-llvm-gcc-4.2 (GCC) 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.11.00)
       * C Flags:                    -O2 -Werror -Wall -Wextra -std=c99 -Wbad-function-cast -Wmissing-prototypes -Wnested-externs -Woverride-init
       * C++ Compiler:              i686-apple-darwin11-llvm-g++-4.2 (GCC) 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.11.00)
       * C++ Flags:                  -O2 -Werror -Wall -Wextra -Wpragmas -D_FORTIFY_SOURCE=2 -Waddress -Wchar-subscripts -Wcomment -Wctor-dtor-privacy -Wfloat-equal -Wformat=2 -Wmissing-field-initializers -Wmissing-noreturn -Wnon-virtual-dtor -Wnormalized=id -Woverloaded-virtual -Wpointer-arith -Wredundant-decls -Wshadow -Wshorten-64-to-32 -Wsign-compare -Wstrict-overflow=1 -Wswitch-enum -Wundef -Wunused-variable -Wwrite-strings -fwrapv -ggdb
       * CPP Flags:                 -I/usr/local/include
       * Assertions enabled:        no
       * Debug enabled:             no
       * Warnings as failure:       no
       * SASL support:              

Am I doing something incorrectly? Thanks.

share|improve this question
    
It works when I set ac_enable_sasl=1. Is this a variable that is supposed to be set by autoconf? It seems like a cheat to me. –  John Keyes Sep 24 '12 at 23:25
    
My mistake, pylibmc still raises TypeError: libmemcached does not support SASL. –  John Keyes Sep 24 '12 at 23:32
    
These comments should probably be added to your post, FYI. –  HopelessN00b Oct 8 '12 at 1:06
    
Why? My second comment was to clarify that my first comment was incorrect. –  John Keyes Oct 8 '12 at 12:42
add comment

2 Answers

This is not possible on OS X Mountain Lion (and possibly other versions of OS X). I'm going to raise the issue with the libmemcached team.

share|improve this answer
    
Issue URL: bugs.launchpad.net/libmemcached/+bug/1056093 –  John Keyes Sep 25 '12 at 10:49
add comment

OK so here is a way, it's obviously not the 'correct' way but SASL support in libmemcached seems somewhat bitrotted.

  1. Download libmemcached-1.0.8 (1.0.9 and later require code modifications sadly as SASL support hasn't been kept up-to-date with changes in the code).

  2. Untar, change to folder.

  3. sed -i -e s/ax_cv_sasl/ac_enable_sasl/ m4/ax_sasl.m4

  4. sed -i -e "s/-pthread -pthreads/-lpthread -lpthreads/" m4/ax_pthread.m4

  5. ./configure

  6. make

  7. sudo make install

This should get it up and running on OSX (you need to do the same on Linux, or at least I did with Ubuntu).

share|improve this answer
1  
Hi David, I tried this and the results of the configure (codepad.org/SN414faT) still do not indicate SASL support. Is that true or just a reporting bug? –  John Keyes Oct 8 '12 at 9:04
    
I've followed the steps and it does appear that SASL support was compiled (codepad.org/MSIV76ir) but after following these steps (trondn.blogspot.fr/2010/02/…) it appears that the build was unsuccessful (codepad.org/haQ6AB6Z). –  John Keyes Oct 8 '12 at 22:29
    
Hey John, one thing I had wrong was I recommended libmemcached 1.0.9. I should have said 1.0.8. The later version requires a small change to the code, it's an easy one but I'd say just use 1.0.8 as the above instructions work fine for it. –  David Terei Nov 8 '12 at 20:40
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.