kylemaxxwell / rpostgresql

Automatically exported from code.google.com/p/rpostgresql
0 stars 0 forks source link

Sort out Mac OS X Errors on R CRAN #18

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
checking whether package 'RPostgreSQL' can be installed ... ERROR
Installation failed.
See 
'/Volumes/Tiger/Builds/Rdev-web/QA/Simon/packages/leopard-universal/results/2.11
/RPostgreSQL.Rcheck/00install.out' for details.
See 
http://www.r-project.org/nosvn/R.check/r-release-macosx-ix86/RPostgreSQL-00insta
ll.html for details.

=========================
from the above link.

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 for pg_config... no
configure: checking for PostgreSQL header files
checking for "/libpq-fe.h"... no
configure: error: File libpq-fe.h not in ; installation may be broken.
ERROR: configuration failed for package 'RPostgreSQL'
* removing 
'/Volumes/Tiger/Builds/Rdev-web/QA/Simon/packages/leopard-universal/results/2.11
/RPostgreSQL.Rcheck/RPostgreSQL'

=========================
r-release-macosx-ix86    r-release   MacOS X     ix86    Mac OS X 10.5.8 (9L31a)     
MacPro, Intel Xeon XXXX (Gainstown) @ 2.65GHz    GCC 4.2.1

=========================

Also causes TSPostgreSQL to fail.  RpgSQL passes on Mac.  Need to find out if 
it actually checks that postgresql is installed or not and if so how it does it.

Original issue reported on code.google.com by ne...@neiltiffin.com on 24 Aug 2010 at 1:29

GoogleCodeExporter commented 9 years ago
January 5, 2010 11:49:07 AM CST

Neil, Dirk,

thanks for your help! I finally managed to compile and install the package. Two 
issues:

* Setting the location of the PG header files as shown on the Wiki page does 
not seem to have any effect. Also, changing the search lists in configure and 
configure.in still gives the same error. Due to my lack of knowledge about 
(auto)configure, I manually override the paths for the libs and includes in 
configure by adding

PG_INCDIR=/Library/PostgresPlus/8.4SS/include
PG_LIBDIR=/Library/PostgresPlus/8.4SS/lib

at around line 2675 (after the directories are tested). These are the paths for 
the EnterprizeDB Postgres Standard Server (8.4) I am using. Compilation now 
starts (but see below). Still, this suggests to me that there is a problem in 
the configure script, which causes the PG_*DIR variables not to be set at all. 
This would also explain why the CRAN version does not compile (with the Fink PG 
libs installed).

* For OS X Users, R needs to be called with the arch flag correctly set, as in

> sudo R --arch=i386 CMD INSTALL RPostgreSQL

The default R call compiles a 64-bit package, but installs it under 32-bit R, 
which results in an error when the package is loaded. Maybe this is worth 
adding to the Wiki.

Thanks again for your work on the package!

Best
Nils

Original comment by ne...@neiltiffin.com on 24 Aug 2010 at 1:53

GoogleCodeExporter commented 9 years ago
Hopefully fixed in r134.

Original comment by ne...@neiltiffin.com on 24 Aug 2010 at 2:36