[R-sig-DB] Problems with the RPostgreSQL package compilation

Paul Gilbert pg||bert902 @end|ng |rom gm@||@com
Thu Nov 29 18:53:47 CET 2012


Possibly some crossed wires. I think Dirk already replied to this 
(copied below) but you many not yet have been subscribed to the list 
when he responded, and it seems to have gone to a different email 
address for you.  Paul

On 28 November 2012 at 12:17, Paul Gilbert wrote:
|
| (moved from R-help)
|
| You should get better help with this on R-SIG-DB. It seems you need some
| additional hint to help the loader find pg.

The linker clearly does not find -lpq so you need to install libpq-dev (or
whichever related name it has) but not ...

| Paul
|
| On 12-11-28 06:00 AM, r-help-request using r-project.org wrote:
| > Date: Thu, 22 Nov 2012 12:15:18 +0100
| > From: Tomas Lanczos<lanczos using t-zones.sk>
| > To:r-help using r-project.org
| > Subject: Re: [R] problems with RPostgreSQL compilation
| > Message-ID: <1353582918.3021.12.camel using freya>
| > Content-Type: text/plain; charset="UTF-8"
| >
| > Thank You for Your answer.I have installed libpqxx 4.0.0 and its devel
| > tools also.

libpqxx which is the __C++__ interface whereas we use the standard __C__ 
interface.

Those are not the same thing.

Dirk

| >
| > Regards
| >
| > Tomas
| >
| >
| > On Thu, 2012-11-22 at 19:32 +0900, Pascal Oettli wrote:
| >> >Hello,
| >> >
| >> >Do you have the shared libraries required by PostgreSQL installed on
| >> >your machine (libpq)?
| >> >
| >> >Regards,
| >> >Pascal
| >> >
| >> >Le 22/11/2012 18:45,lanczos using t-zones.sk  a ?crit :
| >>> > >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
| >>> > >
| >>> > >
| >>>> > >>install.packages("RPostgreSQL", dependencies=TRUE)
| >>> > >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
| >>> > >
| >>> > >--
| >>> > >
| >>> > >
| >>> > >
|
| _______________________________________________
| R-sig-DB mailing list -- R Special Interest Group
| R-sig-DB using r-project.org
| https://stat.ethz.ch/mailman/listinfo/r-sig-db

-- Dirk Eddelbuettel | edd using debian.org | http://dirk.eddelbuettel.com

On 12-11-29 10:32 AM, Tomas Lanczos wrote:
>
>    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. I installed libpqxx 4.0.0 and its devel
> tools also.
>
>    Thank You for any help, advice or hint in advance.
>
>    Regards
>
>    Tomas
>
>
>    install.packages("RPostgreSQL", dependencies=TRUE)
>    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
>
> _______________________________________________
> R-sig-DB mailing list -- R Special Interest Group
> R-sig-DB using r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-db
>




More information about the R-sig-DB mailing list