EnterpriseDB: The Enterprise Postgres Company Postgres Plus Forums: The PostgreSQL Open Source Database from EnterpriseDB
  [Search] Search   [Recent Topics] Recent Topics   [Hottest Topics] Hottest Topics   [Members]  Member Listing   [Groups] Back to home page 

libpq is not installed or libpq is old  XML

Forum Index » Postgres Plus Advanced Server
Author Message
gurkan_o

New member

Joined: 29 Sep 2006 00:18:21
Messages: 4
Offline

Hi,
I am using enterprisdb for our cluster, and pgpool is also is in our part of equation.
I have tried to install(configure) pgpool-II, and it gives the below message
-------------------
checking for strtok... yes
checking for asprintf... yes
checking for PQprepare in -lpq... no
configure: error: libpq is not installed or libpq is old
-------------------
I have also tried this option(result was the same) ;
pgpool-II-1.0.1]# ./configure --with-pgsql-incluedir=/opt/EnterpriseDB/8.1.4.17/dbserver/include --with-pgsql-libdir=/opt/EnterpriseDB/8.1.4.17/dbserver/lib

Any help/idea from you guys what I might be missing?
(and I did also posted similar message to pgppol forums also)
Thanks for help.
shoaib1

Senior member
[Avatar]

Joined: 8 Aug 2007 05:04:08
Messages: 350
Location: Islamabad, Pakistan
Offline

I just tried the latest pgpool with the following configure statement:

./configure --with-pgsql=/opt/EnterpriseDB/8.1/dbserver

and it didnt give me a problem, but make sure you have

libpq.so.4 in /usr/lib folder

Hope this helps...

Thanks,

--
Shoaib Mir
Project Analyst
EnterpriseDB (www.enterprisedb.com)
[WWW] [MSN]
Anonymous



Hi,
Just to make sure. Did you try with pgpool-3.1.1 (which I do not have any issue with this version or prior to, there is new pgpool called pgpool-II (pgpool-II 1.0.1) that is the one giving me the problem. In my testing it slows down our application (pgppol-3.1.1 (not fast enough), I am trying to use new version pgpool-II hoping that it will be faster. this is something I have try it and see).

I did follows also (my machine is FC5 64 bit);
----------------------------
[root@baba1 pgpool-II-1.0.1]# locate libpq.so.4
/usr/lib64/libpq.so.4
/usr/lib64/libpq.so.4.1
----------------------------
AND

------------------------
in /usr/lib, I did symlink

lrwxrwxrwx 1 root root 21 Oct 2 15:25 libpq.so.4 -> /usr/lib64/libpq.so.4
------------------------

Thanks. if you try with pgpool-II, then could be
------------------------
shoaib2

Senior member

Joined: 25 Mar 2008 02:56:43
Messages: 333
Offline

I just tried it on a FC5 32 bit machine and it didn't give me any problem, it looks like that the 64 bit envoirnment is the reason here as the libpq you are using is a 32 bit specific one but pgpool is looking for 64 bit libpq which is causing a conflict here.

Thanks,
Anonymous



Hi,
I have tried to install in my host which is running FC2 and 32bit
1)
./configure (command gives the same error I had before checking for strtok... yes
checking for asprintf... yes
checking for PQprepare in -lpq... no
configure: error: libpq is not installed or libpq is old)
2)
./configure --with-pgsql=/opt/EnterpriseDB/8.1.4.17/dbserver
(it configured ok, but make command gives the error)
3)
I give the command make and gives the error below


