Issues with rlm_cache_memcached in 3.0.7
Kyle Birkeland
kbirkela at utk.edu
Mon Apr 13 23:35:54 CEST 2015
That did it; thanks!
Also, the memcached module fails on './configure' on CentOS 7 due to an undefined reference to `pthread_once'.
Excerpt from config.log (full attached):
configure:2994: gcc -c -g -O2 conftest.c >&5
configure:2994: $? = 0
configure:2997: result: yes
configure:3169: checking for memcached in -lmemcached
configure:3183: gcc -o conftest -g -O2 conftest.c -lmemcached >&5
/usr/lib/gcc/x86_64-redhat-linux/4.8.3/../../../../lib64/libmemcached.so: undefined reference to `pthread_once'
collect2: error: ld returned 1 exit status
configure:3183: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE_URL ""
| /* end confdefs.h. */
| extern char memcached();
| int
| main ()
| {
| memcached()
| ;
| return 0;
| }
configure:3190: result: no
I worked around it with the following:
[root at radiustest ~/freeradius-server]# git diff
diff --git a/src/modules/rlm_cache/drivers/rlm_cache_memcached/configure b/src/modules/rlm_cache/drivers/rlm_cache_memcached/configure
index 72eede2..4ca8994 100755
--- a/src/modules/rlm_cache/drivers/rlm_cache_memcached/configure
+++ b/src/modules/rlm_cache/drivers/rlm_cache_memcached/configure
@@ -3124,7 +3124,7 @@ sm_lib_safe=`echo "memcached" | sed 'y%./+-%__p_%'`
sm_func_safe=`echo "memcached" | sed 'y%./+-%__p_%'`
old_LIBS="$LIBS"
-old_CPPFLAGS="$CPPFLAGS"
+old_CPPFLAGS="$CPPFLAGS -pthread"
smart_lib=
smart_ldflags=
smart_lib_dir=
[root at radiustest ~/freeradius-server]#
Just thought you may want to know that.
Thanks again,
Kyle
On Mon, Apr 13, 2015 at 05:18:16PM -0400, Arran Cudbard-Bell wrote:
>
> > On 13 Apr 2015, at 16:59, Kyle Birkeland <kbirkela at utk.edu> wrote:
> >
> > Hello,
> >
> > I'm trying to get rlm_cache_memcached working, but I'm having some
> > issues with freeradius merging the values from memcached - all my
> > values get truncated. Am I doing it wrong or is this a bug?
>
> Pushed a fix. Could you try with v3.0.x HEAD.
>
> https://github.com/FreeRADIUS/freeradius-server/archive/v3.0.x.zip
>
> Arran Cudbard-Bell <a.cudbardb at freeradius.org>
> FreeRADIUS development team
>
> FD31 3077 42EC 7FCD 32FE 5EE2 56CF 27F9 30A8 CAA2
>
> -
> List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
-------------- next part --------------
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by configure, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ ./configure
## --------- ##
## Platform. ##
## --------- ##
hostname = radiustest.ns.utk.edu
uname -m = x86_64
uname -r = 3.10.0-229.1.2.el7.x86_64
uname -s = Linux
uname -v = #1 SMP Fri Mar 27 03:04:26 UTC 2015
/usr/bin/uname -p = x86_64
/bin/uname -X = unknown
/bin/arch = x86_64
/usr/bin/arch -k = unknown
/usr/convex/getsysinfo = unknown
/usr/bin/hostinfo = unknown
/bin/machine = unknown
/usr/bin/oslevel = unknown
/bin/universe = unknown
PATH: /sbin
PATH: /bin
PATH: /usr/sbin
PATH: /usr/bin
PATH: /usr/local/sbin
PATH: /usr/local/bin
PATH: /usr/local/sbin
## ----------- ##
## Core tests. ##
## ----------- ##
configure:1950: checking for gcc
configure:1966: found /bin/gcc
configure:1977: result: gcc
configure:2206: checking for C compiler version
configure:2215: gcc --version >&5
gcc (GCC) 4.8.3 20140911 (Red Hat 4.8.3-9)
Copyright (C) 2013 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
configure:2226: $? = 0
configure:2215: gcc -v >&5
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/4.8.3/lto-wrapper
Target: x86_64-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-linker-hash-style=gnu --enable-languages=c,c++,objc,obj-c++,java,fortran,ada,go,lto --enable-plugin --enable-initfini-array --disable-libgcj --with-isl=/builddir/build/BUILD/gcc-4.8.3-20140911/obj-x86_64-redhat-linux/isl-install --with-cloog=/builddir/build/BUILD/gcc-4.8.3-20140911/obj-x86_64-redhat-linux/cloog-install --enable-gnu-indirect-function --with-tune=generic --with-arch_32=x86-64 --build=x86_64-redhat-linux
Thread model: posix
gcc version 4.8.3 20140911 (Red Hat 4.8.3-9) (GCC)
configure:2226: $? = 0
configure:2215: gcc -V >&5
gcc: error: unrecognized command line option '-V'
gcc: fatal error: no input files
compilation terminated.
configure:2226: $? = 4
configure:2215: gcc -qversion >&5
gcc: error: unrecognized command line option '-qversion'
gcc: fatal error: no input files
compilation terminated.
configure:2226: $? = 4
configure:2246: checking whether the C compiler works
configure:2268: gcc conftest.c >&5
configure:2272: $? = 0
configure:2320: result: yes
configure:2323: checking for C compiler default output file name
configure:2325: result: a.out
configure:2331: checking for suffix of executables
configure:2338: gcc -o conftest conftest.c >&5
configure:2342: $? = 0
configure:2364: result:
configure:2386: checking whether we are cross compiling
configure:2394: gcc -o conftest conftest.c >&5
configure:2398: $? = 0
configure:2405: ./conftest
configure:2409: $? = 0
configure:2424: result: no
configure:2429: checking for suffix of object files
configure:2451: gcc -c conftest.c >&5
configure:2455: $? = 0
configure:2476: result: o
configure:2480: checking whether we are using the GNU C compiler
configure:2499: gcc -c conftest.c >&5
configure:2499: $? = 0
configure:2508: result: yes
configure:2517: checking whether gcc accepts -g
configure:2537: gcc -c -g conftest.c >&5
configure:2537: $? = 0
configure:2578: result: yes
configure:2595: checking for gcc option to accept ISO C89
configure:2658: gcc -c -g -O2 conftest.c >&5
configure:2658: $? = 0
configure:2671: result: none needed
configure:2696: checking how to run the C preprocessor
configure:2727: gcc -E conftest.c
configure:2727: $? = 0
configure:2741: gcc -E conftest.c
conftest.c:9:28: fatal error: ac_nonexistent.h: No such file or directory
#include <ac_nonexistent.h>
^
compilation terminated.
configure:2741: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE_URL ""
| /* end confdefs.h. */
| #include <ac_nonexistent.h>
configure:2766: result: gcc -E
configure:2786: gcc -E conftest.c
configure:2786: $? = 0
configure:2800: gcc -E conftest.c
conftest.c:9:28: fatal error: ac_nonexistent.h: No such file or directory
#include <ac_nonexistent.h>
^
compilation terminated.
configure:2800: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE_URL ""
| /* end confdefs.h. */
| #include <ac_nonexistent.h>
configure:2979: checking for libmemcached/memcached.h
configure:2994: gcc -c -g -O2 conftest.c >&5
configure:2994: $? = 0
configure:2997: result: yes
configure:3169: checking for memcached in -lmemcached
configure:3183: gcc -o conftest -g -O2 conftest.c -lmemcached >&5
/usr/lib/gcc/x86_64-redhat-linux/4.8.3/../../../../lib64/libmemcached.so: undefined reference to `pthread_once'
collect2: error: ld returned 1 exit status
configure:3183: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE_URL ""
| /* end confdefs.h. */
| extern char memcached();
| int
| main ()
| {
| memcached()
| ;
| return 0;
| }
configure:3190: result: no
configure:3255: checking for memcached in -lmemcached in /usr/local/lib
configure:3270: gcc -o conftest -g -O2 -L/usr/local/lib -Wl,-rpath,/usr/local/lib conftest.c -lmemcached >&5
/usr/lib/gcc/x86_64-redhat-linux/4.8.3/../../../../lib64/libmemcached.so: undefined reference to `pthread_once'
collect2: error: ld returned 1 exit status
configure:3270: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE_URL ""
| /* end confdefs.h. */
| extern char memcached();
| int
| main ()
| {
| memcached()
| ;
| return 0;
| }
configure:3279: result: no
configure:3255: checking for memcached in -lmemcached in /opt/lib
configure:3270: gcc -o conftest -g -O2 -L/opt/lib -Wl,-rpath,/opt/lib conftest.c -lmemcached >&5
/usr/lib/gcc/x86_64-redhat-linux/4.8.3/../../../../lib64/libmemcached.so: undefined reference to `pthread_once'
collect2: error: ld returned 1 exit status
configure:3270: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE_URL ""
| /* end confdefs.h. */
| extern char memcached();
| int
| main ()
| {
| memcached()
| ;
| return 0;
| }
configure:3279: result: no
configure:3297: WARNING: libmemcached libraries not found. Use --with-libmemcached-lib-dir=<path>.
configure:3334: WARNING: silently not building rlm_cache_memcached.
configure:3336: WARNING: FAILURE: rlm_cache_memcached requires: libmemcached .
configure:3505: creating ./config.status
## ---------------------- ##
## Running config.status. ##
## ---------------------- ##
This file was extended by config.status, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES =
CONFIG_HEADERS =
CONFIG_LINKS =
CONFIG_COMMANDS =
$ ./config.status
on radiustest.ns.utk.edu
config.status:722: creating all.mk
## ---------------- ##
## Cache variables. ##
## ---------------- ##
ac_cv_c_compiler_gnu=yes
ac_cv_env_CC_set=
ac_cv_env_CC_value=
ac_cv_env_CFLAGS_set=
ac_cv_env_CFLAGS_value=
ac_cv_env_CPPFLAGS_set=
ac_cv_env_CPPFLAGS_value=
ac_cv_env_CPP_set=
ac_cv_env_CPP_value=
ac_cv_env_LDFLAGS_set=
ac_cv_env_LDFLAGS_value=
ac_cv_env_build_alias_set=
ac_cv_env_build_alias_value=
ac_cv_env_host_alias_set=
ac_cv_env_host_alias_value=
ac_cv_env_target_alias_set=
ac_cv_env_target_alias_value=
ac_cv_header_libmemcached_memcached_h=yes
ac_cv_objext=o
ac_cv_prog_CPP='gcc -E'
ac_cv_prog_ac_ct_CC=gcc
ac_cv_prog_cc_c89=
ac_cv_prog_cc_g=yes
## ----------------- ##
## Output variables. ##
## ----------------- ##
CC='gcc'
CFLAGS='-g -O2'
CPP='gcc -E'
CPPFLAGS=' '
DEFS='-DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\"'
ECHO_C=''
ECHO_N='-n'
ECHO_T=''
EXEEXT=''
LDFLAGS=''
LIBOBJS=''
LIBS=''
LTLIBOBJS=''
OBJEXT='o'
PACKAGE_BUGREPORT=''
PACKAGE_NAME=''
PACKAGE_STRING=''
PACKAGE_TARNAME=''
PACKAGE_URL=''
PACKAGE_VERSION=''
PATH_SEPARATOR=':'
SHELL='/bin/sh'
ac_ct_CC='gcc'
bindir='${exec_prefix}/bin'
build_alias=''
datadir='${datarootdir}'
datarootdir='${prefix}/share'
docdir='${datarootdir}/doc/${PACKAGE}'
dvidir='${docdir}'
exec_prefix='${prefix}'
host_alias=''
htmldir='${docdir}'
includedir='${prefix}/include'
infodir='${datarootdir}/info'
libdir='${exec_prefix}/lib'
libexecdir='${exec_prefix}/libexec'
localedir='${datarootdir}/locale'
localstatedir='${prefix}/var'
mandir='${datarootdir}/man'
mod_cflags=' '
mod_ldflags=' '
oldincludedir='/usr/include'
pdfdir='${docdir}'
prefix='/usr/local'
program_transform_name='s,x,x,'
psdir='${docdir}'
sbindir='${exec_prefix}/sbin'
sharedstatedir='${prefix}/com'
sysconfdir='${prefix}/etc'
target_alias=''
targetname=''
## ----------- ##
## confdefs.h. ##
## ----------- ##
/* confdefs.h */
#define PACKAGE_NAME ""
#define PACKAGE_TARNAME ""
#define PACKAGE_VERSION ""
#define PACKAGE_STRING ""
#define PACKAGE_BUGREPORT ""
#define PACKAGE_URL ""
configure: exit 0
More information about the Freeradius-Users
mailing list