我试着在Debian气喘上建立libmemcached-1.0.18,在libsasl2中建立/usr/lib/x86_64-linux-gnu/libsasl2.so,在memcached中建立/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的哪些选项来构建具有sasl支持的libmemcached

最佳答案

我用“-enable sasl”选项来实现。那对我有用。

关于linux - 在Debian Wheezy上使用SASL构建libmemcached,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/25200501/

10-10 20:07