IN FC2 32bit:
./configure gives error for (checking for PQprepare in -lpq... no)
make gives error (undefined reference to `PQprepare')

Since libpq comes with enterprisedb, is it something has changed with libpq?

Since I can configure it on FC564bit with 32bit enterprisedb
and it configures on FC2-32bit with 32bit enteprisedb and cannot make(make gives error)
Any help for these cases?

Thanks for help.


-------------------------------
[root@gurkan pgpool-II-1.0.1]# make
make all-recursive
make[1]: Entering directory `/tmp/pgpool-II-1.0.1'
Making all in parser
make[2]: Entering directory `/tmp/pgpool-II-1.0.1/parser'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/tmp/pgpool-II-1.0.1/parser'
Making all in pcp
make[2]: Entering directory `/tmp/pgpool-II-1.0.1/pcp'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/tmp/pgpool-II-1.0.1/pcp'
make[2]: Entering directory `/tmp/pgpool-II-1.0.1'
/bin/sh ./libtool --mode=link gcc -O3 -mcpu=pentium4 -march=pentium4 -mmmx -msse -msse2 -mfpmath=sse -o pgpool -lpq -Wl,-L,/opt/EnterpriseDB/8.1.4.17/dbserver/lib -Wl,-rpath,/opt/EnterpriseDB/8.1.4.17/dbserver/lib main.o child.o pool_auth.o pool_config.o pool_error.o pool_process_query.o pool_stream.o pool_connection_pool.o pool_params.o pool_signal.o pcp_child.o md5.o pool_shmem.o pool_sema.o pool_system.o pool_rewrite_query.o pool_rewrite_outfuncs.o pool_query_cache.o parser/libsql-parser.a pcp/libpcp.la -lresolv -lnsl -lm
mkdir .libs
gcc -O3 -mcpu=pentium4 -march=pentium4 -mmmx -msse -msse2 -mfpmath=sse -o .libs/pgpool -Wl,-L -Wl,/opt/EnterpriseDB/8.1.4.17/dbserver/lib -Wl,-rpath -Wl,/opt/EnterpriseDB/8.1.4.17/dbserver/lib main.o child.o pool_auth.o pool_config.o pool_error.o pool_process_query.o pool_stream.o pool_connection_pool.o pool_params.o pool_signal.o pcp_child.o md5.o pool_shmem.o pool_sema.o pool_system.o pool _rewrite_query.o pool_rewrite_outfuncs.o pool_query_cache.o -lpq parser/libsql-parser.a pcp/.libs/libpcp.so -lresolv -lnsl -lm -Wl,--rpath -Wl,/usr/local/lib
pool_system.o(.text+0xcec): In function `pool_get_id':
: undefined reference to `PQprepare'
pool_query_cache.o(.text+0x103a): In function `pool_query_cache_register':
: undefined reference to `PQprepare'
collect2: ld returned 1 exit status
make[2]: *** [pgpool] Error 1
make[2]: Leaving directory `/tmp/pgpool-II-1.0.1'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/tmp/pgpool-II-1.0.1'
make: *** [all] Error 2
-----------------------------
Anonymous



I mean (what I meant was cannot previois message for 64bit);
I cannot configure it on FC5-64bit
and
It configures on 32bit but make command gives error
shoaib1

Senior member
[Avatar]

Joined: 8 Aug 2007 05:04:08
Messages: 350
Location: Islamabad, Pakistan
Offline

In order to debug it further, I will like to see the output for configure command for which make is failing.

Thanks,

--
Shoaib Mir
Project Analyst
EnterpriseDB (www.enterprisedb.com)
[WWW] [MSN]
Anonymous



Hi,
I am sorry if I confused you already. Meaning, I really need to install on my servers which is running FC5-64bit with 32bit-Enterprisedb. On servers, I cannot configure it at all, with or without giving options. You guys try it and able install but (i believe) yours was on FC5-32bit. And just to see I tried on my actual host eventhough it wont solve my issue but hoping to be helpfull I have tried on my actual host and on my host, it configure only with option but make gives error. I have posted the outputs from my actual host, but just to make sure that my actual issue is not going wrong direction.

On my actual host which is running FC2-32bit
1)
-------------------------------
[root@gurkan pgpool-II-1.0.1]# ./configure
checking for gcc... gcc
checking for C compiler default output file name... a.out
...
...
checking for asprintf... yes
checking for PQprepare in -lpq... no
configure: error: libpq is not installed or libpq is old
-------------------------------

