Comments (7)
Can you please show the output of running system("pg_config")
?
(Most of these compilation problems will go away once the package is on CRAN, but we would like to make the configuration a bit more robust)
from rpostgres.
Sure. I’m using a “Mavericks” build of R from CRAN and PostgreSQL from MacPorts.
Last login: Sun Mar 15 21:40:31 2015 from 192.168.2.3
Mac-Pro:~ igow$ R
R version 3.1.3 (2015-03-09) -- "Smooth Sidewalk"
Copyright (C) 2015 The R Foundation for Statistical Computing
Platform: x86_64-apple-darwin13.4.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.
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-uuid=e2fs' '--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'
CC = /usr/bin/clang
CPPFLAGS = -I/opt/local/include -I/opt/local/include/libxml2 -I/opt/local/include
CFLAGS = -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -pipe -Os -arch x86_64
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.4.1On Mar 16, 2015, at 8:43 AM, Hadley Wickham [email protected] wrote:
Can you please show the output of running system("pg_config")?
(Most of these compilation problems will go away once the package is on CRAN, but we would like to make the configuration a bit more robust)
—
Reply to this email directly or view it on GitHub #22 (comment).
from rpostgres.
Does @mmuurr's pull request #81 work for you?
devtools::install_github("rstats-db/RPostgres#81")
from rpostgres.
Yes. This works on Mac OS X with a MacPorts installation of PostgreSQL 9.4 (also with another installation with PostgreSQL 9.5.1).
In one case I got an error that prevented installation (message contained namespace ‘DBI’ 0.3.1 is being loaded, but >= 0.3.1.9008 is required
), but this was easily fixed with devtools::install_github("rstats-db/DBI")
(does it make sense to handle this dependency automatically?).
> devtools::install_github("rstats-db/RPostgres#81")
Downloading GitHub repo mmuurr/RPostgres@Amazon-Linux-configure
Installing RPostgres
Skipping 1 packages ahead of CRAN: DBI
Installing 2 packages: BH, Rcpp
'/Library/Frameworks/R.framework/Resources/bin/R' --no-site-file --no-environ --no-save --no-restore CMD INSTALL \
'/private/var/folders/0y/v7w1215j0ylb22zqgt9nsh1m0000gn/T/RtmpYOV6BG/devtools11a7e3bd9ec32/mmuurr-rstats-db.RPostgres-6e8fcab' --library='/Library/Frameworks/R.framework/Versions/3.2/Resources/library' \
--install-tests
* installing *source* package ‘RPostgres’ ...
Found pg_config includedir!
Found pg_config libdir!
Using PKG_CFLAGS=-I/opt/local/include/postgresql94
Using PKG_LIBS=-L/opt/local/lib/postgresql94 -lpq
** libs
clang -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I/opt/local/include/postgresql94 -I/usr/local/include -I/usr/local/include/freetype2 -I/opt/X11/include -I"/Library/Frameworks/R.framework/Versions/3.2/Resources/library/Rcpp/include" -I"/Library/Frameworks/R.framework/Versions/3.2/Resources/library/BH/include" -fPIC -Wall -mtune=core2 -g -O2 -c RPostgres-init.c -o RPostgres-init.o
clang++ -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I/opt/local/include/postgresql94 -I/usr/local/include -I/usr/local/include/freetype2 -I/opt/X11/include -I"/Library/Frameworks/R.framework/Versions/3.2/Resources/library/Rcpp/include" -I"/Library/Frameworks/R.framework/Versions/3.2/Resources/library/BH/include" -fPIC -Wall -mtune=core2 -g -O2 -c RcppExports.cpp -o RcppExports.o
clang++ -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I/opt/local/include/postgresql94 -I/usr/local/include -I/usr/local/include/freetype2 -I/opt/X11/include -I"/Library/Frameworks/R.framework/Versions/3.2/Resources/library/Rcpp/include" -I"/Library/Frameworks/R.framework/Versions/3.2/Resources/library/BH/include" -fPIC -Wall -mtune=core2 -g -O2 -c connection.cpp -o connection.o
clang++ -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I/opt/local/include/postgresql94 -I/usr/local/include -I/usr/local/include/freetype2 -I/opt/X11/include -I"/Library/Frameworks/R.framework/Versions/3.2/Resources/library/Rcpp/include" -I"/Library/Frameworks/R.framework/Versions/3.2/Resources/library/BH/include" -fPIC -Wall -mtune=core2 -g -O2 -c encode.cpp -o encode.o
clang++ -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I/opt/local/include/postgresql94 -I/usr/local/include -I/usr/local/include/freetype2 -I/opt/X11/include -I"/Library/Frameworks/R.framework/Versions/3.2/Resources/library/Rcpp/include" -I"/Library/Frameworks/R.framework/Versions/3.2/Resources/library/BH/include" -fPIC -Wall -mtune=core2 -g -O2 -c encrypt.cpp -o encrypt.o
clang++ -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I/opt/local/include/postgresql94 -I/usr/local/include -I/usr/local/include/freetype2 -I/opt/X11/include -I"/Library/Frameworks/R.framework/Versions/3.2/Resources/library/Rcpp/include" -I"/Library/Frameworks/R.framework/Versions/3.2/Resources/library/BH/include" -fPIC -Wall -mtune=core2 -g -O2 -c result.cpp -o result.o
clang++ -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -single_module -multiply_defined suppress -L/Library/Frameworks/R.framework/Resources/lib -L/usr/local/lib -o RPostgres.so RPostgres-init.o RcppExports.o connection.o encode.o encrypt.o result.o -L/opt/local/lib/postgresql94 -lpq -F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework -Wl,CoreFoundation
installing to /Library/Frameworks/R.framework/Versions/3.2/Resources/library/RPostgres/libs
** R
** tests
** preparing package for lazy loading
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded
* DONE (RPostgres)
> library(RPostgres)
> pg <- RPostgres::dbConnect(RPostgres::Postgres())
> dbListTables(pg)
[lotsa tables]
from rpostgres.
Thanks for confirming it.
from rpostgres.
Confirming this works on Docker, too.
devtools::install_github("rstats-db/RPostgres")
fails (no libpq
binary found)
devtools::install_github("rstats-db/RPostgres#81")
nets a successful installation.
from rpostgres.
This old thread has been automatically locked. If you think you have found something related to this, please open a new issue and link to this old issue if necessary.
from rpostgres.
Related Issues (20)
- binding parameters fails with input from dbQuoteLiteral HOT 2
- Connection closed unexpectedly by server HOT 9
- Encoding issue with identifiers passed via dbWriteTable or copy_to? HOT 4
- Cannot use DBI::dbWriteTable to save temporary table to Redshift HOT 2
- Failure to acquire connections on Mac OS within multicore fork()-ed process HOT 2
- Redshift varchar character length not respected by dplyr::rows_*() HOT 5
- collation warning on Ubuntu 22.04 HOT 4
- relicense RPostgres as MIT HOT 2
- using databases.pacha.dev for testing HOT 4
- Curious bug with transaction and `dbSendQuery()` HOT 6
- Redshift: dbWriteTable() with larger DFs and CSVs HOT 3
- Unable to create table with logical column HOT 4
- Schema with DBI::Id appears not to work with `dbListTables` HOT 4
- Bigints in dbQuoteLiteral HOT 4
- Polygon/multipolygon columns: incorrect write, correct read HOT 7
- Something wrong with the 1.4.5 Mac binary on CRAN with Redshift HOT 33
- How to deal with `pq__varchar` columns HOT 11
- vendoring cpp11 headers HOT 1
- RPostgres should respect system timezone rather than default to UTC HOT 9
- unnamed `Id()` breaks `dbQuoteIdentifier()` HOT 10
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rpostgres.