PostgreSQLアダプタはまり続く

LeopardではまってCentOS5でも

[admin@localhost ~]$ sudo gem install ruby-postgres
Building native extensions.  This could take a while...
ERROR:  Error installing ruby-postgres:
	ERROR: Failed to build gem native extension.

/usr/bin/ruby extconf.rb install ruby-postgres
checking for main() in -lpq... yes
checking for libpq-fe.h... yes
checking for libpq/libpq-fs.h... yes
checking for PQsetClientEncoding()... yes
checking for pg_encoding_to_char()... yes
checking for PQfreemem()... yes
checking for PQescapeString()... yes
checking for PQexecParams()... yes
creating Makefile

make
gcc -I. -I. -I/usr/lib/ruby/1.8/i686-linux -I. -DHAVE_LIBPQ_FE_H -DHAVE_LIBPQ_LIBPQ_FS_H -DHAVE_PQSETCLIENTENCODING -DHAVE_PG_ENCODING_TO_CHAR -DHAVE_PQFREEMEM -DHAVE_PQESCAPESTRING -DHAVE_PQEXECPARAMS -I/usr/local/pgsql/include  -D_FILE_OFFSET_BITS=64  -fPIC -g -O2  -Wall   -c postgres.c
postgres.c:31: error: conflicting types for 'pg_encoding_to_char'
/usr/local/pgsql/include/libpq-fe.h:518: error: previous declaration of 'pg_encoding_to_char' was here
postgres.c: In function 'pgconn_s_escape_bytea':
postgres.c:370: warning: pointer targets in passing argument 1 of 'PQescapeBytea' differ in signedness
postgres.c: In function 'pgconn_s_unescape_bytea':
postgres.c:401: warning: pointer targets in passing argument 1 of 'PQunescapeBytea' differ in signedness
make: *** [postgres.o] Error 1


Gem files will remain installed in /usr/lib/ruby/gems/1.8/gems/ruby-postgres-0.7.1.2006.04.06 for inspection.
Results logged to /usr/lib/ruby/gems/1.8/gems/ruby-postgres-0.7.1.2006.04.06/gem_make.out