2)
-------------------------------
[root@gurkan pgpool-II-1.0.1]# ./configure --with-pgsql=/opt/EnterpriseDB/8.1.4.17/dbserver
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking for ranlib... ranlib
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking for a sed that does not truncate output... /bin/sed
checking for egrep... grep -E
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for /usr/bin/ld option to reload object files... -r
checking for BSD-compatible nm... /usr/bin/nm -B
checking whether ln -s works... yes
checking how to recognise dependent libraries... pass_all
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking dlfcn.h usability... yes
checking dlfcn.h presence... yes
checking for dlfcn.h... yes
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking dependency style of g++... gcc3
checking how to run the C++ preprocessor... g++ -E
checking for g77... g77
checking whether we are using the GNU Fortran 77 compiler... yes
checking whether g77 accepts -g... yes
checking the maximum length of command line arguments... 32768
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for objdir... .libs
checking for ar... ar
checking for ranlib... (cached) ranlib
checking for strip... strip
checking if gcc static flag works... yes
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC
checking if gcc PIC flag -fPIC works... yes
checking if gcc supports -c -o file.o... yes
checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
configure: creating libtool
appending configuration tag "CXX" to libtool
checking for ld used by g++... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes
checking for g++ option to produce PIC... -fPIC
checking if g++ PIC flag -fPIC works... yes
checking if g++ supports -c -o file.o... yes
checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
appending configuration tag "F77" to libtool
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking for g77 option to produce PIC... -fPIC
checking if g77 PIC flag -fPIC works... yes
checking if g77 supports -c -o file.o... yes
checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking for flex... flex
checking for yywrap in -lfl... yes
checking lex output file root... lex.yy
checking whether yytext is a pointer... yes
checking for bison... bison -y
checking for main in -lm... yes
checking for main in -lnsl... yes
checking for main in -lsocket... no
checking for main in -lipc... no
checking for main in -lIPC... no
checking for main in -llc... no
checking for main in -lcompat... no
checking for main in -lBSD... no
checking for main in -lgen... no
checking for main in -lPW... no
checking for main in -lresolv... yes
checking for ANSI C header files... (cached) yes
checking for sys/wait.h that is POSIX.1 compatible... yes
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking for unistd.h... (cached) yes
checking getopt.h usability... yes
checking getopt.h presence... yes
checking for getopt.h... yes
checking netinet/tcp.h usability... yes
checking netinet/tcp.h presence... yes
checking for netinet/tcp.h... yes
checking netinet/in.h usability... yes
checking netinet/in.h presence... yes
checking for netinet/in.h... yes
checking sys/param.h usability... yes
checking sys/param.h presence... yes
checking for sys/param.h... yes
checking for sys/types.h... (cached) yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking sys/sem.h usability... yes
checking sys/sem.h presence... yes
checking for sys/sem.h... yes
checking sys/shm.h usability... yes
checking sys/shm.h presence... yes
checking for sys/shm.h... yes
checking for an ANSI C-conforming const... yes
checking for pid_t... yes
checking whether time.h and sys/time.h may both be included... yes
checking for union semun... no
checking return type of signal handlers... void
checking for vprintf... yes
checking for _doprnt... no
checking for wait3 that fills in rusage... yes
checking for setsid... yes
checking for select... yes
checking for socket... yes
checking for sigprocmask... yes
checking for strdup... yes
checking for strerror... yes
checking for strftime... yes
checking for strtok... yes
checking for asprintf... yes
checking for PQprepare in -lpq... yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating parser/Makefile
config.status: creating pcp/Makefile
config.status: creating config.h
config.status: config.h is unchanged
config.status: executing depfiles commands
[root@gurkan pgpool-II-1.0.1]# make
make all-recursive
make[1]: Entering directory `/tmp/pgpool-II-1.0.1'
Making all in parser
make[2]: Entering directory `/tmp/pgpool-II-1.0.1/parser'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/tmp/pgpool-II-1.0.1/parser'
Making all in pcp
make[2]: Entering directory `/tmp/pgpool-II-1.0.1/pcp'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/tmp/pgpool-II-1.0.1/pcp'
make[2]: Entering directory `/tmp/pgpool-II-1.0.1'
/bin/sh ./libtool --mode=link gcc -O3 -mcpu=pentium4 -march=pentium4 -mmmx -msse -msse2 -mfpmath=sse -o pgpool -lpq -Wl,-L,/opt/EnterpriseDB/8.1.4.17/dbserver/lib -Wl,-rpath,/opt/EnterpriseDB/8.1.4.17/dbserver/lib main.o child.o pool_auth.o pool_config.o pool_error.o pool_process_query.o pool_stream.o pool_connection_pool.o pool_params.o pool_signal.o pcp_child.o md5.o pool_shmem.o pool_sema.o pool_system.o pool_rewrite_query.o pool_rewrite_outfuncs.o pool_query_cache.o parser/libsql-parser.a pcp/libpcp.la -lresolv -lnsl -lm
mkdir .libs
gcc -O3 -mcpu=pentium4 -march=pentium4 -mmmx -msse -msse2 -mfpmath=sse -o .libs/pgpool -Wl,-L -Wl,/opt/EnterpriseDB/8.1.4.17/dbserver/lib -Wl,-rpath -Wl,/opt/EnterpriseDB/8.1.4.17/dbserver/lib main.o child.o pool_auth.o pool_config.o pool_error.o pool_process_query.o pool_stream.o pool_connection_pool.o pool_params.o pool_signal.o pcp_child.o md5.o pool_shmem.o pool_sema.o pool_system.o pool_rewrite_query.o pool_rewrite_outfuncs.o pool_query_cache.o -lpq parser/libsql-parser.a pcp/.libs/libpcp.so -lresolv -lnsl -lm -Wl,--rpath -Wl,/usr/local/lib
pool_system.o(.text+0xcec): In function `pool_get_id':
: undefined reference to `PQprepare'
pool_query_cache.o(.text+0x103a): In function `pool_query_cache_register':
: undefined reference to `PQprepare'
collect2: ld returned 1 exit status
make[2]: *** [pgpool] Error 1
make[2]: Leaving directory `/tmp/pgpool-II-1.0.1'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/tmp/pgpool-II-1.0.1'
make: *** [all] Error 2
[root@gurkan pgpool-II-1.0.1]#
-------------------------------

thanks
shoaib2

Senior member

Joined: 25 Mar 2008 02:56:43
Messages: 333
Offline

Can you please try building pgpool with PostgreSQL on the same machine where make is giving a problem and let us know the results.

Thanks,
Anonymous



Hi,
You first requested to see output of configure where make gives error and now you just requested output of make, in fact I have posted on my previous message numberd by 2). Here is it again, this configures but make gives error on my host

2)
-------------------------------
[root@gurkan pgpool-II-1.0.1]# ./configure --with-pgsql=/opt/EnterpriseDB/8.1.4.17/dbserver
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking for ranlib... ranlib
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking for a sed that does not truncate output... /bin/sed
checking for egrep... grep -E
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for /usr/bin/ld option to reload object files... -r
checking for BSD-compatible nm... /usr/bin/nm -B
checking whether ln -s works... yes
checking how to recognise dependent libraries... pass_all
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking dlfcn.h usability... yes
checking dlfcn.h presence... yes
checking for dlfcn.h... yes
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking dependency style of g++... gcc3
checking how to run the C++ preprocessor... g++ -E
checking for g77... g77
checking whether we are using the GNU Fortran 77 compiler... yes
checking whether g77 accepts -g... yes
checking the maximum length of command line arguments... 32768
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for objdir... .libs
checking for ar... ar
checking for ranlib... (cached) ranlib
checking for strip... strip
checking if gcc static flag works... yes
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC
checking if gcc PIC flag -fPIC works... yes
checking if gcc supports -c -o file.o... yes
checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
configure: creating libtool
appending configuration tag "CXX" to libtool
checking for ld used by g++... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes
checking for g++ option to produce PIC... -fPIC
checking if g++ PIC flag -fPIC works... yes
checking if g++ supports -c -o file.o... yes
checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
appending configuration tag "F77" to libtool
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking for g77 option to produce PIC... -fPIC
checking if g77 PIC flag -fPIC works... yes
checking if g77 supports -c -o file.o... yes
checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking for flex... flex
checking for yywrap in -lfl... yes
checking lex output file root... lex.yy
checking whether yytext is a pointer... yes
checking for bison... bison -y
checking for main in -lm... yes
checking for main in -lnsl... yes
checking for main in -lsocket... no
checking for main in -lipc... no
checking for main in -lIPC... no
checking for main in -llc... no
checking for main in -lcompat... no
checking for main in -lBSD... no
checking for main in -lgen... no
checking for main in -lPW... no
checking for main in -lresolv... yes
checking for ANSI C header files... (cached) yes
checking for sys/wait.h that is POSIX.1 compatible... yes
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking for unistd.h... (cached) yes
checking getopt.h usability... yes
checking getopt.h presence... yes
checking for getopt.h... yes
checking netinet/tcp.h usability... yes
checking netinet/tcp.h presence... yes
checking for netinet/tcp.h... yes
checking netinet/in.h usability... yes
checking netinet/in.h presence... yes
checking for netinet/in.h... yes
checking sys/param.h usability... yes
checking sys/param.h presence... yes
checking for sys/param.h... yes
checking for sys/types.h... (cached) yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking sys/sem.h usability... yes
checking sys/sem.h presence... yes
checking for sys/sem.h... yes
checking sys/shm.h usability... yes
checking sys/shm.h presence... yes
checking for sys/shm.h... yes
checking for an ANSI C-conforming const... yes
checking for pid_t... yes
checking whether time.h and sys/time.h may both be included... yes
checking for union semun... no
checking return type of signal handlers... void
checking for vprintf... yes
checking for _doprnt... no
checking for wait3 that fills in rusage... yes
checking for setsid... yes
checking for select... yes
checking for socket... yes
checking for sigprocmask... yes
checking for strdup... yes
checking for strerror... yes
checking for strftime... yes
checking for strtok... yes
checking for asprintf... yes
checking for PQprepare in -lpq... yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating parser/Makefile
config.status: creating pcp/Makefile
config.status: creating config.h
config.status: config.h is unchanged
config.status: executing depfiles commands


[root@gurkan pgpool-II-1.0.1]# make
make all-recursive
make[1]: Entering directory `/tmp/pgpool-II-1.0.1'
Making all in parser
make[2]: Entering directory `/tmp/pgpool-II-1.0.1/parser'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/tmp/pgpool-II-1.0.1/parser'
Making all in pcp
make[2]: Entering directory `/tmp/pgpool-II-1.0.1/pcp'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/tmp/pgpool-II-1.0.1/pcp'
make[2]: Entering directory `/tmp/pgpool-II-1.0.1'
/bin/sh ./libtool --mode=link gcc -O3 -mcpu=pentium4 -march=pentium4 -mmmx -msse -msse2 -mfpmath=sse -o pgpool -lpq -Wl,-L,/opt/EnterpriseDB/8.1.4.17/dbserver/lib -Wl,-rpath,/opt/EnterpriseDB/8.1.4.17/dbserver/lib main.o child.o pool_auth.o pool_config.o pool_error.o pool_process_query.o pool_stream.o pool_connection_pool.o pool_params.o pool_signal.o pcp_child.o md5.o pool_shmem.o pool_sema.o pool_system.o pool_rewrite_query.o pool_rewrite_outfuncs.o pool_query_cache.o parser/libsql-parser.a pcp/libpcp.la -lresolv -lnsl -lm
mkdir .libs
gcc -O3 -mcpu=pentium4 -march=pentium4 -mmmx -msse -msse2 -mfpmath=sse -o .libs/pgpool -Wl,-L -Wl,/opt/EnterpriseDB/8.1.4.17/dbserver/lib -Wl,-rpath -Wl,/opt/EnterpriseDB/8.1.4.17/dbserver/lib main.o child.o pool_auth.o pool_config.o pool_error.o pool_process_query.o pool_stream.o pool_connection_pool.o pool_params.o pool_signal.o pcp_child.o md5.o pool_shmem.o pool_sema.o pool_system.o pool_rewrite_query.o pool_rewrite_outfuncs.o pool_query_cache.o -lpq parser/libsql-parser.a pcp/.libs/libpcp.so -lresolv -lnsl -lm -Wl,--rpath -Wl,/usr/local/lib
pool_system.o(.text+0xcec): In function `pool_get_id':
: undefined reference to `PQprepare'
pool_query_cache.o(.text+0x103a): In function `pool_query_cache_register':
: undefined reference to `PQprepare'
collect2: ld returned 1 exit status
make[2]: *** [pgpool] Error 1
make[2]: Leaving directory `/tmp/pgpool-II-1.0.1'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/tmp/pgpool-II-1.0.1'
make: *** [all] Error 2
[root@gurkan pgpool-II-1.0.1]#
-------------------------------
thanks again.
shoaib1

