augmen / rpostgresql

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

Unable to install RPostgreSQL on R 3.1.0 and Mac OSX 10.9 #61

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Borrowed this apt description:

Unable to install RPostgreSQL on R 3.1.0 and Mac OSX 10.9
https://github.com/PecanProject/pecan/issues/131

I too am on a Mavericks OS (10.9) and using the latest R (3.1.0). The binary is 
unavailable and installing from source didn't work.

The good news is that I was able to get it working via the following:

1. Download the source

    svn checkout http://rpostgresql.googlecode.com/svn/trunk/ rpostgresql-read-only

2. Use devtools to install the package from source

    devtools::install('/Users/bbest/Downloads/rpostgresql-read-only/RPostgreSQL')

Here's a transcript of the failed attempts.

> install.packages("RPostgreSQL")

   package ‘RPostgreSQL’ is available as a source package but not as a binary

Warning in install.packages :
  package ‘RPostgreSQL’ is not available (for R version 3.1.0)

> install.packages("RPostgreSQL", type="source")

In file included from RS-PQescape.c:7:
./RS-PostgreSQL.h:23:14: fatal error: 'libpq-fe.h' file not found
#    include "libpq-fe.h"
             ^
1 error generated.
make: *** [RS-PQescape.o] Error 1
ERROR: compilation failed for package ‘RPostgreSQL’

Original issue reported on code.google.com by bb...@nceas.ucsb.edu on 9 Jul 2014 at 5:39

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
There are two version of R 3.1.0 available for the Mavericks.  The Mavericks 
optimized version and the Snow Leopard version.  The difference is that some R 
packages don't work on or are not available in the Mavericks version.  The Snow 
Leopard version works fine on Mavericks and I use it daily.  I won't have time 
to look at this for a couple of weeks, until then, for others with this problem 
either use the Snow Leopard version or the instructions here.

Can I assume you you are using the Mavericks Version of R 3.1.0?

Original comment by ne...@neiltiffin.com on 10 Jul 2014 at 1:34

GoogleCodeExporter commented 9 years ago
I have the same issue. My installation gets past the `'libpq-fe.h' file not 
found` issue, as R finds `pg_config` on my machine, but then I get other error 
messages (see below ... though the error varies by set-up across my three Macs).

In the meantime, while using the binaries for a different version is 
disparaged, the Snow Leopard binary for RPostgreSQL seems to work fine with 
either R Mavericks 3.1.0 and 3.1.1 and either PostgreSQL 9.3 or even 9.4 beta.

R version 3.1.0 (2014-04-10) -- "Spring Dance" Copyright (C) 2014 The R Foundation for Statistical Computing Platform: x86_64-apple-darwin13.1.0 (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details.

Natural language support but running in an English locale

R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R.

setwd("~") system("svn checkout http://rpostgresql.googlecode.com/svn/trunk/ rpostgresql-read-only") Checked out revision 272. install.packages("~/rpostgresql-read-only/RPostgreSQL", repos=NULL, type="source")

  • installing source package ‘RPostgreSQL’ ... 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-apple-darwin13.3.0 checking host system type... x86_64-apple-darwin13.3.0 checking target system type... x86_64-apple-darwin13.3.0 checking for pg_config... /usr/bin/pg_config checking for "/opt/local/include/postgresql93/libpq-fe.h"... yes configure: creating ./config.status config.status: creating src/Makevars * libs make: Nothing to be done for `all'. installing to /Library/Frameworks/R.framework/Versions/3.1/Resources/library/RPostgreSQL/libs * R * inst * preparing package for lazy loading Creating a generic function for ‘format’ from package ‘base’ in package ‘RPostgreSQL’ Creating a generic function for ‘print’ from package ‘base’ in package ‘RPostgreSQL’ \ help ** installing help indices * building package indices \ testing if installed package can be loaded Error in dyn.load(file, DLLpath = DLLpath, ...) : unable to load shared object '/Library/Frameworks/R.framework/Versions/3.1/Resources/library/RPostgreSQL/libs/RPostgreSQL.so': dlopen(/Library/Frameworks/R.framework/Versions/3.1/Resources/library/RPostgreSQL/libs/RPostgreSQL.so, 6): Symbol not found: _PQbackendPID Referenced from: /Library/Frameworks/R.framework/Versions/3.1/Resources/library/RPostgreSQL/libs/RPostgreSQL.so Expected in: flat namespace in /Library/Frameworks/R.framework/Versions/3.1/Resources/library/RPostgreSQL/libs/RPostgreSQL.so Error: loading failed Execution halted ERROR: loading failed
  • removing ‘/Library/Frameworks/R.framework/Versions/3.1/Resources/library/RPostgreSQL’
  • restoring previous ‘/Library/Frameworks/R.framework/Versions/3.1/Resources/library/RPostgreSQL’ Warning in install.packages : installation of package ‘/Users/igow/rpostgresql-read-only/RPostgreSQL’ had non-zero exit status

Original comment by iand...@gmail.com on 17 Jul 2014 at 2:33

GoogleCodeExporter commented 9 years ago
In place of the `make: Nothing to be done for `all'.` insert the following if 
compiling in a clean directory:

\ libs clang -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I/opt/local/include/postgresql93 -I/usr/local/include -I/usr/local/include/freetype2 -I/opt/X11/include -fPIC -Wall -mtune=core2 -g -O2 -c RS-DBI.c -o RS-DBI.o clang -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I/opt/local/include/postgresql93 -I/usr/local/include -I/usr/local/include/freetype2 -I/opt/X11/include -fPIC -Wall -mtune=core2 -g -O2 -c RS-PQescape.c -o RS-PQescape.o clang -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I/opt/local/include/postgresql93 -I/usr/local/include -I/usr/local/include/freetype2 -I/opt/X11/include -fPIC -Wall -mtune=core2 -g -O2 -c RS-PostgreSQL.c -o RS-PostgreSQL.o clang -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I/opt/local/include/postgresql93 -I/usr/local/include -I/usr/local/include/freetype2 -I/opt/X11/include -fPIC -Wall -mtune=core2 -g -O2 -c RS-pgsql-copy.c -o RS-pgsql-copy.o clang -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I/opt/local/include/postgresql93 -I/usr/local/include -I/usr/local/include/freetype2 -I/opt/X11/include -fPIC -Wall -mtune=core2 -g -O2 -c RS-pgsql-getResult.c -o RS-pgsql-getResult.o clang -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I/opt/local/include/postgresql93 -I/usr/local/include -I/usr/local/include/freetype2 -I/opt/X11/include -fPIC -Wall -mtune=core2 -g -O2 -c RS-pgsql-pqexec.c -o RS-pgsql-pqexec.o clang -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I/opt/local/include/postgresql93 -I/usr/local/include -I/usr/local/include/freetype2 -I/opt/X11/include -fPIC -Wall -mtune=core2 -g -O2 -c RS-pgsql-pqexecparams.c -o RS-pgsql-pqexecparams.o clang -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -single_module -multiply_defined suppress -L/usr/local/lib -o RPostgreSQL.so RS-DBI.o RS-PQescape.o RS-PostgreSQL.o RS-pgsql-copy.o RS-pgsql-getResult.o RS-pgsql-pqexec.o RS-pgsql-pqexecparams.o -F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework -Wl,CoreFoundation

Original comment by iand...@gmail.com on 17 Jul 2014 at 3:23

GoogleCodeExporter commented 9 years ago
For #1, Reported by bbest@nceas.ucsb.edu, Jul 9, 2014

You need to add the path for pg_config.  The following worked fine on my system 
with R 3.1.1 GUI 1.65 Mavericks build (6784).

devtools::add_path('/opt/local/lib/postgresql93/bin')
devtools::install('/Maui-Dev/RPostgreSQL/rpostgresql/RPostgreSQL')

Original comment by ne...@neiltiffin.com on 23 Jul 2014 at 11:48

GoogleCodeExporter commented 9 years ago
Adding path per #5 does not change the error message I get (this makes sense as 
R is clearly able to find pg_config).

I still see `Symbol not found: _PQbackendPID` when the package attempts to load.

Original comment by iand...@gmail.com on 23 Jul 2014 at 11:55

GoogleCodeExporter commented 9 years ago
For #3 iandgow,

I could not reproduce your problem with R 3.1.1 GUI 1.65 Mavericks build 
(6784).  I am marking it closed.  Please add a new issue if the problem 
persists with R 3.1.1.

Original comment by ne...@neiltiffin.com on 23 Jul 2014 at 11:56

GoogleCodeExporter commented 9 years ago
But has the related issue on CRAN been resolved?

http://www.r-project.org/nosvn/R.check/r-release-osx-x86_64-mavericks/RPostgreSQ
L-00check.html
http://www.r-project.org/nosvn/R.check/r-release-osx-x86_64-mavericks/RPostgreSQ
L-00install.html

That seems to be simply R not finding pg_config. (Is it something that the 
RPostgreSQL developers can fix? It seems one needs to know where PostgreSQL is 
on the CRAN system.)

(Once the CRAN issue is solved, I guess I can just download binaries.)

Original comment by iand...@gmail.com on 23 Jul 2014 at 12:14

GoogleCodeExporter commented 9 years ago
Or just update from 3.1.0 to 3.1.1 and see if the problem goes away.

Original comment by ne...@neiltiffin.com on 23 Jul 2014 at 12:37

