Skip to content

problems with RPostgreSQL compilation

3 messages · Tomas Lanczos, Pascal Oettli

#
Hello,

I am trying to install RPostgreSQL, but without success at the moment, getting an errormessage - see below. 
My OS is Fedora 17, R version 2.15.2, PostgreSQL 9.2.1 with Postgis 2.0.1 spatial extension. 

Thank You for any help, advice or hint in advance.

Regards

Tomas
trying URL 'http://cran.fyxm.net/src/contrib/RPostgreSQL_0.3-3.tar.gz'
Content type 'application/x-gzip' length 474570 bytes (463 Kb)
opened URL
==================================================
downloaded 463 Kb

* installing *source* package ?RPostgreSQL? ...
** package ?RPostgreSQL? successfully unpacked and MD5 sums checked
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 ISO C89... none needed
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking for pg_config... /usr/bin/pg_config
checking for "/usr/include/libpq-fe.h"... yes
configure: creating ./config.status
config.status: creating src/Makevars
** libs
gcc -std=gnu99 -I/usr/local/lib64/R/include -DNDEBUG -I/usr/include -I/usr/local/include    -fpic  -g -O2  -c RS-DBI.c -o RS-DBI.o
gcc -std=gnu99 -I/usr/local/lib64/R/include -DNDEBUG -I/usr/include -I/usr/local/include    -fpic  -g -O2  -c RS-PQescape.c -o RS-PQescape.o
gcc -std=gnu99 -I/usr/local/lib64/R/include -DNDEBUG -I/usr/include -I/usr/local/include    -fpic  -g -O2  -c RS-PostgreSQL.c -o RS-PostgreSQL.o
gcc -std=gnu99 -I/usr/local/lib64/R/include -DNDEBUG -I/usr/include -I/usr/local/include    -fpic  -g -O2  -c RS-pgsql-copy.c -o RS-pgsql-copy.o
gcc -std=gnu99 -I/usr/local/lib64/R/include -DNDEBUG -I/usr/include -I/usr/local/include    -fpic  -g -O2  -c RS-pgsql-getResult.c -o RS-pgsql-getResult.o
gcc -std=gnu99 -I/usr/local/lib64/R/include -DNDEBUG -I/usr/include -I/usr/local/include    -fpic  -g -O2  -c RS-pgsql-pqexec.c -o RS-pgsql-pqexec.o
gcc -std=gnu99 -shared -L/usr/local/lib64 -o RPostgreSQL.so RS-DBI.o RS-PQescape.o RS-PostgreSQL.o RS-pgsql-copy.o RS-pgsql-getResult.o RS-pgsql-pqexec.o -L/usr/lib -lpq
/usr/bin/ld: cannot find -lpq
collect2: error: ld returned 1 exit status
make: *** [RPostgreSQL.so] Error 1
ERROR: compilation failed for package ?RPostgreSQL?
* removing ?/usr/local/lib64/R/library/RPostgreSQL?

The downloaded source packages are in
	?/tmp/Rtmpv5LkJj/downloaded_packages?
Updating HTML index of packages in '.Library'
Making packages.html  ... done
Warning message:
In install.packages("RPostgreSQL", dependencies = TRUE) :
  installation of package ?RPostgreSQL? had non-zero exit status

--
#
Hello,

Do you have the shared libraries required by PostgreSQL installed on 
your machine (libpq)?

Regards,
Pascal

Le 22/11/2012 18:45, lanczos at t-zones.sk a ?crit :
#
Thank You for Your answer.I have installed libpqxx 4.0.0 and its devel
tools also.

Regards

Tomas
On Thu, 2012-11-22 at 19:32 +0900, Pascal Oettli wrote: