Giter Site home page Giter Site logo

Comments (7)

hadley avatar hadley commented on July 22, 2024

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.

iangow avatar iangow commented on July 22, 2024

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.1

On 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.

krlmlr avatar krlmlr commented on July 22, 2024

Does @mmuurr's pull request #81 work for you?

devtools::install_github("rstats-db/RPostgres#81")

from rpostgres.

iangow avatar iangow commented on July 22, 2024

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.

krlmlr avatar krlmlr commented on July 22, 2024

Thanks for confirming it.

from rpostgres.

cilindrox avatar cilindrox commented on July 22, 2024

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.

github-actions avatar github-actions commented on July 22, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.