GoogleCodeExporter commented 9 years ago
I already tried that and it does not. Mind you, I seem the same issue with the 
Snow Leopard build and with a different installation of PostgreSQL 
(EnterpriseDB package in place of the MacPorts version). I did a source 
installation successfully in May 
<http://iangow.wordpress.com/2014/05/09/installing-rpostgresql-with-r-3-1-0-mave
ricks-build/>, but now have the same issue across three Macs. I have no idea 
why.

So my issue is *not* the same as the CRAN issue. I guess the CRAN issue is the 
one to be solved.

Original comment by iand...@gmail.com on 23 Jul 2014 at 1:38

GoogleCodeExporter commented 9 years ago
What the error in #3 post is saying is that R cannot find the symbol 
_PQbackendPID in the postgresql libpq that R finds.  Usually this means that 
either R is not finding libpq lib or there is a mismatch with the one it does 
find and the expectation in RPostgreSQL.  But this really makes no sense as 
_PQbackendPID has been around a long time.

I'm guessing that somehow R is getting confused.  If possible I would remove 
all versions of postgresql, Try again, to build RPostgreSQL without any 
postgresql installed.  If RPostgreSQL does not find any postgresql installation 
it uses its own internal libpq which has this symbol (but is otherwise quite 
old, for compatibility).

I just committed an update to make sure RPostgreSQL finds its own libpq-he.h 
which should also fix the cran build the next time the source is pushed to cran.

Original comment by ne...@neiltiffin.com on 23 Jul 2014 at 2:14

GoogleCodeExporter commented 9 years ago
Neil:

Thanks.

I pulled PostgreSQL from the path and pulled down revision 273. It seems that 
the packages finds libpq-fe.h in XCode. I don't know what the error message 
below means.

As RPostgreSQL works for me (using the Snow Leopard binary), I can happily wait 
for the new source to be pushed to CRAN (CRAN version seems to be from March 
2013!) and see if I can't pull the binaries then.

-Ian