Senior member
[Avatar]

Joined: 8 Aug 2007 05:04:08
Messages: 350
Location: Islamabad, Pakistan
Offline

I am not asking for configure and make output again with EnterpriseDB but I wanted to see what happens if you do on the same machine with PostgreSQL where you are using the PostgreSQL libpq.

Thanks,

--
Shoaib Mir
Project Analyst
EnterpriseDB (www.enterprisedb.com)
[WWW] [MSN]
Anonymous



Hi,
You were able to configure it with
./configure --with-pgsql=/opt/EnterpriseDB/8.1/dbserver

I have rpm installation of postgres. without the option it wont configure, and what option should I give to configure with postges(if i need to):
--------------------
[gurkan@gurkan pgpool-II-1.0.1]$ rpm -qa | grep postgres
postgresql-libs-7.4.8-1.FC3.1
postgresql-odbc-debuginfo-7.3-8.FC3.1
postgresql-devel-7.4.8-1.FC3.1
postgresql-jdbc-7.4.8-1.FC3.1
postgresql-contrib-7.4.8-1.FC3.1
postgresql-odbc-7.3-8.FC3.1
postgresql-7.4.8-1.FC3.1
postgresql-server-7.4.8-1.FC3.1
postgresql-test-7.4.8-1.FC3.1
postgresql-pl-7.4.8-1.FC3.1
postgresql-docs-7.4.8-1.FC3.1
postgresql-python-7.4.8-1.FC3.1
postgresql-tcl-7.4.8-1.FC3.1
postgresql-debuginfo-7.4.8-1.FC3.1
--------------------

If I do ./configure, it gives
-----------------
checking for strtok... yes
checking for asprintf... yes
checking for PQprepare in -lpq... no
configure: error: libpq is not installed or libpq is old
-----------------
shoaib1

Senior member
[Avatar]

Joined: 8 Aug 2007 05:04:08
Messages: 350
Location: Islamabad, Pakistan
Offline

Once you have installed by PostgreSQL RPM it will also install the PostgreSQL libpq as well.

After the PostgreSQL installation is done you can do the following:

./configure --with-pgsql-incluedir=/usr/include --with-pgsql-libdir=/usr/lib

And let me know the output for that...

Regards,

--
Shoaib Mir
Project Analyst
EnterpriseDB (www.enterprisedb.com)
[WWW] [MSN]
Anonymous



Hi,
I had installed postgresql from rpm.
here is the output of configure:
---------------------------
[gurkan@gurkan pgpool-II-1.0.1]$ ./configure --with-pgsql-incluedir=/usr/include --with-pgsql-libdir=/usr/lib
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking for ranlib... ranlib
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking for a sed that does not truncate output... /bin/sed
checking for egrep... grep -E
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for /usr/bin/ld option to reload object files... -r
checking for BSD-compatible nm... /usr/bin/nm -B
checking whether ln -s works... yes
checking how to recognise dependent libraries... pass_all
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking dlfcn.h usability... yes
checking dlfcn.h presence... yes
checking for dlfcn.h... yes
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking dependency style of g++... gcc3
checking how to run the C++ preprocessor... g++ -E
checking for g77... g77
checking whether we are using the GNU Fortran 77 compiler... yes
checking whether g77 accepts -g... yes
checking the maximum length of command line arguments... 32768
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for objdir... .libs
checking for ar... ar
checking for ranlib... (cached) ranlib
checking for strip... strip
checking if gcc static flag works... yes
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC
checking if gcc PIC flag -fPIC works... yes
checking if gcc supports -c -o file.o... yes
checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
configure: creating libtool
appending configuration tag "CXX" to libtool
checking for ld used by g++... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes
checking for g++ option to produce PIC... -fPIC
checking if g++ PIC flag -fPIC works... yes
checking if g++ supports -c -o file.o... yes
checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
appending configuration tag "F77" to libtool
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking for g77 option to produce PIC... -fPIC
checking if g77 PIC flag -fPIC works... yes
checking if g77 supports -c -o file.o... yes
checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking for flex... flex
checking for yywrap in -lfl... yes
checking lex output file root... lex.yy
checking whether yytext is a pointer... yes
checking for bison... bison -y
checking for main in -lm... yes
checking for main in -lnsl... yes
checking for main in -lsocket... no
checking for main in -lipc... no
checking for main in -lIPC... no
checking for main in -llc... no
checking for main in -lcompat... no
checking for main in -lBSD... no
checking for main in -lgen... no
checking for main in -lPW... no
checking for main in -lresolv... yes
checking for ANSI C header files... (cached) yes
checking for sys/wait.h that is POSIX.1 compatible... yes
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking for unistd.h... (cached) yes
checking getopt.h usability... yes
checking getopt.h presence... yes
checking for getopt.h... yes
checking netinet/tcp.h usability... yes
checking netinet/tcp.h presence... yes
checking for netinet/tcp.h... yes
checking netinet/in.h usability... yes
checking netinet/in.h presence... yes
checking for netinet/in.h... yes
checking sys/param.h usability... yes
checking sys/param.h presence... yes
checking for sys/param.h... yes
checking for sys/types.h... (cached) yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking sys/sem.h usability... yes
checking sys/sem.h presence... yes
checking for sys/sem.h... yes
checking sys/shm.h usability... yes
checking sys/shm.h presence... yes
checking for sys/shm.h... yes
checking for an ANSI C-conforming const... yes
checking for pid_t... yes
checking whether time.h and sys/time.h may both be included... yes
checking for union semun... no
checking return type of signal handlers... void
checking for vprintf... yes
checking for _doprnt... no
checking for wait3 that fills in rusage... yes
checking for setsid... yes
checking for select... yes
checking for socket... yes
checking for sigprocmask... yes
checking for strdup... yes
checking for strerror... yes
checking for strftime... yes
checking for strtok... yes
checking for asprintf... yes
checking for PQprepare in -lpq... no
configure: error: libpq is not installed or libpq is old
---------------------------





