Closed GoogleCodeExporter closed 9 years ago
Information on exact windows version (32 bit vs 64 bit), compiler setup, and
how PostgreSQL and R binary were compiled and installed is necessary to
investigate anything further. If the DLL for PostgreSQL and R is compiled with
different compiler setup, it is unlikely to work.
Original comment by tomoa...@kenroku.kanazawa-u.ac.jp
on 8 Nov 2011 at 7:22
Hi, thanks for response.
This is Windows 7 64bit.
Both PostreSQL and R were installed with their Windows installers from binary
packages. RPostgreSQL was attempted to be built from source because:
> install.packages("RPostgreSQL")
(...)
Warning message:
In getDependencies(pkgs, dependencies, available, lib) :
package ‘RPostgreSQL’ is not available (for R version 2.14.0)
>
In order to be able to compile RPostgreSQL I downloaded and installed latest
RTools.
It seems, based on the above, that compiler setup for RPostgreSQL compile is
unlikely to follow the setup the R was compiled with for the binary package
contained in Windows installer. How to make my setup consistent with that one?
Original comment by ipl...@wp.pl
on 8 Nov 2011 at 9:17
Install MinGW and MSYS by mingw-get-inst.
http://www.mingw.org/wiki/Getting_Started
Note postgresql-9.1.1 cannot be compiled with make-3.79 that comes with Rtools
http://www.murdoch-sutherland.com/Rtools/Rtools214.exe
as of 2011-11-11.
In MSYS environment, compile postgresql-9.1.1 with
./configure --host=x86_64-w64-mingw32 --without-zlib
make
Thereafter,
make install
would install the postgresql binaries to C:\MinGW\MSYS\1.0\local\pgsql
You find libpq.dll in src/interfaces/libpq under the postgresql-9.1.1 directory
or
C:\MinGW\MSYS\1.0\local\pgsql\lib,
copy the file to the x64 directory of the R binary,
eg. C:\Program Files\R\R-2.14.0\bin\x64
(Usually user is better not to touch c:\windows\system32)
set the environmental variable PG_HOME to
C:/MinGW/MSYS/1.0/local/pgsql
and invoke R.
As the windows native binary distribution of PostgreSQL is compiled
using the Visual C++ compiler suite from Microsoft
(http://www.postgresql.org/docs/9.1/static/install-windows.html), their
component cannot
linked with the mingw binaries. However, the transaction is done over socket or
TCP/IP and you can interact with the binary installation without problem.
Original comment by tomoa...@kenroku.kanazawa-u.ac.jp
on 11 Nov 2011 at 9:25
This will be closed as this is caused by inappropriate installation, and the
installation procedure is now much simplified that same error should not be
seen.
Original comment by tomoa...@kenroku.kanazawa-u.ac.jp
on 21 Nov 2011 at 1:23
Original issue reported on code.google.com by
ipl...@wp.pl
on 7 Nov 2011 at 7:09