Skip to content

RPostgreSQL 0.1.7 for Windows 64 causes R.2.12.1 Win64 crash

6 messages · Xiaobo Gu, Dirk Eddelbuettel, Brian Ripley

#
Hi,
I build the binary package file of RPostgreSQL 0.1.7 for Windows 2003
Server R2 64 bit SP2, the software environments are as following:
         R 2.12.1 for Win64
         RTools212 for Win64
         DBI 0.2.5
         RPostgreSQL 0.1.7
         Postgresql related binaries shipped with
postgresql-9.0.2-1-windows_x64.exe from EnterpriseDB

The package can be loaded, and driver can be created, but the
dbConnect function causes the whole RGui crashes,

driver <- dbDriver("PostgreSQL")
con <- dbConnect(driver, dbname="demo", host="192.168.8.1",
user="postgres", password="postgres", port=5432)
1 day later
#
Is it because of compiler campsites between R and PostgreSQL, R is
compiled by GCC, while PostgreSQL from Enterprise DB is compiled by
Microsoft Visual C ++.

Xiaobo Gu
On Sat, Jan 15, 2011 at 10:34 AM, Xiaobo Gu <guxiaobo1982 at gmail.com> wrote:
#
On 16 January 2011 at 23:00, Xiaobo Gu wrote:
| Is it because of compiler campsites between R and PostgreSQL, R is
| compiled by GCC, while PostgreSQL from Enterprise DB is compiled by
| Microsoft Visual C ++.

So the usual recommendation is to build the matching library (here libpq)
with the same compiler, or get the commercial support you are paying for to
do it for you.  

For what it is worth, I deal with one vendor at work where I made that
requirement and they had no issue complying / helping me with a MinGW /
Rtools-compatible library.  One of several reasons I like working with that
vendor.

Dirk
 
| Xiaobo Gu
|
| On Sat, Jan 15, 2011 at 10:34 AM, Xiaobo Gu <guxiaobo1982 at gmail.com> wrote:
| > Hi,
| > I build the binary package file of RPostgreSQL 0.1.7 for Windows 2003
| > Server R2 64 bit SP2, the software environments are as following:
| > ? ? ? ? R 2.12.1 for Win64
| > ? ? ? ? RTools212 for Win64
| > ? ? ? ? DBI 0.2.5
| > ? ? ? ? RPostgreSQL 0.1.7
| > ? ? ? ? Postgresql related binaries shipped with
| > postgresql-9.0.2-1-windows_x64.exe from EnterpriseDB
| >
| > The package can be loaded, and driver can be created, but the
| > dbConnect function causes the whole RGui crashes,
| >
| > driver <- dbDriver("PostgreSQL")
| > con <- dbConnect(driver, dbname="demo", host="192.168.8.1",
| > user="postgres", password="postgres", port=5432)
| >
| 
| ______________________________________________
| R-devel at r-project.org mailing list
| https://stat.ethz.ch/mailman/listinfo/r-devel
#
On Mon, 17 Jan 2011, Dirk Eddelbuettel wrote:

            
And also for what it is worth, RPostgreSQL works for me on x64 Windows 
7 compiled with the Rtools compilers and linked against the initial 
PostgreSQL 9.0 Windows x64 distribution (I've not tried the one you 
mentioned).

Where C (and not C++) is involved it should be possible to mix DLLs 
compiled by MinGW-w64 and MSVC, and this has been done extensively 
(after all a lot of Windows' own DLLs are compiled with MSVC, as are 
the Tcl/Tk binaries which are distributed with R).

  
    
#
Hi Professor Brian :

I buy a new  64bit Win7 Home basic notebook for working with 64bit R
and PostgreSQL :)

but still now I can't get postgresql-9.0.2-1-windows_x64 installed.

Which version of Win 7 and postgres do you use, can you share the
download URL for 9.0.0.1 of 64bit PostgreSQL, I can't find it form
EnterpriseDB now.

Thanks.

Xiaobo Gu


On Tue, Jan 18, 2011 at 1:22 AM, Prof Brian Ripley
<ripley at stats.ox.ac.uk> wrote:
10 days later
#
On Tue, Jan 18, 2011 at 1:22 AM, Prof Brian Ripley
<ripley at stats.ox.ac.uk> wrote:
PostgreSQL 9.0.2 source code with a Win64 patch now can be built using
MinGW64 1.0 (GCC 4.5.2), and the RPostgreSQL package works well now
against the corresponding libpq.dll libraries.

By the way, I found MinGW64 with MSYS is much more convenient.

Xiaobo Gu