------------------------
[gurkan@gurkan pgpool-II-1.0.1]$ rpm -qa | grep postgres
postgresql-libs-7.4.8-1.FC3.1
postgresql-odbc-debuginfo-7.3-8.FC3.1
postgresql-devel-7.4.8-1.FC3.1
postgresql-jdbc-7.4.8-1.FC3.1
postgresql-contrib-7.4.8-1.FC3.1
postgresql-odbc-7.3-8.FC3.1
postgresql-7.4.8-1.FC3.1
postgresql-server-7.4.8-1.FC3.1
postgresql-test-7.4.8-1.FC3.1
postgresql-pl-7.4.8-1.FC3.1
postgresql-docs-7.4.8-1.FC3.1
postgresql-python-7.4.8-1.FC3.1
postgresql-tcl-7.4.8-1.FC3.1
postgresql-debuginfo-7.4.8-1.FC3.1
------------------------



------------------------
[gurkan@gurkan pgpool-II-1.0.1]$ locate libpq.so
/home/gurkan/pghead_rem/src/interfaces/libpq/libpq.so.3
/home/gurkan/pghead_rem/src/interfaces/libpq/libpq.so
/home/gurkan/pghead_rem/src/interfaces/libpq/libpq.so.3.1
/usr/local/src/postgresql-7.4.6/src/test/regress/tmp_check/install/usr/local/pgsql/lib/libpq.so.3
/usr/local/src/postgresql-7.4.6/src/test/regress/tmp_check/install/usr/local/pgsql/lib/libpq.so
/usr/local/src/postgresql-7.4.6/src/test/regress/tmp_check/install/usr/local/pgsql/lib/libpq.so.3.1
/usr/local/src/postgresql-7.4.6/src/interfaces/libpq/libpq.so.3
/usr/local/src/postgresql-7.4.6/src/interfaces/libpq/libpq.so
/usr/local/src/postgresql-7.4.6/src/interfaces/libpq/libpq.so.3.1
/usr/lib/libpq.so.3
/usr/lib/libpq.so
/usr/lib/libpq.so.3.1
/usr/lib/debug/usr/lib/libpq.so.3.1.debug
/opt/EnterpriseDB/8.1.4.17/connectors/odbc/lib/libpq.so
/opt/EnterpriseDB/8.1.4.17/dbserver/lib/libpq.so
------------------------
shoaib2

Senior member

Joined: 25 Mar 2008 02:56:43
Messages: 333
Offline

This is because you are using an old version of PostgreSQL, please download the latest 8.1.4 source, do the configure make and make install which will install the latest PostgreSQL and then you can continue with PgPool installation.