Installing package into �/Users/igow/Library/R/3.1/library�
(as �lib� is unspecified)
[1] "en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8"
* installing *source* package �RPostgreSQL� ...
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
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-apple-darwin13.3.0
checking host system type... x86_64-apple-darwin13.3.0
checking target system type... x86_64-apple-darwin13.3.0
checking for pg_config... no
configure: checking for PostgreSQL header files
configure: Checking include /usr/include.
configure: Checking include 
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/S
DKs/MacOSX10.8.sdk/usr/include.
configure: Checking lib /usr/lib.
/usr/lib
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/S
DKs/MacOSX10.8.sdk/usr/include
checking for 
"/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/
SDKs/MacOSX10.8.sdk/usr/include/libpq-fe.h"... yes
configure: creating ./config.status
config.status: creating src/Makevars
** libs
clang -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG 
-I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer
/SDKs/MacOSX10.8.sdk/usr/include -I/usr/local/include 
-I/usr/local/include/freetype2 -I/opt/X11/include    -fPIC  -Wall -mtune=core2 
-g -O2  -c RS-DBI.c -o RS-DBI.o
clang -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG 
-I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer
/SDKs/MacOSX10.8.sdk/usr/include -I/usr/local/include 
-I/usr/local/include/freetype2 -I/opt/X11/include    -fPIC  -Wall -mtune=core2 
-g -O2  -c RS-PQescape.c -o RS-PQescape.o
clang -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG 
-I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer
/SDKs/MacOSX10.8.sdk/usr/include -I/usr/local/include 
-I/usr/local/include/freetype2 -I/opt/X11/include    -fPIC  -Wall -mtune=core2 
-g -O2  -c RS-PostgreSQL.c -o RS-PostgreSQL.o
clang -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG 
-I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer
/SDKs/MacOSX10.8.sdk/usr/include -I/usr/local/include 
-I/usr/local/include/freetype2 -I/opt/X11/include    -fPIC  -Wall -mtune=core2 
-g -O2  -c RS-pgsql-copy.c -o RS-pgsql-copy.o
clang -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG 
-I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer
/SDKs/MacOSX10.8.sdk/usr/include -I/usr/local/include 
-I/usr/local/include/freetype2 -I/opt/X11/include    -fPIC  -Wall -mtune=core2 
-g -O2  -c RS-pgsql-getResult.c -o RS-pgsql-getResult.o
clang -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG 
-I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer
/SDKs/MacOSX10.8.sdk/usr/include -I/usr/local/include 
-I/usr/local/include/freetype2 -I/opt/X11/include    -fPIC  -Wall -mtune=core2 
-g -O2  -c RS-pgsql-pqexec.c -o RS-pgsql-pqexec.o
clang -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG 
-I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer
/SDKs/MacOSX10.8.sdk/usr/include -I/usr/local/include 
-I/usr/local/include/freetype2 -I/opt/X11/include    -fPIC  -Wall -mtune=core2 
-g -O2  -c RS-pgsql-pqexecparams.c -o RS-pgsql-pqexecparams.o
/bin/sh: -c: line 0: unexpected EOF while looking for matching `''
/bin/sh: -c: line 1: syntax error: unexpected end of file
make: *** [RPostgreSQL.so] Error 2
ERROR: compilation failed for package �RPostgreSQL�
* removing �/Users/igow/Library/R/3.1/library/RPostgreSQL�
Warning in install.packages :
  installation of package �/Users/igow/rpostgresql-read-only/RPostgreSQL� had non-zero exit status

Original comment by iand...@gmail.com on 23 Jul 2014 at 2:51

GoogleCodeExporter commented 9 years ago
For any followup to this issues please include the following:

1. The result of the following R commands: 
Sys.getenv("PATH")
system('sw_vers')
system('xcodebuild -version')
system('pg_config')

2. The versions and locations of all installed postgesql instances.

3. A new listing of the attempted install, using the latest repository version 
of RPostgreSQL.

Original comment by ne...@neiltiffin.com on 23 Jul 2014 at 3:14

GoogleCodeExporter commented 9 years ago
it probably means I messed up the configure script.  BTW I did not see your 
latest post before I posted #13.

Original comment by ne...@neiltiffin.com on 23 Jul 2014 at 3:18

GoogleCodeExporter commented 9 years ago
Nope it still works for me.

R version 3.1.1 (2014-07-10) -- "Sock it to Me"
Copyright (C) 2014 The R Foundation for Statistical Computing
Platform: x86_64-apple-darwin13.1.0 (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

  Natural language support but running in an English locale

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

[R.app GUI 1.65 (6784) x86_64-apple-darwin13.1.0]

[Workspace restored from /Users/neiltiffin/.RData]
[History restored from /Users/neiltiffin/.Rhistory]

> setwd("~/test")
Error in setwd("~/test") : cannot change working directory
> setwd("~/test")
> system("svn checkout http://rpostgresql.googlecode.com/svn/trunk/ 
rpostgresql-read-only")
A    rpostgresql-read-only/exttests
A    rpostgresql-read-only/exttests/dbColumnInfo.R
A    rpostgresql-read-only/exttests/connectWithNull.R
A    rpostgresql-read-only/exttests/unknowntype.R
A    rpostgresql-read-only/exttests/bytea.R
A    rpostgresql-read-only/exttests/connectWithNull.Rout.save
A    rpostgresql-read-only/exttests/bytea.Rout.save
A    rpostgresql-read-only/RPostgreSQL
A    rpostgresql-read-only/RPostgreSQL/R
A    rpostgresql-read-only/RPostgreSQL/R/PostgreSQLSupport.R
A    rpostgresql-read-only/RPostgreSQL/R/PostgreSQL.R
A    rpostgresql-read-only/RPostgreSQL/R/S4R.R
A    rpostgresql-read-only/RPostgreSQL/R/dbObjectId.R
A    rpostgresql-read-only/RPostgreSQL/R/zzz.R
A    rpostgresql-read-only/RPostgreSQL/configure
A    rpostgresql-read-only/RPostgreSQL/LICENSE
A    rpostgresql-read-only/RPostgreSQL/tests
A    rpostgresql-read-only/RPostgreSQL/tests/dbGetQueryParams.R
A    rpostgresql-read-only/RPostgreSQL/tests/datetimeTests.R
A    rpostgresql-read-only/RPostgreSQL/tests/dbColumnInfo.R
A    rpostgresql-read-only/RPostgreSQL/tests/dbtemptable.R
A    rpostgresql-read-only/RPostgreSQL/tests/selectWithAlias.R
A    rpostgresql-read-only/RPostgreSQL/tests/loadDriverAndConnect.R
A    rpostgresql-read-only/RPostgreSQL/tests/dbWriteTableSchema.R
A    rpostgresql-read-only/RPostgreSQL/tests/dateTZ.R
A    rpostgresql-read-only/RPostgreSQL/tests/dbWriteTabletypes.R
A    rpostgresql-read-only/RPostgreSQL/tests/dbExistsIssue.R
A    rpostgresql-read-only/RPostgreSQL/tests/dataTypeTests.R
A    rpostgresql-read-only/RPostgreSQL/tests/createTableMixedCaseTest.R
A    rpostgresql-read-only/RPostgreSQL/tests/escape.R
A    rpostgresql-read-only/RPostgreSQL/tests/openSendQuery.R
A    rpostgresql-read-only/RPostgreSQL/tests/unknowntype.R
A    rpostgresql-read-only/RPostgreSQL/tests/dbWriteTableFailTest.R
A    rpostgresql-read-only/RPostgreSQL/tests/bytea.R
A    rpostgresql-read-only/RPostgreSQL/tests/dbExistsq.R
A    rpostgresql-read-only/RPostgreSQL/tests/dbWriteTableTest.R
A    rpostgresql-read-only/RPostgreSQL/tests/dbListFields.R
A    rpostgresql-read-only/RPostgreSQL/tests/dbExistsqc.R
A    rpostgresql-read-only/RPostgreSQL/tests/selectWhereZero.R
A    rpostgresql-read-only/RPostgreSQL/tests/datetimestampwrite.R
A    rpostgresql-read-only/RPostgreSQL/tests/dbTransactionTests.R
A    rpostgresql-read-only/RPostgreSQL/DESCRIPTION
A    rpostgresql-read-only/RPostgreSQL/configure.in
A    rpostgresql-read-only/RPostgreSQL/ChangeLog
A    rpostgresql-read-only/RPostgreSQL/src
A    rpostgresql-read-only/RPostgreSQL/src/RS-pgsql-pqexecparams.c
A    rpostgresql-read-only/RPostgreSQL/src/config.guess
A    rpostgresql-read-only/RPostgreSQL/src/config.sub
A    rpostgresql-read-only/RPostgreSQL/src/S4R.h
A    rpostgresql-read-only/RPostgreSQL/src/RS-DBI.c
A    rpostgresql-read-only/RPostgreSQL/src/RS-pgsql-copy.c
A    rpostgresql-read-only/RPostgreSQL/src/RS-PQescape.c
A    rpostgresql-read-only/RPostgreSQL/src/Makevars.win
A    rpostgresql-read-only/RPostgreSQL/src/RS-pgsql-getResult.c
A    rpostgresql-read-only/RPostgreSQL/src/RS-PostgreSQL.c
A    rpostgresql-read-only/RPostgreSQL/src/RS-DBI.h
A    rpostgresql-read-only/RPostgreSQL/src/libpq
A    rpostgresql-read-only/RPostgreSQL/src/libpq/libpq.rc.in
A    rpostgresql-read-only/RPostgreSQL/src/libpq/pgsleep.c
A    rpostgresql-read-only/RPostgreSQL/src/libpq/crypt.c
A    rpostgresql-read-only/RPostgreSQL/src/libpq/win32.c
A    rpostgresql-read-only/RPostgreSQL/src/libpq/Makefile.port.darwin
A    rpostgresql-read-only/RPostgreSQL/src/libpq/win32.h
A    rpostgresql-read-only/RPostgreSQL/src/libpq/ip.c
A    rpostgresql-read-only/RPostgreSQL/src/libpq/wininclude
A    rpostgresql-read-only/RPostgreSQL/src/libpq/wininclude/pwd.h
A    rpostgresql-read-only/RPostgreSQL/src/libpq/wininclude/netdb.h
A    rpostgresql-read-only/RPostgreSQL/src/libpq/wininclude/arpa
A    rpostgresql-read-only/RPostgreSQL/src/libpq/wininclude/arpa/inet.h
A    rpostgresql-read-only/RPostgreSQL/src/libpq/wininclude/netinet
A    rpostgresql-read-only/RPostgreSQL/src/libpq/wininclude/netinet/in.h
A    rpostgresql-read-only/RPostgreSQL/src/libpq/wininclude/sys
A    rpostgresql-read-only/RPostgreSQL/src/libpq/wininclude/sys/wait.h
A    rpostgresql-read-only/RPostgreSQL/src/libpq/wininclude/sys/socket.h
A    rpostgresql-read-only/RPostgreSQL/src/libpq/inet_aton.c
A    rpostgresql-read-only/RPostgreSQL/src/libpq/fe-misc.c
A    rpostgresql-read-only/RPostgreSQL/src/libpq/fe-print.c
A    rpostgresql-read-only/RPostgreSQL/src/libpq/chklocale.c
A    rpostgresql-read-only/RPostgreSQL/src/libpq/md5.c
A    rpostgresql-read-only/RPostgreSQL/src/libpq/pthread-win32.c
A    rpostgresql-read-only/RPostgreSQL/src/libpq/COPYRIGHT
A    rpostgresql-read-only/RPostgreSQL/src/libpq/encnames.c
A    rpostgresql-read-only/RPostgreSQL/src/libpq/libpq-dist.rc
A    rpostgresql-read-only/RPostgreSQL/src/libpq/pthread-win32.h
A    rpostgresql-read-only/RPostgreSQL/src/libpq/pg_config_paths.h
A    rpostgresql-read-only/RPostgreSQL/src/libpq/strlcpy.c
A    rpostgresql-read-only/RPostgreSQL/src/libpq/Makefile.global.win64
A    rpostgresql-read-only/RPostgreSQL/src/libpq/libpq-int.h
A    rpostgresql-read-only/RPostgreSQL/src/libpq/win32error.c
A    rpostgresql-read-only/RPostgreSQL/src/libpq/fe-protocol3.c
A    rpostgresql-read-only/RPostgreSQL/src/libpq/fe-secure.c
A    rpostgresql-read-only/RPostgreSQL/src/libpq/Makefile.darwin
A    rpostgresql-read-only/RPostgreSQL/src/libpq/pg_config_ext.h
A    rpostgresql-read-only/RPostgreSQL/src/libpq/pg_config.h.darwin
A    rpostgresql-read-only/RPostgreSQL/src/libpq/pg_config_os.h.darwin
A    rpostgresql-read-only/RPostgreSQL/src/libpq/postgres_fe.h
A    rpostgresql-read-only/RPostgreSQL/src/libpq/pqexpbuffer.c
A    rpostgresql-read-only/RPostgreSQL/src/libpq/noblock.c
A    rpostgresql-read-only/RPostgreSQL/src/libpq/Makefile.win
A    rpostgresql-read-only/RPostgreSQL/src/libpq/fe-auth.c
A    rpostgresql-read-only/RPostgreSQL/src/libpq/libpq.rc
A    rpostgresql-read-only/RPostgreSQL/src/libpq/pg_config_paths.h.win
A    rpostgresql-read-only/RPostgreSQL/src/libpq/pqexpbuffer.h
A    rpostgresql-read-only/RPostgreSQL/src/libpq/Makefile.global.win32
A    rpostgresql-read-only/RPostgreSQL/src/libpq/pg_config.h.win
A    rpostgresql-read-only/RPostgreSQL/src/libpq/Makefile.shlib
A    rpostgresql-read-only/RPostgreSQL/src/libpq/pg_config_manual.h
A    rpostgresql-read-only/RPostgreSQL/src/libpq/fe-auth.h
A    rpostgresql-read-only/RPostgreSQL/src/libpq/open.c
A    rpostgresql-read-only/RPostgreSQL/src/libpq/exports.txt
A    rpostgresql-read-only/RPostgreSQL/src/libpq/snprintf.c
A    rpostgresql-read-only/RPostgreSQL/src/libpq/libpq-fe.h
A    rpostgresql-read-only/RPostgreSQL/src/libpq/libpq-events.c
A    rpostgresql-read-only/RPostgreSQL/src/libpq/fe-exec.c
A    rpostgresql-read-only/RPostgreSQL/src/libpq/Makefile.global.darwin
A    rpostgresql-read-only/RPostgreSQL/src/libpq/fe-lobj.c
A    rpostgresql-read-only/RPostgreSQL/src/libpq/pqsignal.c
A    rpostgresql-read-only/RPostgreSQL/src/libpq/libpq-events.h
A    rpostgresql-read-only/RPostgreSQL/src/libpq/nls.mk
A    rpostgresql-read-only/RPostgreSQL/src/libpq/blibpqdll.def
A    rpostgresql-read-only/RPostgreSQL/src/libpq/fe-connect.c
A    rpostgresql-read-only/RPostgreSQL/src/libpq/bcc32.mak
A    rpostgresql-read-only/RPostgreSQL/src/libpq/pg_config_paths.h.darwin
A    rpostgresql-read-only/RPostgreSQL/src/libpq/pqsignal.h
A    rpostgresql-read-only/RPostgreSQL/src/libpq/libpqddll.def
A    rpostgresql-read-only/RPostgreSQL/src/libpq/port.h
A    rpostgresql-read-only/RPostgreSQL/src/libpq/pgstrcasecmp.c
A    rpostgresql-read-only/RPostgreSQL/src/libpq/pg_config_os.h.win
A    rpostgresql-read-only/RPostgreSQL/src/libpq/win32setlocale.c
A    rpostgresql-read-only/RPostgreSQL/src/libpq/wchar.c
A    rpostgresql-read-only/RPostgreSQL/src/libpq/inet_net_ntop.c
A    rpostgresql-read-only/RPostgreSQL/src/libpq/common
A    rpostgresql-read-only/RPostgreSQL/src/libpq/common/fe_memutils.h
A    rpostgresql-read-only/RPostgreSQL/src/libpq/thread.c
A    rpostgresql-read-only/RPostgreSQL/src/libpq/pg_service.conf.sample
A    rpostgresql-read-only/RPostgreSQL/src/libpq/fe-protocol2.c
A    rpostgresql-read-only/RPostgreSQL/src/libpq/README
A    rpostgresql-read-only/RPostgreSQL/src/libpq/mb
A    rpostgresql-read-only/RPostgreSQL/src/libpq/mb/pg_wchar.h
A    rpostgresql-read-only/RPostgreSQL/src/libpq/utils
A    rpostgresql-read-only/RPostgreSQL/src/libpq/utils/palloc.h
A    rpostgresql-read-only/RPostgreSQL/src/libpq/libpqdll.def
A    rpostgresql-read-only/RPostgreSQL/src/libpq/getaddrinfo.c
A    rpostgresql-read-only/RPostgreSQL/src/libpq/libpq
A    rpostgresql-read-only/RPostgreSQL/src/libpq/libpq/pqformat.h
A    rpostgresql-read-only/RPostgreSQL/src/libpq/libpq/hba.h
A    rpostgresql-read-only/RPostgreSQL/src/libpq/libpq/libpq-be.h
A    rpostgresql-read-only/RPostgreSQL/src/libpq/libpq/pqcomm.h
A    rpostgresql-read-only/RPostgreSQL/src/libpq/libpq/be-fsstubs.h
A    rpostgresql-read-only/RPostgreSQL/src/libpq/libpq/libpq-fs.h
A    rpostgresql-read-only/RPostgreSQL/src/libpq/libpq/pqsignal.h
A    rpostgresql-read-only/RPostgreSQL/src/libpq/libpq/auth.h
A    rpostgresql-read-only/RPostgreSQL/src/libpq/libpq/crypt.h
A    rpostgresql-read-only/RPostgreSQL/src/libpq/libpq/md5.h
A    rpostgresql-read-only/RPostgreSQL/src/libpq/libpq/libpq.h
A    rpostgresql-read-only/RPostgreSQL/src/libpq/libpq/ip.h
A    rpostgresql-read-only/RPostgreSQL/src/libpq/c.h
A    rpostgresql-read-only/RPostgreSQL/src/libpq/win32.mak
A    rpostgresql-read-only/RPostgreSQL/src/libpq/getaddrinfo.h
A    rpostgresql-read-only/RPostgreSQL/src/libpq/postgres_ext.h
A    rpostgresql-read-only/RPostgreSQL/src/libpq/Makefile.win32
A    rpostgresql-read-only/RPostgreSQL/src/RS-PostgreSQL.h
A    rpostgresql-read-only/RPostgreSQL/src/RS-pgsql-pqexec.c
A    rpostgresql-read-only/RPostgreSQL/src/Makevars.in
A    rpostgresql-read-only/RPostgreSQL/src/install-sh
A    rpostgresql-read-only/RPostgreSQL/cleanup
A    rpostgresql-read-only/RPostgreSQL/man
A    rpostgresql-read-only/RPostgreSQL/man/dbListTables-methods.Rd
A    rpostgresql-read-only/RPostgreSQL/man/isPostgresqlIdCurrent.Rd
A    rpostgresql-read-only/RPostgreSQL/man/postgresqlDBApply.Rd
A    rpostgresql-read-only/RPostgreSQL/man/dbDataType-methods.Rd
A    rpostgresql-read-only/RPostgreSQL/man/PostgreSQLDriver-class.Rd
A    rpostgresql-read-only/RPostgreSQL/man/PostgreSQLConnection-class.Rd
A    rpostgresql-read-only/RPostgreSQL/man/dbSendQuery-methods.Rd
A    rpostgresql-read-only/RPostgreSQL/man/dbReadTable-methods.Rd
A    rpostgresql-read-only/RPostgreSQL/man/fetch-methods.Rd
A    rpostgresql-read-only/RPostgreSQL/man/dbApply.Rd
A    rpostgresql-read-only/RPostgreSQL/man/dbSetDataMappings-methods.Rd
A    rpostgresql-read-only/RPostgreSQL/man/dbObjectId-class.Rd
A    rpostgresql-read-only/RPostgreSQL/man/dbApply-methods.Rd
A    rpostgresql-read-only/RPostgreSQL/man/PostgreSQLObject-class.Rd
A    rpostgresql-read-only/RPostgreSQL/man/summary-methods.Rd
A    rpostgresql-read-only/RPostgreSQL/man/dbCommit-methods.Rd
A    rpostgresql-read-only/RPostgreSQL/man/dbConnect-methods.Rd
A    rpostgresql-read-only/RPostgreSQL/man/postgresqlSupport.Rd
A    rpostgresql-read-only/RPostgreSQL/man/dbGetInfo-methods.Rd
A    rpostgresql-read-only/RPostgreSQL/man/dbDriver-methods.Rd
A    rpostgresql-read-only/RPostgreSQL/man/PostgreSQL.Rd
A    rpostgresql-read-only/RPostgreSQL/man/postgresqlBuildTableDefinition.Rd
A    rpostgresql-read-only/RPostgreSQL/man/make.db.names-methods.Rd
A    rpostgresql-read-only/RPostgreSQL/man/PostgreSQLResult-class.Rd
A    rpostgresql-read-only/RPostgreSQL/man/dbCallProc-methods.Rd
A    rpostgresql-read-only/RPostgreSQL/man/S4R.Rd
A    rpostgresql-read-only/RPostgreSQL/NAMESPACE
A    rpostgresql-read-only/RPostgreSQL/inst
A    rpostgresql-read-only/RPostgreSQL/inst/devTests
A    rpostgresql-read-only/RPostgreSQL/inst/devTests/PostgreSQLDataTypeTest.r
A    rpostgresql-read-only/RPostgreSQL/inst/devTests/typeTest.r
A    rpostgresql-read-only/RPostgreSQL/inst/devTests/transactionManagement.r
A    rpostgresql-read-only/RPostgreSQL/inst/devTests/copyTest.sh
A    rpostgresql-read-only/RPostgreSQL/inst/devTests/demo.r
A    rpostgresql-read-only/RPostgreSQL/inst/devTests/timeTypeComparison.r
A    rpostgresql-read-only/RPostgreSQL/inst/devTests/datetime.r
A    rpostgresql-read-only/RPostgreSQL/inst/TODO
A    rpostgresql-read-only/RPostgreSQL/inst/THANKS
A    rpostgresql-read-only/RPostgreSQL/inst/ANNOUNCEMENT
A    rpostgresql-read-only/RPostgreSQL/inst/NEWS
A    rpostgresql-read-only/RPostgreSQL/inst/README
A    rpostgresql-read-only/RPostgreSQL/configure.win
A    rpostgresql-read-only/build_check_with_vars.sh
A    rpostgresql-read-only/check_with_vars.sh
Checked out revision 273.
> install.packages("~/test/rpostgresql-read-only/RPostgreSQL", repos=NULL, 
type="source")
* installing *source* package ‘RPostgreSQL’ ...
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... checking whether we are cross 
compiling... no
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-apple-darwin13.3.0
checking host system type... x86_64-apple-darwin13.3.0
checking target system type... x86_64-apple-darwin13.3.0
checking for pg_config... no
configure: checking for PostgreSQL header files
configure: Checking include /usr/include.
configure: Checking include 
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/S
DKs/MacOSX10.8.sdk/usr/include.
configure: Checking lib /usr/lib.
/usr/lib
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/S
DKs/MacOSX10.8.sdk/usr/include
checking for 
"/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/
SDKs/MacOSX10.8.sdk/usr/include/libpq-fe.h"... yes
configure: creating ./config.status
config.status: creating src/Makevars
** libs
clang -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG 
-I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer
/SDKs/MacOSX10.8.sdk/usr/include -I/usr/local/include 
-I/usr/local/include/freetype2 -I/opt/X11/include    -fPIC  -Wall -mtune=core2 
-g -O2  -c RS-DBI.c -o RS-DBI.o
clang -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG 
-I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer
/SDKs/MacOSX10.8.sdk/usr/include -I/usr/local/include 
-I/usr/local/include/freetype2 -I/opt/X11/include    -fPIC  -Wall -mtune=core2 
-g -O2  -c RS-PQescape.c -o RS-PQescape.o
clang -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG 
-I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer
/SDKs/MacOSX10.8.sdk/usr/include -I/usr/local/include 
-I/usr/local/include/freetype2 -I/opt/X11/include    -fPIC  -Wall -mtune=core2 
-g -O2  -c RS-PostgreSQL.c -o RS-PostgreSQL.o
clang -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG 
-I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer
/SDKs/MacOSX10.8.sdk/usr/include -I/usr/local/include 
-I/usr/local/include/freetype2 -I/opt/X11/include    -fPIC  -Wall -mtune=core2 
-g -O2  -c RS-pgsql-copy.c -o RS-pgsql-copy.o
clang -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG 
-I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer
/SDKs/MacOSX10.8.sdk/usr/include -I/usr/local/include 
-I/usr/local/include/freetype2 -I/opt/X11/include    -fPIC  -Wall -mtune=core2 
-g -O2  -c RS-pgsql-getResult.c -o RS-pgsql-getResult.o
clang -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG 
-I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer
/SDKs/MacOSX10.8.sdk/usr/include -I/usr/local/include 
-I/usr/local/include/freetype2 -I/opt/X11/include    -fPIC  -Wall -mtune=core2 
-g -O2  -c RS-pgsql-pqexec.c -o RS-pgsql-pqexec.o
clang -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG 
-I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer
/SDKs/MacOSX10.8.sdk/usr/include -I/usr/local/include 
-I/usr/local/include/freetype2 -I/opt/X11/include    -fPIC  -Wall -mtune=core2 
-g -O2  -c RS-pgsql-pqexecparams.c -o RS-pgsql-pqexecparams.o
clang -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup 
-single_module -multiply_defined suppress -L/usr/local/lib -o RPostgreSQL.so 
RS-DBI.o RS-PQescape.o RS-PostgreSQL.o RS-pgsql-copy.o RS-pgsql-getResult.o 
RS-pgsql-pqexec.o RS-pgsql-pqexecparams.o -L/usr/lib -lpq 
-F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework 
-Wl,CoreFoundation
installing to 
/Library/Frameworks/R.framework/Versions/3.1/Resources/library/RPostgreSQL/libs
** R
** inst
** preparing package for lazy loading
Creating a generic function for ‘format’ from package ‘base’ in package 
‘RPostgreSQL’
Creating a generic function for ‘print’ from package ‘base’ in package 
‘RPostgreSQL’
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded
* DONE (RPostgreSQL)
>

Original comment by ne...@neiltiffin.com on 23 Jul 2014 at 3:25

GoogleCodeExporter commented 9 years ago
For completeness #15 was with:

> Sys.getenv("PATH")
[1] "/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin"
> system('sw_vers')
ProductName:    Mac OS X
ProductVersion: 10.9.4
BuildVersion:   13E28
> system('xcodebuild -version')
Xcode 5.1.1
Build version 5B1008
> system('pg_config')
/bin/sh: pg_config: command not found

Original comment by ne...@neiltiffin.com on 23 Jul 2014 at 3:39

GoogleCodeExporter commented 9 years ago
Neil:

Clearly something is messed up with my system. I removed all instances of 
PostgreSQL to no avail. 

It does seem that the installation uses files in /usr/lib/. Here's what I have:

igow-mbpretina:~ igow$ ls -hlt /usr/lib/libpq*
lrwxr-xr-x  1 root  wheel    15B Nov  8  2013 /usr/lib/libpq.5.dylib -> 
libpq.5.5.dylib
lrwxr-xr-x  1 root  wheel    15B Nov  8  2013 /usr/lib/libpq.dylib -> 
libpq.5.5.dylib
-rwxr-xr-x  1 root  wheel   148K Nov  8  2013 /usr/lib/libpq.5.5.dylib

In the meantime, this works:

 wget http://cran.r-project.org/bin/macosx/contrib/3.1/RPostgreSQL_0.4.tgz
 sudo tar -zxf RPostgreSQL_0.4.tgz -C /Library/Frameworks/R.framework/Versions/3.1/Resources/library

Loading required package: DBI

     cusip permno permco issuno
1 68391610  10000   7952  10396
2 68391610  10000   7952  10396
3 68391610  10000   7952  10396
4 68391610  10000   7952  10396
5 68391610  10000   7952  10396

Requested details below:

-Ian

Requested details:

R version 3.1.1 (2014-07-10) -- "Sock it to Me"
Copyright (C) 2014 The R Foundation for Statistical Computing
Platform: x86_64-apple-darwin13.1.0 (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

  Natural language support but running in an English locale

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

[Workspace loaded from ~/.RData]

[1] "/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/opt/X11/bin:/opt/local/bin"

ProductName:    Mac OS X
ProductVersion: 10.9.4
BuildVersion:   13E28

Xcode 5.1.1
Build version 5B1008

sh: pg_config: command not found

A    rpostgresql-read-only/exttests
A    rpostgresql-read-only/exttests/dbColumnInfo.R
A    rpostgresql-read-only/exttests/connectWithNull.R
A    rpostgresql-read-only/exttests/unknowntype.R
A    rpostgresql-read-only/exttests/bytea.R
A    rpostgresql-read-only/exttests/connectWithNull.Rout.save
A    rpostgresql-read-only/exttests/bytea.Rout.save
A    rpostgresql-read-only/RPostgreSQL
A    rpostgresql-read-only/RPostgreSQL/R
A    rpostgresql-read-only/RPostgreSQL/R/PostgreSQLSupport.R
A    rpostgresql-read-only/RPostgreSQL/R/PostgreSQL.R
A    rpostgresql-read-only/RPostgreSQL/R/S4R.R
A    rpostgresql-read-only/RPostgreSQL/R/dbObjectId.R
A    rpostgresql-read-only/RPostgreSQL/R/zzz.R
A    rpostgresql-read-only/RPostgreSQL/configure
A    rpostgresql-read-only/RPostgreSQL/LICENSE
A    rpostgresql-read-only/RPostgreSQL/tests
A    rpostgresql-read-only/RPostgreSQL/tests/dbGetQueryParams.R
A    rpostgresql-read-only/RPostgreSQL/tests/datetimeTests.R
A    rpostgresql-read-only/RPostgreSQL/tests/dbColumnInfo.R
A    rpostgresql-read-only/RPostgreSQL/tests/dbtemptable.R
A    rpostgresql-read-only/RPostgreSQL/tests/selectWithAlias.R
A    rpostgresql-read-only/RPostgreSQL/tests/loadDriverAndConnect.R
A    rpostgresql-read-only/RPostgreSQL/tests/dbWriteTableSchema.R
A    rpostgresql-read-only/RPostgreSQL/tests/dateTZ.R
A    rpostgresql-read-only/RPostgreSQL/tests/dbWriteTabletypes.R
A    rpostgresql-read-only/RPostgreSQL/tests/dbExistsIssue.R
A    rpostgresql-read-only/RPostgreSQL/tests/dataTypeTests.R
A    rpostgresql-read-only/RPostgreSQL/tests/createTableMixedCaseTest.R
A    rpostgresql-read-only/RPostgreSQL/tests/escape.R
A    rpostgresql-read-only/RPostgreSQL/tests/openSendQuery.R
A    rpostgresql-read-only/RPostgreSQL/tests/unknowntype.R
A    rpostgresql-read-only/RPostgreSQL/tests/dbWriteTableFailTest.R
A    rpostgresql-read-only/RPostgreSQL/tests/bytea.R
A    rpostgresql-read-only/RPostgreSQL/tests/dbExistsq.R
A    rpostgresql-read-only/RPostgreSQL/tests/dbWriteTableTest.R
A    rpostgresql-read-only/RPostgreSQL/tests/dbListFields.R
A    rpostgresql-read-only/RPostgreSQL/tests/dbExistsqc.R
A    rpostgresql-read-only/RPostgreSQL/tests/selectWhereZero.R
A    rpostgresql-read-only/RPostgreSQL/tests/datetimestampwrite.R
A    rpostgresql-read-only/RPostgreSQL/tests/dbTransactionTests.R
A    rpostgresql-read-only/RPostgreSQL/DESCRIPTION
A    rpostgresql-read-only/RPostgreSQL/configure.in
A    rpostgresql-read-only/RPostgreSQL/ChangeLog
A    rpostgresql-read-only/RPostgreSQL/src
A    rpostgresql-read-only/RPostgreSQL/src/RS-pgsql-pqexecparams.c
A    rpostgresql-read-only/RPostgreSQL/src/config.guess
A    rpostgresql-read-only/RPostgreSQL/src/config.sub
A    rpostgresql-read-only/RPostgreSQL/src/S4R.h
A    rpostgresql-read-only/RPostgreSQL/src/RS-DBI.c
A    rpostgresql-read-only/RPostgreSQL/src/RS-pgsql-copy.c
A    rpostgresql-read-only/RPostgreSQL/src/RS-PQescape.c
A    rpostgresql-read-only/RPostgreSQL/src/Makevars.win
A    rpostgresql-read-only/RPostgreSQL/src/RS-pgsql-getResult.c
A    rpostgresql-read-only/RPostgreSQL/src/RS-PostgreSQL.c
A    rpostgresql-read-only/RPostgreSQL/src/RS-DBI.h
A    rpostgresql-read-only/RPostgreSQL/src/libpq
A    rpostgresql-read-only/RPostgreSQL/src/libpq/libpq.rc.in
A    rpostgresql-read-only/RPostgreSQL/src/libpq/pgsleep.c
A    rpostgresql-read-only/RPostgreSQL/src/libpq/crypt.c
A    rpostgresql-read-only/RPostgreSQL/src/libpq/win32.c
A    rpostgresql-read-only/RPostgreSQL/src/libpq/Makefile.port.darwin
A    rpostgresql-read-only/RPostgreSQL/src/libpq/win32.h
A    rpostgresql-read-only/RPostgreSQL/src/libpq/ip.c
A    rpostgresql-read-only/RPostgreSQL/src/libpq/wininclude
A    rpostgresql-read-only/RPostgreSQL/src/libpq/wininclude/pwd.h
A    rpostgresql-read-only/RPostgreSQL/src/libpq/wininclude/netdb.h
A    rpostgresql-read-only/RPostgreSQL/src/libpq/wininclude/arpa
A    rpostgresql-read-only/RPostgreSQL/src/libpq/wininclude/arpa/inet.h
A    rpostgresql-read-only/RPostgreSQL/src/libpq/wininclude/netinet
A    rpostgresql-read-only/RPostgreSQL/src/libpq/wininclude/netinet/in.h
A    rpostgresql-read-only/RPostgreSQL/src/libpq/wininclude/sys
A    rpostgresql-read-only/RPostgreSQL/src/libpq/wininclude/sys/wait.h
A    rpostgresql-read-only/RPostgreSQL/src/libpq/wininclude/sys/socket.h
A    rpostgresql-read-only/RPostgreSQL/src/libpq/inet_aton.c
A    rpostgresql-read-only/RPostgreSQL/src/libpq/fe-misc.c
A    rpostgresql-read-only/RPostgreSQL/src/libpq/fe-print.c
A    rpostgresql-read-only/RPostgreSQL/src/libpq/chklocale.c
A    rpostgresql-read-only/RPostgreSQL/src/libpq/md5.c
A    rpostgresql-read-only/RPostgreSQL/src/libpq/pthread-win32.c
A    rpostgresql-read-only/RPostgreSQL/src/libpq/COPYRIGHT
A    rpostgresql-read-only/RPostgreSQL/src/libpq/encnames.c
A    rpostgresql-read-only/RPostgreSQL/src/libpq/libpq-dist.rc
A    rpostgresql-read-only/RPostgreSQL/src/libpq/pthread-win32.h
A    rpostgresql-read-only/RPostgreSQL/src/libpq/pg_config_paths.h
A    rpostgresql-read-only/RPostgreSQL/src/libpq/strlcpy.c
A    rpostgresql-read-only/RPostgreSQL/src/libpq/Makefile.global.win64
A    rpostgresql-read-only/RPostgreSQL/src/libpq/libpq-int.h
A    rpostgresql-read-only/RPostgreSQL/src/libpq/win32error.c
A    rpostgresql-read-only/RPostgreSQL/src/libpq/fe-protocol3.c
A    rpostgresql-read-only/RPostgreSQL/src/libpq/fe-secure.c
A    rpostgresql-read-only/RPostgreSQL/src/libpq/Makefile.darwin
A    rpostgresql-read-only/RPostgreSQL/src/libpq/pg_config_ext.h
A    rpostgresql-read-only/RPostgreSQL/src/libpq/pg_config.h.darwin
A    rpostgresql-read-only/RPostgreSQL/src/libpq/pg_config_os.h.darwin
A    rpostgresql-read-only/RPostgreSQL/src/libpq/postgres_fe.h
A    rpostgresql-read-only/RPostgreSQL/src/libpq/pqexpbuffer.c
A    rpostgresql-read-only/RPostgreSQL/src/libpq/noblock.c
A    rpostgresql-read-only/RPostgreSQL/src/libpq/Makefile.win
A    rpostgresql-read-only/RPostgreSQL/src/libpq/fe-auth.c
A    rpostgresql-read-only/RPostgreSQL/src/libpq/libpq.rc
A    rpostgresql-read-only/RPostgreSQL/src/libpq/pg_config_paths.h.win
A    rpostgresql-read-only/RPostgreSQL/src/libpq/pqexpbuffer.h
A    rpostgresql-read-only/RPostgreSQL/src/libpq/Makefile.global.win32
A    rpostgresql-read-only/RPostgreSQL/src/libpq/pg_config.h.win
A    rpostgresql-read-only/RPostgreSQL/src/libpq/Makefile.shlib
A    rpostgresql-read-only/RPostgreSQL/src/libpq/pg_config_manual.h
A    rpostgresql-read-only/RPostgreSQL/src/libpq/fe-auth.h
A    rpostgresql-read-only/RPostgreSQL/src/libpq/open.c
A    rpostgresql-read-only/RPostgreSQL/src/libpq/exports.txt
A    rpostgresql-read-only/RPostgreSQL/src/libpq/snprintf.c
A    rpostgresql-read-only/RPostgreSQL/src/libpq/libpq-fe.h
A    rpostgresql-read-only/RPostgreSQL/src/libpq/libpq-events.c
A    rpostgresql-read-only/RPostgreSQL/src/libpq/fe-exec.c
A    rpostgresql-read-only/RPostgreSQL/src/libpq/Makefile.global.darwin
A    rpostgresql-read-only/RPostgreSQL/src/libpq/fe-lobj.c
A    rpostgresql-read-only/RPostgreSQL/src/libpq/pqsignal.c
A    rpostgresql-read-only/RPostgreSQL/src/libpq/libpq-events.h
A    rpostgresql-read-only/RPostgreSQL/src/libpq/nls.mk
A    rpostgresql-read-only/RPostgreSQL/src/libpq/blibpqdll.def
A    rpostgresql-read-only/RPostgreSQL/src/libpq/fe-connect.c
A    rpostgresql-read-only/RPostgreSQL/src/libpq/bcc32.mak
A    rpostgresql-read-only/RPostgreSQL/src/libpq/pg_config_paths.h.darwin
A    rpostgresql-read-only/RPostgreSQL/src/libpq/pqsignal.h
A    rpostgresql-read-only/RPostgreSQL/src/libpq/libpqddll.def
A    rpostgresql-read-only/RPostgreSQL/src/libpq/port.h
A    rpostgresql-read-only/RPostgreSQL/src/libpq/pgstrcasecmp.c
A    rpostgresql-read-only/RPostgreSQL/src/libpq/pg_config_os.h.win
A    rpostgresql-read-only/RPostgreSQL/src/libpq/win32setlocale.c
A    rpostgresql-read-only/RPostgreSQL/src/libpq/wchar.c
A    rpostgresql-read-only/RPostgreSQL/src/libpq/inet_net_ntop.c
A    rpostgresql-read-only/RPostgreSQL/src/libpq/common
A    rpostgresql-read-only/RPostgreSQL/src/libpq/common/fe_memutils.h
A    rpostgresql-read-only/RPostgreSQL/src/libpq/thread.c
A    rpostgresql-read-only/RPostgreSQL/src/libpq/pg_service.conf.sample
A    rpostgresql-read-only/RPostgreSQL/src/libpq/fe-protocol2.c
A    rpostgresql-read-only/RPostgreSQL/src/libpq/README
A    rpostgresql-read-only/RPostgreSQL/src/libpq/mb
A    rpostgresql-read-only/RPostgreSQL/src/libpq/mb/pg_wchar.h
A    rpostgresql-read-only/RPostgreSQL/src/libpq/utils
A    rpostgresql-read-only/RPostgreSQL/src/libpq/utils/palloc.h
A    rpostgresql-read-only/RPostgreSQL/src/libpq/libpqdll.def
A    rpostgresql-read-only/RPostgreSQL/src/libpq/getaddrinfo.c
A    rpostgresql-read-only/RPostgreSQL/src/libpq/libpq
A    rpostgresql-read-only/RPostgreSQL/src/libpq/libpq/pqformat.h
A    rpostgresql-read-only/RPostgreSQL/src/libpq/libpq/hba.h
A    rpostgresql-read-only/RPostgreSQL/src/libpq/libpq/libpq-be.h
A    rpostgresql-read-only/RPostgreSQL/src/libpq/libpq/pqcomm.h
A    rpostgresql-read-only/RPostgreSQL/src/libpq/libpq/be-fsstubs.h
A    rpostgresql-read-only/RPostgreSQL/src/libpq/libpq/libpq-fs.h
A    rpostgresql-read-only/RPostgreSQL/src/libpq/libpq/pqsignal.h
A    rpostgresql-read-only/RPostgreSQL/src/libpq/libpq/auth.h
A    rpostgresql-read-only/RPostgreSQL/src/libpq/libpq/crypt.h
A    rpostgresql-read-only/RPostgreSQL/src/libpq/libpq/md5.h
A    rpostgresql-read-only/RPostgreSQL/src/libpq/libpq/libpq.h
A    rpostgresql-read-only/RPostgreSQL/src/libpq/libpq/ip.h
A    rpostgresql-read-only/RPostgreSQL/src/libpq/c.h
A    rpostgresql-read-only/RPostgreSQL/src/libpq/win32.mak
A    rpostgresql-read-only/RPostgreSQL/src/libpq/getaddrinfo.h
A    rpostgresql-read-only/RPostgreSQL/src/libpq/postgres_ext.h
A    rpostgresql-read-only/RPostgreSQL/src/libpq/Makefile.win32
A    rpostgresql-read-only/RPostgreSQL/src/RS-PostgreSQL.h
A    rpostgresql-read-only/RPostgreSQL/src/RS-pgsql-pqexec.c
A    rpostgresql-read-only/RPostgreSQL/src/Makevars.in
A    rpostgresql-read-only/RPostgreSQL/src/install-sh
A    rpostgresql-read-only/RPostgreSQL/cleanup
A    rpostgresql-read-only/RPostgreSQL/man
A    rpostgresql-read-only/RPostgreSQL/man/dbListTables-methods.Rd
A    rpostgresql-read-only/RPostgreSQL/man/isPostgresqlIdCurrent.Rd
A    rpostgresql-read-only/RPostgreSQL/man/postgresqlDBApply.Rd
A    rpostgresql-read-only/RPostgreSQL/man/dbDataType-methods.Rd
A    rpostgresql-read-only/RPostgreSQL/man/PostgreSQLDriver-class.Rd
A    rpostgresql-read-only/RPostgreSQL/man/PostgreSQLConnection-class.Rd
A    rpostgresql-read-only/RPostgreSQL/man/dbSendQuery-methods.Rd
A    rpostgresql-read-only/RPostgreSQL/man/dbReadTable-methods.Rd
A    rpostgresql-read-only/RPostgreSQL/man/fetch-methods.Rd
A    rpostgresql-read-only/RPostgreSQL/man/dbApply.Rd
A    rpostgresql-read-only/RPostgreSQL/man/dbSetDataMappings-methods.Rd
A    rpostgresql-read-only/RPostgreSQL/man/dbObjectId-class.Rd
A    rpostgresql-read-only/RPostgreSQL/man/dbApply-methods.Rd
A    rpostgresql-read-only/RPostgreSQL/man/PostgreSQLObject-class.Rd
A    rpostgresql-read-only/RPostgreSQL/man/summary-methods.Rd
A    rpostgresql-read-only/RPostgreSQL/man/dbCommit-methods.Rd
A    rpostgresql-read-only/RPostgreSQL/man/dbConnect-methods.Rd
A    rpostgresql-read-only/RPostgreSQL/man/postgresqlSupport.Rd
A    rpostgresql-read-only/RPostgreSQL/man/dbGetInfo-methods.Rd
A    rpostgresql-read-only/RPostgreSQL/man/dbDriver-methods.Rd
A    rpostgresql-read-only/RPostgreSQL/man/PostgreSQL.Rd
A    rpostgresql-read-only/RPostgreSQL/man/postgresqlBuildTableDefinition.Rd
A    rpostgresql-read-only/RPostgreSQL/man/make.db.names-methods.Rd
A    rpostgresql-read-only/RPostgreSQL/man/PostgreSQLResult-class.Rd
A    rpostgresql-read-only/RPostgreSQL/man/dbCallProc-methods.Rd
A    rpostgresql-read-only/RPostgreSQL/man/S4R.Rd
A    rpostgresql-read-only/RPostgreSQL/NAMESPACE
A    rpostgresql-read-only/RPostgreSQL/inst
A    rpostgresql-read-only/RPostgreSQL/inst/devTests
A    rpostgresql-read-only/RPostgreSQL/inst/devTests/PostgreSQLDataTypeTest.r
A    rpostgresql-read-only/RPostgreSQL/inst/devTests/typeTest.r
A    rpostgresql-read-only/RPostgreSQL/inst/devTests/transactionManagement.r
A    rpostgresql-read-only/RPostgreSQL/inst/devTests/copyTest.sh
A    rpostgresql-read-only/RPostgreSQL/inst/devTests/demo.r
A    rpostgresql-read-only/RPostgreSQL/inst/devTests/timeTypeComparison.r
A    rpostgresql-read-only/RPostgreSQL/inst/devTests/datetime.r
A    rpostgresql-read-only/RPostgreSQL/inst/TODO
A    rpostgresql-read-only/RPostgreSQL/inst/THANKS
A    rpostgresql-read-only/RPostgreSQL/inst/ANNOUNCEMENT
A    rpostgresql-read-only/RPostgreSQL/inst/NEWS
A    rpostgresql-read-only/RPostgreSQL/inst/README
A    rpostgresql-read-only/RPostgreSQL/configure.win
A    rpostgresql-read-only/build_check_with_vars.sh
A    rpostgresql-read-only/check_with_vars.sh
Checked out revision 273.

* installing *source* package �RPostgreSQL� ...
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
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-apple-darwin13.3.0
checking host system type... x86_64-apple-darwin13.3.0
checking target system type... x86_64-apple-darwin13.3.0
checking for pg_config... no
configure: checking for PostgreSQL header files
configure: Checking include /usr/include.
configure: Checking include 
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/S
DKs/MacOSX10.8.sdk/usr/include.
configure: Checking lib /usr/lib.
/usr/lib
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/S
DKs/MacOSX10.8.sdk/usr/include
checking for 
"/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/
SDKs/MacOSX10.8.sdk/usr/include/libpq-fe.h"... yes
configure: creating ./config.status
config.status: creating src/Makevars
** libs
clang -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG 
-I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer
/SDKs/MacOSX10.8.sdk/usr/include -I/usr/local/include 
-I/usr/local/include/freetype2 -I/opt/X11/include    -fPIC  -Wall -mtune=core2 
-g -O2  -c RS-DBI.c -o RS-DBI.o
clang -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG 
-I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer
/SDKs/MacOSX10.8.sdk/usr/include -I/usr/local/include 
-I/usr/local/include/freetype2 -I/opt/X11/include    -fPIC  -Wall -mtune=core2 
-g -O2  -c RS-PQescape.c -o RS-PQescape.o
clang -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG 
-I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer
/SDKs/MacOSX10.8.sdk/usr/include -I/usr/local/include 
-I/usr/local/include/freetype2 -I/opt/X11/include    -fPIC  -Wall -mtune=core2 
-g -O2  -c RS-PostgreSQL.c -o RS-PostgreSQL.o
clang -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG 
-I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer
/SDKs/MacOSX10.8.sdk/usr/include -I/usr/local/include 
-I/usr/local/include/freetype2 -I/opt/X11/include    -fPIC  -Wall -mtune=core2 
-g -O2  -c RS-pgsql-copy.c -o RS-pgsql-copy.o
clang -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG 
-I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer
/SDKs/MacOSX10.8.sdk/usr/include -I/usr/local/include 
-I/usr/local/include/freetype2 -I/opt/X11/include    -fPIC  -Wall -mtune=core2 
-g -O2  -c RS-pgsql-getResult.c -o RS-pgsql-getResult.o
clang -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG 
-I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer
/SDKs/MacOSX10.8.sdk/usr/include -I/usr/local/include 
-I/usr/local/include/freetype2 -I/opt/X11/include    -fPIC  -Wall -mtune=core2 
-g -O2  -c RS-pgsql-pqexec.c -o RS-pgsql-pqexec.o
clang -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG 
-I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer
/SDKs/MacOSX10.8.sdk/usr/include -I/usr/local/include 
-I/usr/local/include/freetype2 -I/opt/X11/include    -fPIC  -Wall -mtune=core2 
-g -O2  -c RS-pgsql-pqexecparams.c -o RS-pgsql-pqexecparams.o
clang -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup 
-single_module -multiply_defined suppress -L/usr/local/lib -o RPostgreSQL.so 
RS-DBI.o RS-PQescape.o RS-PostgreSQL.o RS-pgsql-copy.o RS-pgsql-getResult.o 
RS-pgsql-pqexec.o RS-pgsql-pqexecparams.o -F/Library/Frameworks/R.framework/.. 
-framework R -Wl,-framework -Wl,CoreFoundation
installing to 
/Library/Frameworks/R.framework/Versions/3.1/Resources/library/RPostgreSQL/libs
** R
** inst
** preparing package for lazy loading
Creating a generic function for �format� from package �base� in package 
�RPostgreSQL�
Creating a generic function for �print� from package �base� in package 
�RPostgreSQL�
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded
Error in dyn.load(file, DLLpath = DLLpath, ...) : 
  unable to load shared object '/Library/Frameworks/R.framework/Versions/3.1/Resources/library/RPostgreSQL/libs/RPostgreSQL.so':
  dlopen(/Library/Frameworks/R.framework/Versions/3.1/Resources/library/RPostgreSQL/libs/RPostgreSQL.so, 6): Symbol not found: _PQbackendPID
  Referenced from: /Library/Frameworks/R.framework/Versions/3.1/Resources/library/RPostgreSQL/libs/RPostgreSQL.so
  Expected in: flat namespace
 in /Library/Frameworks/R.framework/Versions/3.1/Resources/library/RPostgreSQL/libs/RPostgreSQL.so
Error: loading failed
Execution halted
ERROR: loading failed
* removing 
�/Library/Frameworks/R.framework/Versions/3.1/Resources/library/RPostgreSQL�
* restoring previous 
�/Library/Frameworks/R.framework/Versions/3.1/Resources/library/RPostgreSQL�
Warning in install.packages :
  installation of package �/Users/igow/test/rpostgresql-read-only/RPostgreSQL� had non-zero exit status

Original comment by iand...@gmail.com on 23 Jul 2014 at 4:43

GoogleCodeExporter commented 9 years ago
Neil:

Third time lucky! RPostgreSQL compiles on my office computer. The setup is 
essentially the same. So it�s not the MacPorts version of PostgreSQL that�s 
causing the problem. (I even mixed and matched PostgreSQL 9.3 and 9.4 in 
additional attempts from a clean pull from the repository and they all worked.)

The one difference I noticed is the presence of L/opt/local/lib/postgresql93 
-lpq presence in the last call to clang (in your case, this was L/usr/lib 
-lpq). I�m not sure why these arguments show up on this computer, but not the 
other two.

-Ian

| Sys.getenv("PATH")
[1] 
"/opt/local/bin:/opt/local/sbin:/opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/us
r/sbin:/sbin:/usr/local/bin:/opt/X11/bin:/opt/local/bin"
| system('sw_vers')
ProductName:    Mac OS X
ProductVersion: 10.9.4
BuildVersion:   13E28
| system('xcodebuild -version')
Xcode 5.1.1
Build version 5B1008
| system('pg_config')
BINDIR = /opt/local/lib/postgresql94/bin
DOCDIR = /opt/local/share/doc/postgresql
HTMLDIR = /opt/local/share/doc/postgresql
INCLUDEDIR = /opt/local/include/postgresql94
PKGINCLUDEDIR = /opt/local/include/postgresql94
INCLUDEDIR-SERVER = /opt/local/include/postgresql94/server
LIBDIR = /opt/local/lib/postgresql94
PKGLIBDIR = /opt/local/lib/postgresql94
LOCALEDIR = /opt/local/share/locale
MANDIR = /opt/local/share/man
SHAREDIR = /opt/local/share/postgresql94
SYSCONFDIR = /opt/local/etc/postgresql94
PGXS = /opt/local/lib/postgresql94/pgxs/src/makefiles/pgxs.mk
CONFIGURE = '--prefix=/opt/local' '--sysconfdir=/opt/local/etc/postgresql94' 
'--bindir=/opt/local/lib/postgresql94/bin' 
'--libdir=/opt/local/lib/postgresql94' 
'--includedir=/opt/local/include/postgresql94' 
'--datadir=/opt/local/share/postgresql94' '--mandir=/opt/local/share/man' 
'--with-includes=/opt/local/include' '--with-libraries=/opt/local/lib' 
'--with-openssl' '--with-bonjour' '--with-readline' '--with-zlib' 
'--with-libxml' '--with-libxslt' '--with-gssapi' '--enable-thread-safety' 
'--with-ossp-uuid' '--with-python' '--with-perl' 'CC=/usr/bin/clang' 
'CFLAGS=-pipe -Os -arch x86_64' 'LDFLAGS=-L/opt/local/lib 
-Wl,-headerpad_max_install_names -headerpad_max_install_names -arch x86_64' 
'CPPFLAGS=-I/opt/local/include -I/opt/local/include/ossp'
CC = /usr/bin/clang
CPPFLAGS = -I/opt/local/include -I/opt/local/include/ossp 
-I/opt/local/include/libxml2 -I/opt/local/include
CFLAGS = -pipe -Os -arch x86_64 -Wall -Wmissing-prototypes -Wpointer-arith 
-Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute 
-Wformat-security -fno-strict-aliasing -fwrapv
CFLAGS_SL = 
LDFLAGS = -L../../../src/common -L/opt/local/lib 
-Wl,-headerpad_max_install_names -headerpad_max_install_names -arch x86_64 
-L/opt/local/lib -L/opt/local/lib -Wl,-dead_strip_dylibs
LDFLAGS_EX = 
LDFLAGS_SL = 
LIBS = -lpgcommon -lpgport -lxslt -lxml2 -lssl -lcrypto -lgssapi_krb5 -lz 
-lreadline -lm 
VERSION = PostgreSQL 9.4beta1

| ...

Checked out revision 273.
| localhost:~ igow$ sudo R
Password:

R version 3.1.1 (2014-07-10) -- "Sock it to Me"
Copyright (C) 2014 The R Foundation for Statistical Computing
Platform: x86_64-apple-darwin13.1.0 (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

  Natural language support but running in an English locale

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

[1] "en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8"
[Previously saved workspace restored]

| Sys.setenv(PG_CONFIG='/opt/local/lib/postgresql93/bin/pg_config�)
| install.packages("~/rpostgresql-read-only/RPostgreSQL/", type="source", 
repos=NULL, lib=.libPaths()[2])
[1] "en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8"
* installing *source* package �RPostgreSQL� ...
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
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-apple-darwin13.3.0
checking host system type... x86_64-apple-darwin13.3.0
checking target system type... x86_64-apple-darwin13.3.0
checking for pg_config... /opt/local/lib/postgresql93/bin/pg_config
checking for "/opt/local/include/postgresql93/libpq-fe.h"... yes
configure: creating ./config.status
config.status: creating src/Makevars
** libs
clang -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG 
-I/opt/local/include/postgresql93 -I/usr/local/include 
-I/usr/local/include/freetype2 -I/opt/X11/include    -fPIC  -Wall -mtune=core2 
-g -O2  -c RS-DBI.c -o RS-DBI.o
clang -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG 
-I/opt/local/include/postgresql93 -I/usr/local/include 
-I/usr/local/include/freetype2 -I/opt/X11/include    -fPIC  -Wall -mtune=core2 
-g -O2  -c RS-PQescape.c -o RS-PQescape.o
clang -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG 
-I/opt/local/include/postgresql93 -I/usr/local/include 
-I/usr/local/include/freetype2 -I/opt/X11/include    -fPIC  -Wall -mtune=core2 
-g -O2  -c RS-PostgreSQL.c -o RS-PostgreSQL.o
clang -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG 
-I/opt/local/include/postgresql93 -I/usr/local/include 
-I/usr/local/include/freetype2 -I/opt/X11/include    -fPIC  -Wall -mtune=core2 
-g -O2  -c RS-pgsql-copy.c -o RS-pgsql-copy.o
clang -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG 
-I/opt/local/include/postgresql93 -I/usr/local/include 
-I/usr/local/include/freetype2 -I/opt/X11/include    -fPIC  -Wall -mtune=core2 
-g -O2  -c RS-pgsql-getResult.c -o RS-pgsql-getResult.o
clang -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG 
-I/opt/local/include/postgresql93 -I/usr/local/include 
-I/usr/local/include/freetype2 -I/opt/X11/include    -fPIC  -Wall -mtune=core2 
-g -O2  -c RS-pgsql-pqexec.c -o RS-pgsql-pqexec.o
clang -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG 
-I/opt/local/include/postgresql93 -I/usr/local/include 
-I/usr/local/include/freetype2 -I/opt/X11/include    -fPIC  -Wall -mtune=core2 
-g -O2  -c RS-pgsql-pqexecparams.c -o RS-pgsql-pqexecparams.o
clang -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup 
-single_module -multiply_defined suppress -L/usr/local/lib -o RPostgreSQL.so 
RS-DBI.o RS-PQescape.o RS-PostgreSQL.o RS-pgsql-copy.o RS-pgsql-getResult.o 
RS-pgsql-pqexec.o RS-pgsql-pqexecparams.o -L/opt/local/lib/postgresql93 -lpq 
-F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework 
-Wl,CoreFoundation
installing to /Volumes/Vertex3/igow/Library/R/3.1/library/RPostgreSQL/libs
** R
** inst
** preparing package for lazy loading
Creating a generic function for �format� from package �base� in package 
�RPostgreSQL�
Creating a generic function for �print� from package �base� in package 
�RPostgreSQL�
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded
[1] "en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8"
* DONE (RPostgreSQL)

Original comment by iand...@gmail.com on 24 Jul 2014 at 2:33

GoogleCodeExporter commented 9 years ago
@Ian

I'm experience the same issue as you when trying to install RPostgreSQL. I've 
run the following commands:

| Sys.setenv(PG_CONFIG='/opt/local/lib/postgresql93/bin/pg_config')
| install.packages("~/rpostgresql-read-only/RPostgreSQL/", type="source", 
repos=NULL, lib=.libPaths()[2])

And I get the following error message:
Error in install.packages : missing value where TRUE/FALSE needed

Do you have any insights on how I might resolve this is issue? I'm relatively 
new to R and would love to be able to get it talk to my PostgreSQL databases.

Many thanks,
Julia

Original comment by meo.ju...@gmail.com on 9 Sep 2014 at 8:23

GoogleCodeExporter commented 9 years ago
Julia:

Your error message is different from mine. Does .libPaths()[2] give you a value?

I have subsequently got this to compile on two computers, but not my third. One 
difference is that the first two have PostgreSQL 9.4, though I'm not sure how 
that would affect this.

As mentioned, I have had no problems when I have simply put the Snow Leopard 
package in the place where R expects it to be 
("/Library/Frameworks/R.framework/Versions/3.1/Resources/library/RPostgreSQL" 
in my case).

-Ian

Original comment by iand...@gmail.com on 9 Sep 2014 at 9:05

GoogleCodeExporter commented 9 years ago
Ian,

.libPaths()[2] returns NA which explains my error. For just .libPaths() I get 
the following:

| .libPaths()
[1] "/Library/Frameworks/R.framework/Versions/3.1/Resources/library"

I edited the command accordingly and was unsuccessful at the install.

What are you referring to exactly when you discuss the "Snow Leopard package"? 
I placed RPostgreSQL at the following:

/Library/Frameworks/R.framework/Versions/3.1/Resources/library/RPostgreSQL

I was also unsuccessful at installing RPostgreSQL after this step. 

Thanks again for your thoughts,
Julia

Original comment by meo.ju...@gmail.com on 10 Sep 2014 at 12:02

GoogleCodeExporter commented 9 years ago
Julia:

I simply downloaded the Snow Leopard binary from CRAN 
<http://cran.r-project.org/web/packages/RPostgreSQL/index.html>, decompressed 
it (happens automatically in Finder for me), and put the resulting RPostgreSQL 
directory in the location of my libraries (see below). Despite warnings about 
mixing binaries from the two versions, this worked for me.

More recently, I have copied the compiled library from a computer where it 
works to one where it doesn't. This has also worked for me (even when one 
computer is on 9.4 and the other on 9.3). Here is a link to the file I used for 
this: <https://www.dropbox.com/s/7konzigv7j2r7ni/RPostgreSQL.zip?dl=0>

After removing the current version of RPostgreSQL:

My read of the log message for the latest version 
<https://code.google.com/p/rpostgresql/source/detail?r=273> is that a Mavericks 
binary should appear the next time RPostgreSQL is pushed to CRAN. It seems it 
hasn't been in some time.

-Ian

Original comment by iand...@gmail.com on 10 Sep 2014 at 3:15

GoogleCodeExporter commented 9 years ago
Ian,

Thank you so much for including the link the compiled library. I was able to 
install the package using this package (after deleting the one downloaded from 
CRAN) using the following command:

| install.packages("Downloads/RPostgreSQL/", type="source", repos=NULL, 
lib=.libPaths())

You've been so helpful!

My Best,
Julia

Original comment by meo.ju...@gmail.com on 10 Sep 2014 at 5:01

GoogleCodeExporter commented 9 years ago
The Maverick version seems to have issue with RPostgreSQL package. I just 
uninstalled R and RStudio. While reinstalling I installed R for snow leopard 
(not Maverick) and the latest RStudio(3.1.2) for mac and this did the trick. I 
could now install RPostgreSQL with out any error. Hope this helps. 

Original comment by ps...@tidemark.com on 20 Feb 2015 at 11:20