[pgpool-hackers: 176] Re: Possible issue with configure.in (?)

Tatsuo Ishii ishii at postgresql.org
Wed Mar 20 20:16:57 JST 2013


Can you show me config.log?
--
Tatsuo Ishii
SRA OSS, Inc. Japan
English: http://www.sraoss.co.jp/index_en.php
Japanese: http://www.sraoss.co.jp

> Hi,
> 
> On my machine it seems that when the --with-memcached configuration option is set, the value of LIBS is overwritten and lost, which then causes an error about -lpq 'missing or old'
> 
>> uname -a
> FreeBSD dx.burplex.com 10.0-CURRENT FreeBSD 10.0-CURRENT #0 r248165: Mon Mar 11 18:20:30 PDT 2013     root at dx.burplex.com:/usr/obj/usr/src/sys/FURAHA  amd64
> 
> 
> 
> Example:
> 
> ./configure --with-memcached=/usr/local
> ..
> checking for libmemcached/memcached.h... yes
> checking for memcached_create in -lmemcached... yes
> checking for PQexecPrepared in -lpq... no
> configure: error: libpq is not installed or libpq is old
> 
> When I added OLD_LIBS=$LIBS before the memcached check, then restored the value with LIBS=$OLD_LIBS afterward, it seems to solve the problem.
> 
> ie, 
> [1318] > diff -u configure.in /tmp/configure.in 
> --- configure.in	2013-02-17 17:50:16.000000000 -0800
> +++ /tmp/configure.in	2013-03-16 11:05:22.000000000 -0700
> @@ -321,6 +321,7 @@
>    MEMCACHED_INCLUDE_DIR="$withval"/include
>    MEMCACHED_LIB_DIR="$withval"/lib
>    OLD_CFLAGS="$CFLAGS"
> +  OLD_LIBS="$LIBS"
>    CFLAGS="$CFLAGS -I$MEMCACHED_INCLUDE_DIR"
>      AC_CHECK_HEADERS(
>        [libmemcached/memcached.h],
> @@ -338,6 +339,7 @@
>  AC_SUBST(MEMCACHED_INCLUDE_OPT)
>  AC_SUBST(MEMCACHED_LINK_OPT)
>  AC_SUBST(MEMCACHED_RPATH_OPT)
> +LIBS="$OLD_LIBS"
>  
>  OLD_LDFLAGS="$LDFLAGS"
>  LDFLAGS="-L$PGSQL_LIB_DIR"
> 
> 
> 
> After running autoconf to regenerate configure,
> ./configure --with-memcached=/usr/local
> ..
> checking for libmemcached/memcached.h... yes
> checking for memcached_create in -lmemcached... yes
> checking for PQexecPrepared in -lpq... yes
> checking for PQprepare... yes
> ..
> 
> It seems to work.
> 
> Thank you,
> 
> -- 
> Waitman Gobble
> San Jose California USA


More information about the pgpool-hackers mailing list