Regards,
Anonymous



Hi,
Just to make sure we are on same page. These on my 32bit machine(host)
What I really need to do is on 64bit machine, edb is 32bit. If this solves the issue on my host, installing postgresql 8.1 on my host and configured pgpool-ii, does it mean I have to do same thing on 64bit servers(installing postgresql8.1 on servers and try to configure pgpol-ii also there).
shoaib1

Senior member
[Avatar]

Joined: 8 Aug 2007 05:04:08
Messages: 350
Location: Islamabad, Pakistan
Offline

Yes, you can do the same on 64 bit machine and then once its installed you can use PgPool with EnterpriseDB as EnterpriseDB is 100% compatible with PostgreSQL.

Thanks,

--
Shoaib Mir
Project Analyst
EnterpriseDB (www.enterprisedb.com)
[WWW] [MSN]
Anonymous



Hi,
I did installed postgres8.1.5(source), and pgpool configured allright, but make gives error.
----------------------------
[root@gurkan pgpool-II-1.0.1]# make
make all-recursive
make[1]: Entering directory `/opt/pgpool-II-1.0.1'
Making all in parser
make[2]: Entering directory `/opt/pgpool-II-1.0.1/parser'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/opt/pgpool-II-1.0.1/parser'
Making all in pcp
make[2]: Entering directory `/opt/pgpool-II-1.0.1/pcp'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/opt/pgpool-II-1.0.1/pcp'
make[2]: Entering directory `/opt/pgpool-II-1.0.1'
/bin/sh ./libtool --mode=link gcc -O3 -mcpu=pentium4 -march=pentium4 -mmmx -msse -msse2 -mfpmath=sse -o pgpool -lpq -Wl,-L,/usr/local/pgsql/lib -Wl,-rpath,/usr/local/pgsql/lib main.o child.o pool_auth.o pool_config.o pool_error.o pool_process_query.o pool_stream.o pool_connection_pool.o pool_params.o pool_signal.o pcp_child.o md5.o pool_shmem.o pool_sema.o pool_system.o pool_rewrite_query.o pool_rewrite_outfuncs.o pool_query_cache.o parser/libsql-parser.a pcp/libpcp.la -lresolv -lnsl -lm
mkdir .libs
gcc -O3 -mcpu=pentium4 -march=pentium4 -mmmx -msse -msse2 -mfpmath=sse -o .libs/pgpool -Wl,-L -Wl,/usr/local/pgsql/lib -Wl,-rpath -Wl,/usr/local/pgsql/lib main.o child.o pool_auth.o pool_config.o pool_error.o pool_process_query.o pool_stream.o pool_connection_pool.o pool_params.o pool_signal.o pcp_child.o md5.o pool_shmem.o pool_sema.o pool_system.o pool_rewrite_query.o pool_rewrite_outfuncs.o pool_query_cache.o -lpq parser/libsql-parser.a pcp/.libs/libpcp.so -lresolv -lnsl -lm -Wl,--rpath -Wl,/usr/local/lib
pool_system.o(.text+0xcec): In function `pool_get_id':
: undefined reference to `PQprepare'
pool_query_cache.o(.text+0x103a): In function `pool_query_cache_register':
: undefined reference to `PQprepare'
collect2: ld returned 1 exit status
make[2]: *** [pgpool] Error 1
make[2]: Leaving directory `/opt/pgpool-II-1.0.1'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/opt/pgpool-II-1.0.1'
make: *** [all] Error 2
----------------------------

I have tried this on my actual host which still has rpm postgres7.4.8.1 and edb installed.
shoaib1

Senior member
[Avatar]

Joined: 8 Aug 2007 05:04:08
Messages: 350
Location: Islamabad, Pakistan
Offline

Do the following:

ldconfig -p | grep libpq

and show us the output

Thanks,

--
Shoaib Mir
Project Analyst
EnterpriseDB (www.enterprisedb.com)
[WWW] [MSN]
Anonymous



[root@gurkan gurkan]# ldconfig -p | grep libpq
bash: ldconfig: command not found
[root@gurkan gurkan]# /sbin/ldconfig -p | grep libpq
libpq.so.3 (libc6) => /usr/lib/libpq.so.3
libpq.so (libc6) => /usr/lib/libpq.so
[root@gurkan gurkan]#
shoaib2

Senior member

Joined: 25 Mar 2008 02:56:43
Messages: 333
Offline

Do the following:

ln -s /usr/lib/libpq.so.3 /usr/lib/libpq.so.4

and try configure plus make for PGPool and it will hopefully solve the problem.

Thank you,
Anonymous



Hi,
I did symlink and configure, make.still gives error.
-----------------------
-rw-r--r-- 1 root root 589620 May 10 2005 libpq.a
lrwxrwxrwx 1 root root 12 Jun 28 2005 libpq.so -> libpq.so.3.1
lrwxrwxrwx 1 root root 12 Jun 28 2005 libpq.so.3 -> libpq.so.3.1
-rwxr-xr-x 1 root root 109732 May 10 2005 libpq.so.3.1
lrwxrwxrwx 1 root root 19 Oct 19 10:51 libpq.so.4 -> /usr/lib/libpq.so.3
lrwxrwxrwx 1 root root 19 Jan 13 2005 libpspell.so.15 -> libpspell.so.15.0.3
-rwxr-xr-x 1 root root 2784 Oct 6 2004 libpspell.so.15.0.3
-rw-r--r-- 1 root root 128312 Oct 27 2004 libpthread.a
-----------------------



------------------------
checking for PQprepare in -lpq... yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating parser/Makefile
config.status: creating pcp/Makefile
config.status: creating config.h
config.status: config.h is unchanged
config.status: executing depfiles commands
[root@gurkan pgpool-II-1.0.1]# make
make all-recursive
make[1]: Entering directory `/opt/pgpool-II-1.0.1'
Making all in parser
make[2]: Entering directory `/opt/pgpool-II-1.0.1/parser'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/opt/pgpool-II-1.0.1/parser'
Making all in pcp
make[2]: Entering directory `/opt/pgpool-II-1.0.1/pcp'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/opt/pgpool-II-1.0.1/pcp'
make[2]: Entering directory `/opt/pgpool-II-1.0.1'
/bin/sh ./libtool --mode=link gcc -O3 -mcpu=pentium4 -march=pentium4 -mmmx -msse -msse2 -mfpmath=sse -o pgpool -lpq -Wl,-L,/usr/local/pgsql/lib -Wl,-rpath,/usr/local/pgsql/lib main.o child.o pool_auth.o pool_config.o pool_error.o pool_process_query.o pool_stream.o pool_connection_pool.o pool_params.o pool_signal.o pcp_child.o md5.o pool_shmem.o pool_sema.o pool_system.o pool_rewrite_query.o pool_rewrite_outfuncs.o pool_query_cache.o parser/libsql-parser.a pcp/libpcp.la -lresolv -lnsl -lm
mkdir .libs
gcc -O3 -mcpu=pentium4 -march=pentium4 -mmmx -msse -msse2 -mfpmath=sse -o .libs/pgpool -Wl,-L -Wl,/usr/local/pgsql/lib -Wl,-rpath -Wl,/usr/local/pgsql/lib main.o child.o pool_auth.o pool_config.o pool_error.o pool_process_query.o pool_stream.o pool_connection_pool.o pool_params.o pool_signal.o pcp_child.o md5.o pool_shmem.o pool_sema.o pool_system.o pool_rewrite_query.o pool_rewrite_outfuncs.o pool_query_cache.o -lpq parser/libsql-parser.a pcp/.libs/libpcp.so -lresolv -lnsl -lm -Wl,--rpath -Wl,/usr/local/lib
pool_system.o(.text+0xcec): In function `pool_get_id':
: undefined reference to `PQprepare'
pool_query_cache.o(.text+0x103a): In function `pool_query_cache_register':
: undefined reference to `PQprepare'
collect2: ld returned 1 exit status
make[2]: *** [pgpool] Error 1
make[2]: Leaving directory `/opt/pgpool-II-1.0.1'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/opt/pgpool-II-1.0.1'
make: *** [all] Error 2

