[R] ERROR: compilation failed for package 'RdbiPgSQL'

Srinivas Iyyer srini_iyyer_bio at yahoo.com
Fri Feb 3 08:38:27 CET 2006


Dear Group, 
 I have been trying to connect postgres with R.  I
followed the instructions from :
http://grass.itc.it/statsgrass/r_and_dbms.html.

However, RdbiPgSQL fails to install and throws up
error. 

Could any one please help me where the things are
going wrong. 

I have attached the log, and the necessary files for
postgresql stuff. 

Sorry for long message.  Looking forward for some help
please. 

thanks
sri


>install.packages(contriburl="http://www.bioconductor.org/repository/devel/package/Source/",
"Rdbi")

**snip***
** building package indices ...
* DONE (Rdbi)

>
install.packages(contriburl="http://www.bioconductor.org/repository/devel/package/Source/",
"RdbiPgSQL")
trying URL
'http://www.bioconductor.org/repository/devel/package/Source//RdbiPgSQL_1.5.1.tar.gz'
Content type 'application/x-gzip' length 28297 bytes
opened URL
==================================================
downloaded 27Kb

* Installing *source* package 'RdbiPgSQL' ...
creating cache ./config.cache
updating cache ./config.cache
creating ./config.status
creating src/Makevars
** libs
gcc -I/usr/local/lib64/R/include -I/usr/local/include
-I/usr/local/include   -fPIC  -g -O2 -c PgSQL.c -o
PgSQL.o
PgSQL.c:10:22: libpq-fe.h: No such file or directory
In file included from PgSQL.c:11:
PgSQL.h:33: error: syntax error before '*' token
PgSQL.h: In function `fetchPgString':
PgSQL.h:37: error: `result' undeclared (first use in
this function)
PgSQL.h:37: error: (Each undeclared identifier is
reported only once
PgSQL.h:37: error: for each function it appears in.)
PgSQL.h:37: error: `row' undeclared (first use in this
function)
PgSQL.h:37: error: `col' undeclared (first use in this
function)
PgSQL.h:39: warning: assignment makes pointer from
integer without a cast
PgSQL.h: At top level:
PgSQL.h:46: error: syntax error before '*' token
PgSQL.h: In function `fetchPgInteger':
PgSQL.h:51: error: `result' undeclared (first use in
this function)
PgSQL.h:51: error: `row' undeclared (first use in this
function)
PgSQL.h:51: error: `col' undeclared (first use in this
function)
PgSQL.h:53: warning: assignment makes pointer from
integer without a cast
PgSQL.h: At top level:
PgSQL.h:64: error: syntax error before '*' token
PgSQL.h: In function `fetchPgDouble':
PgSQL.h:73: error: `result' undeclared (first use in
this function)
PgSQL.h:73: error: `row' undeclared (first use in this
function)
PgSQL.h:73: error: `col' undeclared (first use in this
function)
PgSQL.h:75: warning: assignment makes pointer from
integer without a cast
PgSQL.h: At top level:
PgSQL.h:86: error: syntax error before '*' token
PgSQL.h: In function `fetchPgLogical':
PgSQL.h:88: error: `result' undeclared (first use in
this function)
PgSQL.h:88: error: `row' undeclared (first use in this
function)
PgSQL.h:88: error: `col' undeclared (first use in this
function)
PgSQL.h:95: warning: passing arg 1 of `strlen' makes
pointer from integer without a cast
PgSQL.h:95: warning: cast to pointer from integer of
different size
PgSQL.h:95: warning: cast to pointer from integer of
different size
PgSQL.h:95: warning: passing arg 1 of
`__builtin_strcmp' makes pointer from integer without
a cast
PgSQL.h:95: warning: cast to pointer from integer of
different size
PgSQL.h:95: warning: cast to pointer from integer of
different size
PgSQL.h:95: warning: passing arg 1 of `strlen' makes
pointer from integer without a cast
PgSQL.h:95: warning: passing arg 1 of
`__builtin_strcmp' makes pointer from integer without
a cast
PgSQL.h:95: warning: cast to pointer from integer of
different size
PgSQL.h:95: warning: cast to pointer from integer of
different size
PgSQL.h:95: warning: cast to pointer from integer of
different size
PgSQL.h:95: warning: cast to pointer from integer of
different size
PgSQL.h:95: warning: cast to pointer from integer of
different size
PgSQL.h:95: warning: cast to pointer from integer of
different size
PgSQL.h:95: warning: passing arg 1 of
`__builtin_strcmp' makes pointer from integer without
a cast
PgSQL.h:95: warning: cast to pointer from integer of
different size
PgSQL.h:95: warning: passing arg 1 of
`__builtin_strcmp' makes pointer from integer without
a cast
PgSQL.c: In function `PgSQLcloseConnection':
PgSQL.c:20: error: `PGconn' undeclared (first use in
this function)
PgSQL.c:20: error: `conn' undeclared (first use in
this function)
PgSQL.c:20: error: syntax error before ')' token
PgSQL.c:21: error: `CONNECTION_OK' undeclared (first
use in this function)
PgSQL.c: In function `PgSQLconnect':
PgSQL.c:27: error: `PGconn' undeclared (first use in
this function)
PgSQL.c:27: error: `conn' undeclared (first use in
this function)
PgSQL.c: In function `PgSQLconnectionInfo':
PgSQL.c:51: error: `PGconn' undeclared (first use in
this function)
PgSQL.c:51: error: `conn' undeclared (first use in
this function)
PgSQL.c:51: error: syntax error before ')' token
PgSQL.c:59: warning: passing arg 1 of `mkString_safe'
makes pointer from integer without a cast
PgSQL.c:62: warning: passing arg 1 of `mkString_safe'
makes pointer from integer without a cast
PgSQL.c:65: warning: passing arg 1 of `mkString_safe'
makes pointer from integer without a cast
PgSQL.c:68: warning: passing arg 1 of `mkString_safe'
makes pointer from integer without a cast
PgSQL.c:71: warning: passing arg 1 of `mkString_safe'
makes pointer from integer without a cast
PgSQL.c:74: warning: passing arg 1 of `mkString_safe'
makes pointer from integer without a cast
PgSQL.c:77: warning: passing arg 1 of `mkString_safe'
makes pointer from integer without a cast
PgSQL.c:80: warning: passing arg 1 of `mkString_safe'
makes pointer from integer without a cast
PgSQL.c: In function `PgSQLclearResult':
PgSQL.c:104: error: `PGresult' undeclared (first use
in this function)
PgSQL.c:104: error: syntax error before ')' token
PgSQL.c: In function `PgSQLsendQuery':
PgSQL.c:111: error: `PGresult' undeclared (first use
in this function)
PgSQL.c:111: error: `result' undeclared (first use in
this function)
PgSQL.c:112: error: `PGconn' undeclared (first use in
this function)
PgSQL.c:112: error: `conn' undeclared (first use in
this function)
PgSQL.c:112: error: syntax error before ')' token
PgSQL.c:115: error: `CONNECTION_OK' undeclared (first
use in this function)
PgSQL.c: In function `PgSQLresultInfo':
PgSQL.c:141: error: `PGresult' undeclared (first use
in this function)
PgSQL.c:141: error: `result' undeclared (first use in
this function)
PgSQL.c:141: error: syntax error before ')' token
PgSQL.c:150: warning: passing arg 1 of `mkString_safe'
makes pointer from integer without a cast
PgSQL.c:153: warning: passing arg 1 of `mkString_safe'
makes pointer from integer without a cast
PgSQL.c:165: warning: passing arg 1 of `mkString_safe'
makes pointer from integer without a cast
PgSQL.c:168: warning: passing arg 1 of `mkString_safe'
makes pointer from integer without a cast
PgSQL.c: In function `PgSQLcolumnInfo':
PgSQL.c:182: error: `PGresult' undeclared (first use
in this function)
PgSQL.c:182: error: `result' undeclared (first use in
this function)
PgSQL.c:182: error: syntax error before ')' token
PgSQL.c:184: error: `PGRES_TUPLES_OK' undeclared
(first use in this function)
PgSQL.c:197: warning: passing arg 1 of `Rf_mkChar'
makes pointer from integer without a cast
PgSQL.c: In function `PgSQLgetResult':
PgSQL.c:227: error: `PGresult' undeclared (first use
in this function)
PgSQL.c:227: error: `result' undeclared (first use in
this function)
PgSQL.c:227: error: syntax error before ')' token
PgSQL.c:231: error: `PGRES_TUPLES_OK' undeclared
(first use in this function)
PgSQL.c:232: warning: passing arg 1 of `Rf_error'
makes pointer from integer without a cast
PgSQL.c:283: warning: passing arg 1 of `Rf_mkChar'
makes pointer from integer without a cast
make: *** [PgSQL.o] Error 1
ERROR: compilation failed for package 'RdbiPgSQL'
** Removing '/usr/local/lib64/R/library/RdbiPgSQL'

