我尝试使用libmemcached-1.0.18
中的libsasl2
和/usr/lib/x86_64-linux-gnu/libsasl2.so
中的memcached
在Debian Wheezy上构建/usr/bin/memcached
。当我运行./configure --with-memcached-sasl --prefix=/opt/libmemcached
时,我最终得到以下配置:
Configuration summary for libmemcached version 1.0.18
* Installation prefix: /opt/libmemcached
* System type: unknown-linux-gnu
* Host CPU: x86_64
* C Compiler: cc (Debian 4.7.2-5) 4.7.2
* C Flags: -g -O2 -Wno-unknown-pragmas -Wno-pragmas -Wall -Wextra -Wunsuffixed-float-constants -Wjump-misses-init -Wno-attributes -Waddress -Warray-bounds -Wbad-function-cast -Wchar-subscripts -Wcomment -Wfloat-equal -Wformat-security -Wformat=2 -Wformat-y2k -Wlogical-op -Wmaybe-uninitialized -Wmissing-field-initializers -Wmissing-noreturn -Wmissing-prototypes -Wnested-externs -Wnormalized=id -Woverride-init -Wpointer-arith -Wpointer-sign -Wredundant-decls -Wshadow -Wsign-compare -Wstrict-overflow=1 -Wswitch-enum -Wtrampolines -Wundef -Wunsafe-loop-optimizations -funsafe-loop-optimizations -Wclobbered -Wunused -Wunused-result -Wunused-variable -Wunused-parameter -Wunused-local-typedefs -Wwrite-strings -fwrapv -pipe -fPIE -pie -Wpacked
* C++ Compiler: c++ (Debian 4.7.2-5) 4.7.2
* C++ Flags: -g -O2 -Wno-unknown-pragmas -Wno-pragmas -Wall -Wextra -Wno-attributes -Waddress -Warray-bounds -Wchar-subscripts -Wcomment -Wctor-dtor-privacy -Wfloat-equal -Wformat=2 -Wformat-y2k -Wmaybe-uninitialized -Wmissing-field-initializers -Wlogical-op -Wnon-virtual-dtor -Wnormalized=id -Woverloaded-virtual -Wpointer-arith -Wredundant-decls -Wshadow -Wsign-compare -Wstrict-overflow=1 -Wswitch-enum -Wtrampolines -Wundef -Wunsafe-loop-optimizations -funsafe-loop-optimizations -Wc++11-compat -Wclobbered -Wunused -Wunused-result -Wunused-variable -Wunused-parameter -Wunused-local-typedefs -Wwrite-strings -Wformat-security -fwrapv -pipe -fPIE -pie -Wpacked
* CPP Flags: -fvisibility=hidden
* LIB Flags:
* Assertions enabled: no
* Debug enabled: no
* Shared: yes
* Warnings as failure: no
* SASL support: yes
* make -j: 3
* VCS checkout: no
然而,当我使用make && make install
构建时,生成的libmemcached.so
缺少sasl_*
个符号定义。这打破了pylibmc
。这是nm -D /opt/libmemcached/lib/libmemcached.so
的输出:
...
U sasl_client_init
U sasl_client_new
U sasl_client_start
U sasl_client_step
U sasl_dispose
U sasl_done
U sasl_errstring
...
我应该使用哪些选项./configure
来构建libmemcached
并支持SASL?
答案 0 :(得分:0)
我用" - enable-sasl"选项。这对我有用。