------------------------
shoaib1

Senior member
[Avatar]

Joined: 8 Aug 2007 05:04:08
Messages: 350
Location: Islamabad, Pakistan
Offline

This looks to me it is not even working for PostgreSQL plus PGPool combination, so can be a configuration issue with your OS settings. I will recommend you to try the same on some other machine and see if you can replicate this error.

Thank,

--
Shoaib Mir
Project Analyst
EnterpriseDB (www.enterprisedb.com)
[WWW] [MSN]
Anonymous



Hi,
Well, I have been using pgpool-3.1.1. it all started with idea of being pgpool-3.1.1 slows down our cluster.
Then I have noticed that there is pgpool-II, but it seems I cannot get to install.
I am stucked with same issue on my actual server which is FC5-64bit, virtual machine FC5-32, and my host FC2,3-32bit.
pgpool developers stopped responding not only mine but others thread also.

So, in your earlier responses you mentioned that you tried on your FC5-32 bit and there was no problem. Was it pgpool-3.1.1 or pgpool-II?

Is there any other SQL load balancer out there?

thanks
shoaib1

Senior member
[Avatar]

Joined: 8 Aug 2007 05:04:08
Messages: 350
Location: Islamabad, Pakistan
Offline

It worked good for me using FC5 32 bit for PostgreSQL 8.1.4 + PGPool II where I built everything from source.

I will recommend to use some other OS like RHEL4 if FC5 is not going good for you.

Thank you,

--
Shoaib Mir
Project Analyst
EnterpriseDB (www.enterprisedb.com)
[WWW] [MSN]
 
Forum Index » Postgres Plus Advanced Server
Go to:   
Powered by JForum 2.1.8 © JForum Team