The downloaded packages are in
        /tmp/RtmpR27533/downloaded_packages
Warning message:
installation of package 'RdbiPgSQL' had non-zero exit
status in: install.packages(contriburl =
"http://www.bioconductor.org/repository/devel/package/Source/",



-->
 /var/lib/pgsql/
backups  data  initdb.i18n

-->
/usr/bin/psql
-->
/usr/bin/postgres

-->
/usr/share/pgsql/
contrib                 pg_hba.conf.sample     
postgres.bki            sql_features.txt
conversion_create.sql   pg_ident.conf.sample   
postgres.description    unknown.pltcl
information_schema.sql  pg_service.conf.sample 
postgresql.conf.sample
-->
psql lib files:
/usr/lib64/pgsql
ascii_and_mic.so     euc_kr_and_mic.so      ltree.so  
     refint.so          utf8_and_big5.so      
utf8_and_sjis.so
autoinc.so           euc_tw_and_big5.so    
misc_utils.so   rserv.so          
utf8_and_cyrillic.so   utf8_and_tcvn.so
btree_gist.so        fti.so                
moddatetime.so  rtree_gist.so      utf8_and_euc_cn.so 
   utf8_and_uhc.so
chkpass.so           fuzzystrmatch.so       noup.so   
     seg.so             utf8_and_euc_jp.so    
utf8_and_win1250.so
cube.so              insert_username.so     pending.so
     string_io.so       utf8_and_euc_kr.so    
utf8_and_win1256.so
cyrillic_and_mic.so  int_aggregate.so      
pgcrypto.so     tablefunc.so       utf8_and_euc_tw.so 
   utf8_and_win874.so
dblink.so            _int.so               
pgstattuple.so  timetravel.so      utf8_and_gb18030.so
dbsize.so            isbn_issn.so           plperl.so 
     tsearch2.so        utf8_and_gbk.so
earthdistance.so     latin2_and_win1250.so  plpgsql.so
     tsearch.so         utf8_and_iso8859_1.so
euc_cn_and_mic.so    latin_and_mic.so      
plpython.so     user_locks.so      utf8_and_iso8859.so
euc_jp_and_sjis.so   lo.so                  pltcl.so  
     utf8_and_ascii.so  utf8_and_johab.so





/usr/lib/libodbcpsql.so
/usr/lib/libodbcpsql.so.2
/usr/lib/libodbcpsql.so.1.0.0
/usr/lib/libodbcpsql.so.1
/usr/lib/libodbcpsql.so.2.0.0
/usr/lib64/libodbcpsql.so
/usr/lib64/libodbcpsql.so.2
/usr/lib64/libodbcpsql.so.1.0.0
/usr/lib64/libodbcpsql.so.1
/usr/lib64/libodbcpsql.so.2.0.0




More information about the R-help mailing list