-
Notifications
You must be signed in to change notification settings - Fork 79
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Something wrong with the 1.4.5 Mac binary on CRAN with Redshift #441
Comments
Thanks. Logging must be enabled when compiling, this is not an option here. This is really weird. We could try harder to build the package so that fails to connect to Redshift the same way the CRAN build fails. What do you see with the following? DBI::dbGetInfo(RPostgres::Postgres())
#> $driver.version
#> [1] '1.4.5'
#>
#> $client.version
#> [1] '14.5' Created on 2023-09-01 with reprex v2.0.2 I'm a bit lost here. Logging the network communication and looking for differences? But this looks like serious overkill. @s-u: Any idea how to troubleshoot libpq issues that happen (only) with the CRAN build? |
You can check with the same binary from https://mac.r-project.org/bin/. If this is a bug in |
I get the same versions as you @krlmlr : DBI::dbGetInfo(RPostgres::Postgres())
#> $driver.version
#> [1] '1.4.5'
#>
#> $client.version
#> [1] '14.5' Created on 2023-09-04 with reprex v2.0.2
It doesn't seem to have source("https://mac.R-project.org/bin/install.R")
#>
#> Usage: install.libs(names)
#>
#> Example: install.libs('cairo')
#>
#> names can be a vector or a special value 'all'.
#> See args(install.libs) for defaults.
install.libs("RPostgres")
#> Downloading https://mac.R-project.org/bin/REPOS ...
#> Using repository https://mac.R-project.org/bin/darwin20/x86_64 ...
#> Downloading index https://mac.R-project.org/bin/darwin20/x86_64/PACKAGES ...
#> Error in deps(pkgs, db): Following binaries have no download candidates: RPostgres Created on 2023-09-04 with reprex v2.0.2
Happy to, if that's what I should do. But to be honest I have no idea where the problem is. From the recipe you linked:
This makes me think that I do have both
|
I did some more testing with
Here are the compilation outputs, in case they might be useful: # with postgresql
install.packages("RPostgres", type = "source")
#> trying URL 'https://cran.rstudio.com/src/contrib/RPostgres_1.4.5.tar.gz'
#> Content type 'application/x-gzip' length 1473682 bytes (1.4 MB)
#> ==================================================
#> downloaded 1.4 MB
#>
#> * installing *source* package ‘RPostgres’ ...
#> ** package ‘RPostgres’ successfully unpacked and MD5 sums checked
#> ** using staged installation
#> Found pg_config includedir and libdir (PostgreSQL 14.9 (Homebrew))!
#> Using PKG_CFLAGS=-I/usr/local/include/postgresql@14
#> Using PKG_LIBS=-L/usr/local/lib/postgresql@14 -lpq
#> Using PKG_PLOGR=
#> ** libs
#> clang++ -mmacosx-version-min=10.13 -std=gnu++14 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/include/postgresql@14 -Ivendor -DRCPP_DEFAULT_INCLUDE_CALL=false -DRCPP_USING_UTF8_ERROR_STRING -DBOOST_NO_AUTO_PTR -I'/Library/Frameworks/R.framework/Versions/4.2/Resources/library/plogr/include' -I'/Library/Frameworks/R.framework/Versions/4.2/Resources/library/Rcpp/include' -I/usr/local/include -fPIC -Wall -g -O2 -c DbColumn.cpp -o DbColumn.o
#> clang++ -mmacosx-version-min=10.13 -std=gnu++14 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/include/postgresql@14 -Ivendor -DRCPP_DEFAULT_INCLUDE_CALL=false -DRCPP_USING_UTF8_ERROR_STRING -DBOOST_NO_AUTO_PTR -I'/Library/Frameworks/R.framework/Versions/4.2/Resources/library/plogr/include' -I'/Library/Frameworks/R.framework/Versions/4.2/Resources/library/Rcpp/include' -I/usr/local/include -fPIC -Wall -g -O2 -c DbColumnDataSource.cpp -o DbColumnDataSource.o
#> clang++ -mmacosx-version-min=10.13 -std=gnu++14 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/include/postgresql@14 -Ivendor -DRCPP_DEFAULT_INCLUDE_CALL=false -DRCPP_USING_UTF8_ERROR_STRING -DBOOST_NO_AUTO_PTR -I'/Library/Frameworks/R.framework/Versions/4.2/Resources/library/plogr/include' -I'/Library/Frameworks/R.framework/Versions/4.2/Resources/library/Rcpp/include' -I/usr/local/include -fPIC -Wall -g -O2 -c DbColumnDataSourceFactory.cpp -o DbColumnDataSourceFactory.o
#> clang++ -mmacosx-version-min=10.13 -std=gnu++14 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/include/postgresql@14 -Ivendor -DRCPP_DEFAULT_INCLUDE_CALL=false -DRCPP_USING_UTF8_ERROR_STRING -DBOOST_NO_AUTO_PTR -I'/Library/Frameworks/R.framework/Versions/4.2/Resources/library/plogr/include' -I'/Library/Frameworks/R.framework/Versions/4.2/Resources/library/Rcpp/include' -I/usr/local/include -fPIC -Wall -g -O2 -c DbColumnStorage.cpp -o DbColumnStorage.o
#> clang++ -mmacosx-version-min=10.13 -std=gnu++14 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/include/postgresql@14 -Ivendor -DRCPP_DEFAULT_INCLUDE_CALL=false -DRCPP_USING_UTF8_ERROR_STRING -DBOOST_NO_AUTO_PTR -I'/Library/Frameworks/R.framework/Versions/4.2/Resources/library/plogr/include' -I'/Library/Frameworks/R.framework/Versions/4.2/Resources/library/Rcpp/include' -I/usr/local/include -fPIC -Wall -g -O2 -c DbConnection.cpp -o DbConnection.o
#> clang++ -mmacosx-version-min=10.13 -std=gnu++14 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/include/postgresql@14 -Ivendor -DRCPP_DEFAULT_INCLUDE_CALL=false -DRCPP_USING_UTF8_ERROR_STRING -DBOOST_NO_AUTO_PTR -I'/Library/Frameworks/R.framework/Versions/4.2/Resources/library/plogr/include' -I'/Library/Frameworks/R.framework/Versions/4.2/Resources/library/Rcpp/include' -I/usr/local/include -fPIC -Wall -g -O2 -c DbDataFrame.cpp -o DbDataFrame.o
#> In file included from DbDataFrame.cpp:7:
#> vendor/boost/bind.hpp:36:1: warning: The practice of declaring the Bind placeholders (_1, _2, ...) in the global namespace is deprecated. Please use <boost/bind/bind.hpp> + using namespace boost::placeholders, or define BOOST_BIND_GLOBAL_PLACEHOLDERS to retain the current behavior. [-W#pragma-messages]
#> BOOST_PRAGMA_MESSAGE(
#> ^
#> vendor/boost/config/pragma_message.hpp:24:34: note: expanded from macro 'BOOST_PRAGMA_MESSAGE'
#> # define BOOST_PRAGMA_MESSAGE(x) _Pragma(BOOST_STRINGIZE(message(x)))
#> ^
#> <scratch space>:39:2: note: expanded from here
#> message("The practice of declaring the Bind placeholders (_1, _2, ...) " "in the global namespace is deprecated. Please use " "<boost/bind/bind.hpp> + using namespace boost::placeholders, " "or define BOOST_BIND_GLOBAL_PLACEHOLDERS to retain the current behavior.")
#> ^
#> 1 warning generated.
#> clang++ -mmacosx-version-min=10.13 -std=gnu++14 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/include/postgresql@14 -Ivendor -DRCPP_DEFAULT_INCLUDE_CALL=false -DRCPP_USING_UTF8_ERROR_STRING -DBOOST_NO_AUTO_PTR -I'/Library/Frameworks/R.framework/Versions/4.2/Resources/library/plogr/include' -I'/Library/Frameworks/R.framework/Versions/4.2/Resources/library/Rcpp/include' -I/usr/local/include -fPIC -Wall -g -O2 -c DbResult.cpp -o DbResult.o
#> clang++ -mmacosx-version-min=10.13 -std=gnu++14 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/include/postgresql@14 -Ivendor -DRCPP_DEFAULT_INCLUDE_CALL=false -DRCPP_USING_UTF8_ERROR_STRING -DBOOST_NO_AUTO_PTR -I'/Library/Frameworks/R.framework/Versions/4.2/Resources/library/plogr/include' -I'/Library/Frameworks/R.framework/Versions/4.2/Resources/library/Rcpp/include' -I/usr/local/include -fPIC -Wall -g -O2 -c PqColumnDataSource.cpp -o PqColumnDataSource.o
#> clang++ -mmacosx-version-min=10.13 -std=gnu++14 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/include/postgresql@14 -Ivendor -DRCPP_DEFAULT_INCLUDE_CALL=false -DRCPP_USING_UTF8_ERROR_STRING -DBOOST_NO_AUTO_PTR -I'/Library/Frameworks/R.framework/Versions/4.2/Resources/library/plogr/include' -I'/Library/Frameworks/R.framework/Versions/4.2/Resources/library/Rcpp/include' -I/usr/local/include -fPIC -Wall -g -O2 -c PqColumnDataSourceFactory.cpp -o PqColumnDataSourceFactory.o
#> clang++ -mmacosx-version-min=10.13 -std=gnu++14 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/include/postgresql@14 -Ivendor -DRCPP_DEFAULT_INCLUDE_CALL=false -DRCPP_USING_UTF8_ERROR_STRING -DBOOST_NO_AUTO_PTR -I'/Library/Frameworks/R.framework/Versions/4.2/Resources/library/plogr/include' -I'/Library/Frameworks/R.framework/Versions/4.2/Resources/library/Rcpp/include' -I/usr/local/include -fPIC -Wall -g -O2 -c PqDataFrame.cpp -o PqDataFrame.o
#> clang++ -mmacosx-version-min=10.13 -std=gnu++14 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/include/postgresql@14 -Ivendor -DRCPP_DEFAULT_INCLUDE_CALL=false -DRCPP_USING_UTF8_ERROR_STRING -DBOOST_NO_AUTO_PTR -I'/Library/Frameworks/R.framework/Versions/4.2/Resources/library/plogr/include' -I'/Library/Frameworks/R.framework/Versions/4.2/Resources/library/Rcpp/include' -I/usr/local/include -fPIC -Wall -g -O2 -c PqResult.cpp -o PqResult.o
#> clang++ -mmacosx-version-min=10.13 -std=gnu++14 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/include/postgresql@14 -Ivendor -DRCPP_DEFAULT_INCLUDE_CALL=false -DRCPP_USING_UTF8_ERROR_STRING -DBOOST_NO_AUTO_PTR -I'/Library/Frameworks/R.framework/Versions/4.2/Resources/library/plogr/include' -I'/Library/Frameworks/R.framework/Versions/4.2/Resources/library/Rcpp/include' -I/usr/local/include -fPIC -Wall -g -O2 -c PqResultImpl.cpp -o PqResultImpl.o
#> clang++ -mmacosx-version-min=10.13 -std=gnu++14 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/include/postgresql@14 -Ivendor -DRCPP_DEFAULT_INCLUDE_CALL=false -DRCPP_USING_UTF8_ERROR_STRING -DBOOST_NO_AUTO_PTR -I'/Library/Frameworks/R.framework/Versions/4.2/Resources/library/plogr/include' -I'/Library/Frameworks/R.framework/Versions/4.2/Resources/library/Rcpp/include' -I/usr/local/include -fPIC -Wall -g -O2 -c PqResultSource.cpp -o PqResultSource.o
#> clang++ -mmacosx-version-min=10.13 -std=gnu++14 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/include/postgresql@14 -Ivendor -DRCPP_DEFAULT_INCLUDE_CALL=false -DRCPP_USING_UTF8_ERROR_STRING -DBOOST_NO_AUTO_PTR -I'/Library/Frameworks/R.framework/Versions/4.2/Resources/library/plogr/include' -I'/Library/Frameworks/R.framework/Versions/4.2/Resources/library/Rcpp/include' -I/usr/local/include -fPIC -Wall -g -O2 -c PqUtils.cpp -o PqUtils.o
#> clang -mmacosx-version-min=10.13 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/include/postgresql@14 -Ivendor -DRCPP_DEFAULT_INCLUDE_CALL=false -DRCPP_USING_UTF8_ERROR_STRING -DBOOST_NO_AUTO_PTR -I'/Library/Frameworks/R.framework/Versions/4.2/Resources/library/plogr/include' -I'/Library/Frameworks/R.framework/Versions/4.2/Resources/library/Rcpp/include' -I/usr/local/include -fPIC -Wall -g -O2 -c RPostgres-init.c -o RPostgres-init.o
#> clang++ -mmacosx-version-min=10.13 -std=gnu++14 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/include/postgresql@14 -Ivendor -DRCPP_DEFAULT_INCLUDE_CALL=false -DRCPP_USING_UTF8_ERROR_STRING -DBOOST_NO_AUTO_PTR -I'/Library/Frameworks/R.framework/Versions/4.2/Resources/library/plogr/include' -I'/Library/Frameworks/R.framework/Versions/4.2/Resources/library/Rcpp/include' -I/usr/local/include -fPIC -Wall -g -O2 -c RcppExports.cpp -o RcppExports.o
#> clang++ -mmacosx-version-min=10.13 -std=gnu++14 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/include/postgresql@14 -Ivendor -DRCPP_DEFAULT_INCLUDE_CALL=false -DRCPP_USING_UTF8_ERROR_STRING -DBOOST_NO_AUTO_PTR -I'/Library/Frameworks/R.framework/Versions/4.2/Resources/library/plogr/include' -I'/Library/Frameworks/R.framework/Versions/4.2/Resources/library/Rcpp/include' -I/usr/local/include -fPIC -Wall -g -O2 -c connection.cpp -o connection.o
#> clang++ -mmacosx-version-min=10.13 -std=gnu++14 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/include/postgresql@14 -Ivendor -DRCPP_DEFAULT_INCLUDE_CALL=false -DRCPP_USING_UTF8_ERROR_STRING -DBOOST_NO_AUTO_PTR -I'/Library/Frameworks/R.framework/Versions/4.2/Resources/library/plogr/include' -I'/Library/Frameworks/R.framework/Versions/4.2/Resources/library/Rcpp/include' -I/usr/local/include -fPIC -Wall -g -O2 -c encode.cpp -o encode.o
#> clang++ -mmacosx-version-min=10.13 -std=gnu++14 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/include/postgresql@14 -Ivendor -DRCPP_DEFAULT_INCLUDE_CALL=false -DRCPP_USING_UTF8_ERROR_STRING -DBOOST_NO_AUTO_PTR -I'/Library/Frameworks/R.framework/Versions/4.2/Resources/library/plogr/include' -I'/Library/Frameworks/R.framework/Versions/4.2/Resources/library/Rcpp/include' -I/usr/local/include -fPIC -Wall -g -O2 -c encrypt.cpp -o encrypt.o
#> clang++ -mmacosx-version-min=10.13 -std=gnu++14 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/include/postgresql@14 -Ivendor -DRCPP_DEFAULT_INCLUDE_CALL=false -DRCPP_USING_UTF8_ERROR_STRING -DBOOST_NO_AUTO_PTR -I'/Library/Frameworks/R.framework/Versions/4.2/Resources/library/plogr/include' -I'/Library/Frameworks/R.framework/Versions/4.2/Resources/library/Rcpp/include' -I/usr/local/include -fPIC -Wall -g -O2 -c logging.cpp -o logging.o
#> clang++ -mmacosx-version-min=10.13 -std=gnu++14 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/include/postgresql@14 -Ivendor -DRCPP_DEFAULT_INCLUDE_CALL=false -DRCPP_USING_UTF8_ERROR_STRING -DBOOST_NO_AUTO_PTR -I'/Library/Frameworks/R.framework/Versions/4.2/Resources/library/plogr/include' -I'/Library/Frameworks/R.framework/Versions/4.2/Resources/library/Rcpp/include' -I/usr/local/include -fPIC -Wall -g -O2 -c result.cpp -o result.o
#> clang++ -mmacosx-version-min=10.13 -std=gnu++14 -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 DbColumn.o DbColumnDataSource.o DbColumnDataSourceFactory.o DbColumnStorage.o DbConnection.o DbDataFrame.o DbResult.o PqColumnDataSource.o PqColumnDataSourceFactory.o PqDataFrame.o PqResult.o PqResultImpl.o PqResultSource.o PqUtils.o RPostgres-init.o RcppExports.o connection.o encode.o encrypt.o logging.o result.o -L/usr/local/lib/postgresql@14 -lpq -F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework -Wl,CoreFoundation
#> ld: warning: dylib (/usr/local/lib/postgresql@14/libpq.dylib) was built for newer macOS version (12.0) than being linked (10.13)
#> installing to /Library/Frameworks/R.framework/Versions/4.2/Resources/library/00LOCK-RPostgres/00new/RPostgres/libs
#> ** R
#> ** inst
#> ** byte-compile and prepare package for lazy loading
#> ** help
#> *** installing help indices
#> ** building package indices
#> ** installing vignettes
#> ** testing if installed package can be loaded from temporary location
#> ** checking absolute paths in shared objects and dynamic libraries
#> ** testing if installed package can be loaded from final location
#> ** testing if installed package keeps a record of temporary installation path
#> * DONE (RPostgres)
#>
#> The downloaded source packages are in
#> ‘/private/var/folders/np/n1zvy7cs7m9blq1w1_m_bqqw0000gn/T/RtmpTWKZBP/downloaded_packages’
# with libpq:
install.packages("RPostgres", type = "source")
#> trying URL 'https://cran.rstudio.com/src/contrib/RPostgres_1.4.5.tar.gz'
#> Content type 'application/x-gzip' length 1473682 bytes (1.4 MB)
#> ==================================================
#> downloaded 1.4 MB
#>
#> * installing *source* package ‘RPostgres’ ...
#> ** package ‘RPostgres’ successfully unpacked and MD5 sums checked
#> ** using staged installation
#> Homebrew 4.1.7
#> Homebrew/homebrew-core (git revision c1f15f343bb; last commit 2023-09-04)
#> Homebrew/homebrew-cask (git revision 7eae8590f2; last commit 2023-09-03)
#> Using PKG_CFLAGS=-I/usr/local/opt/libpq/include
#> Using PKG_LIBS=-L/usr/local/opt/libpq/lib -lpq
#> Using PKG_PLOGR=
#> ** libs
#> clang++ -mmacosx-version-min=10.13 -std=gnu++14 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/opt/libpq/include -Ivendor -DRCPP_DEFAULT_INCLUDE_CALL=false -DRCPP_USING_UTF8_ERROR_STRING -DBOOST_NO_AUTO_PTR -I'/Library/Frameworks/R.framework/Versions/4.2/Resources/library/plogr/include' -I'/Library/Frameworks/R.framework/Versions/4.2/Resources/library/Rcpp/include' -I/usr/local/include -fPIC -Wall -g -O2 -c DbColumn.cpp -o DbColumn.o
#> clang++ -mmacosx-version-min=10.13 -std=gnu++14 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/opt/libpq/include -Ivendor -DRCPP_DEFAULT_INCLUDE_CALL=false -DRCPP_USING_UTF8_ERROR_STRING -DBOOST_NO_AUTO_PTR -I'/Library/Frameworks/R.framework/Versions/4.2/Resources/library/plogr/include' -I'/Library/Frameworks/R.framework/Versions/4.2/Resources/library/Rcpp/include' -I/usr/local/include -fPIC -Wall -g -O2 -c DbColumnDataSource.cpp -o DbColumnDataSource.o
#> clang++ -mmacosx-version-min=10.13 -std=gnu++14 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/opt/libpq/include -Ivendor -DRCPP_DEFAULT_INCLUDE_CALL=false -DRCPP_USING_UTF8_ERROR_STRING -DBOOST_NO_AUTO_PTR -I'/Library/Frameworks/R.framework/Versions/4.2/Resources/library/plogr/include' -I'/Library/Frameworks/R.framework/Versions/4.2/Resources/library/Rcpp/include' -I/usr/local/include -fPIC -Wall -g -O2 -c DbColumnDataSourceFactory.cpp -o DbColumnDataSourceFactory.o
#> clang++ -mmacosx-version-min=10.13 -std=gnu++14 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/opt/libpq/include -Ivendor -DRCPP_DEFAULT_INCLUDE_CALL=false -DRCPP_USING_UTF8_ERROR_STRING -DBOOST_NO_AUTO_PTR -I'/Library/Frameworks/R.framework/Versions/4.2/Resources/library/plogr/include' -I'/Library/Frameworks/R.framework/Versions/4.2/Resources/library/Rcpp/include' -I/usr/local/include -fPIC -Wall -g -O2 -c DbColumnStorage.cpp -o DbColumnStorage.o
#> clang++ -mmacosx-version-min=10.13 -std=gnu++14 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/opt/libpq/include -Ivendor -DRCPP_DEFAULT_INCLUDE_CALL=false -DRCPP_USING_UTF8_ERROR_STRING -DBOOST_NO_AUTO_PTR -I'/Library/Frameworks/R.framework/Versions/4.2/Resources/library/plogr/include' -I'/Library/Frameworks/R.framework/Versions/4.2/Resources/library/Rcpp/include' -I/usr/local/include -fPIC -Wall -g -O2 -c DbConnection.cpp -o DbConnection.o
#> clang++ -mmacosx-version-min=10.13 -std=gnu++14 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/opt/libpq/include -Ivendor -DRCPP_DEFAULT_INCLUDE_CALL=false -DRCPP_USING_UTF8_ERROR_STRING -DBOOST_NO_AUTO_PTR -I'/Library/Frameworks/R.framework/Versions/4.2/Resources/library/plogr/include' -I'/Library/Frameworks/R.framework/Versions/4.2/Resources/library/Rcpp/include' -I/usr/local/include -fPIC -Wall -g -O2 -c DbDataFrame.cpp -o DbDataFrame.o
#> In file included from DbDataFrame.cpp:7:
#> vendor/boost/bind.hpp:36:1: warning: The practice of declaring the Bind placeholders (_1, _2, ...) in the global namespace is deprecated. Please use <boost/bind/bind.hpp> + using namespace boost::placeholders, or define BOOST_BIND_GLOBAL_PLACEHOLDERS to retain the current behavior. [-W#pragma-messages]
#> BOOST_PRAGMA_MESSAGE(
#> ^
#> vendor/boost/config/pragma_message.hpp:24:34: note: expanded from macro 'BOOST_PRAGMA_MESSAGE'
#> # define BOOST_PRAGMA_MESSAGE(x) _Pragma(BOOST_STRINGIZE(message(x)))
#> ^
#> <scratch space>:39:2: note: expanded from here
#> message("The practice of declaring the Bind placeholders (_1, _2, ...) " "in the global namespace is deprecated. Please use " "<boost/bind/bind.hpp> + using namespace boost::placeholders, " "or define BOOST_BIND_GLOBAL_PLACEHOLDERS to retain the current behavior.")
#> ^
#> 1 warning generated.
#> clang++ -mmacosx-version-min=10.13 -std=gnu++14 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/opt/libpq/include -Ivendor -DRCPP_DEFAULT_INCLUDE_CALL=false -DRCPP_USING_UTF8_ERROR_STRING -DBOOST_NO_AUTO_PTR -I'/Library/Frameworks/R.framework/Versions/4.2/Resources/library/plogr/include' -I'/Library/Frameworks/R.framework/Versions/4.2/Resources/library/Rcpp/include' -I/usr/local/include -fPIC -Wall -g -O2 -c DbResult.cpp -o DbResult.o
#> clang++ -mmacosx-version-min=10.13 -std=gnu++14 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/opt/libpq/include -Ivendor -DRCPP_DEFAULT_INCLUDE_CALL=false -DRCPP_USING_UTF8_ERROR_STRING -DBOOST_NO_AUTO_PTR -I'/Library/Frameworks/R.framework/Versions/4.2/Resources/library/plogr/include' -I'/Library/Frameworks/R.framework/Versions/4.2/Resources/library/Rcpp/include' -I/usr/local/include -fPIC -Wall -g -O2 -c PqColumnDataSource.cpp -o PqColumnDataSource.o
#> clang++ -mmacosx-version-min=10.13 -std=gnu++14 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/opt/libpq/include -Ivendor -DRCPP_DEFAULT_INCLUDE_CALL=false -DRCPP_USING_UTF8_ERROR_STRING -DBOOST_NO_AUTO_PTR -I'/Library/Frameworks/R.framework/Versions/4.2/Resources/library/plogr/include' -I'/Library/Frameworks/R.framework/Versions/4.2/Resources/library/Rcpp/include' -I/usr/local/include -fPIC -Wall -g -O2 -c PqColumnDataSourceFactory.cpp -o PqColumnDataSourceFactory.o
#> clang++ -mmacosx-version-min=10.13 -std=gnu++14 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/opt/libpq/include -Ivendor -DRCPP_DEFAULT_INCLUDE_CALL=false -DRCPP_USING_UTF8_ERROR_STRING -DBOOST_NO_AUTO_PTR -I'/Library/Frameworks/R.framework/Versions/4.2/Resources/library/plogr/include' -I'/Library/Frameworks/R.framework/Versions/4.2/Resources/library/Rcpp/include' -I/usr/local/include -fPIC -Wall -g -O2 -c PqDataFrame.cpp -o PqDataFrame.o
#> clang++ -mmacosx-version-min=10.13 -std=gnu++14 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/opt/libpq/include -Ivendor -DRCPP_DEFAULT_INCLUDE_CALL=false -DRCPP_USING_UTF8_ERROR_STRING -DBOOST_NO_AUTO_PTR -I'/Library/Frameworks/R.framework/Versions/4.2/Resources/library/plogr/include' -I'/Library/Frameworks/R.framework/Versions/4.2/Resources/library/Rcpp/include' -I/usr/local/include -fPIC -Wall -g -O2 -c PqResult.cpp -o PqResult.o
#> clang++ -mmacosx-version-min=10.13 -std=gnu++14 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/opt/libpq/include -Ivendor -DRCPP_DEFAULT_INCLUDE_CALL=false -DRCPP_USING_UTF8_ERROR_STRING -DBOOST_NO_AUTO_PTR -I'/Library/Frameworks/R.framework/Versions/4.2/Resources/library/plogr/include' -I'/Library/Frameworks/R.framework/Versions/4.2/Resources/library/Rcpp/include' -I/usr/local/include -fPIC -Wall -g -O2 -c PqResultImpl.cpp -o PqResultImpl.o
#> clang++ -mmacosx-version-min=10.13 -std=gnu++14 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/opt/libpq/include -Ivendor -DRCPP_DEFAULT_INCLUDE_CALL=false -DRCPP_USING_UTF8_ERROR_STRING -DBOOST_NO_AUTO_PTR -I'/Library/Frameworks/R.framework/Versions/4.2/Resources/library/plogr/include' -I'/Library/Frameworks/R.framework/Versions/4.2/Resources/library/Rcpp/include' -I/usr/local/include -fPIC -Wall -g -O2 -c PqResultSource.cpp -o PqResultSource.o
#> clang++ -mmacosx-version-min=10.13 -std=gnu++14 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/opt/libpq/include -Ivendor -DRCPP_DEFAULT_INCLUDE_CALL=false -DRCPP_USING_UTF8_ERROR_STRING -DBOOST_NO_AUTO_PTR -I'/Library/Frameworks/R.framework/Versions/4.2/Resources/library/plogr/include' -I'/Library/Frameworks/R.framework/Versions/4.2/Resources/library/Rcpp/include' -I/usr/local/include -fPIC -Wall -g -O2 -c PqUtils.cpp -o PqUtils.o
#> clang -mmacosx-version-min=10.13 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/opt/libpq/include -Ivendor -DRCPP_DEFAULT_INCLUDE_CALL=false -DRCPP_USING_UTF8_ERROR_STRING -DBOOST_NO_AUTO_PTR -I'/Library/Frameworks/R.framework/Versions/4.2/Resources/library/plogr/include' -I'/Library/Frameworks/R.framework/Versions/4.2/Resources/library/Rcpp/include' -I/usr/local/include -fPIC -Wall -g -O2 -c RPostgres-init.c -o RPostgres-init.o
#> clang++ -mmacosx-version-min=10.13 -std=gnu++14 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/opt/libpq/include -Ivendor -DRCPP_DEFAULT_INCLUDE_CALL=false -DRCPP_USING_UTF8_ERROR_STRING -DBOOST_NO_AUTO_PTR -I'/Library/Frameworks/R.framework/Versions/4.2/Resources/library/plogr/include' -I'/Library/Frameworks/R.framework/Versions/4.2/Resources/library/Rcpp/include' -I/usr/local/include -fPIC -Wall -g -O2 -c RcppExports.cpp -o RcppExports.o
#> clang++ -mmacosx-version-min=10.13 -std=gnu++14 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/opt/libpq/include -Ivendor -DRCPP_DEFAULT_INCLUDE_CALL=false -DRCPP_USING_UTF8_ERROR_STRING -DBOOST_NO_AUTO_PTR -I'/Library/Frameworks/R.framework/Versions/4.2/Resources/library/plogr/include' -I'/Library/Frameworks/R.framework/Versions/4.2/Resources/library/Rcpp/include' -I/usr/local/include -fPIC -Wall -g -O2 -c connection.cpp -o connection.o
#> clang++ -mmacosx-version-min=10.13 -std=gnu++14 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/opt/libpq/include -Ivendor -DRCPP_DEFAULT_INCLUDE_CALL=false -DRCPP_USING_UTF8_ERROR_STRING -DBOOST_NO_AUTO_PTR -I'/Library/Frameworks/R.framework/Versions/4.2/Resources/library/plogr/include' -I'/Library/Frameworks/R.framework/Versions/4.2/Resources/library/Rcpp/include' -I/usr/local/include -fPIC -Wall -g -O2 -c encode.cpp -o encode.o
#> clang++ -mmacosx-version-min=10.13 -std=gnu++14 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/opt/libpq/include -Ivendor -DRCPP_DEFAULT_INCLUDE_CALL=false -DRCPP_USING_UTF8_ERROR_STRING -DBOOST_NO_AUTO_PTR -I'/Library/Frameworks/R.framework/Versions/4.2/Resources/library/plogr/include' -I'/Library/Frameworks/R.framework/Versions/4.2/Resources/library/Rcpp/include' -I/usr/local/include -fPIC -Wall -g -O2 -c encrypt.cpp -o encrypt.o
#> clang++ -mmacosx-version-min=10.13 -std=gnu++14 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/opt/libpq/include -Ivendor -DRCPP_DEFAULT_INCLUDE_CALL=false -DRCPP_USING_UTF8_ERROR_STRING -DBOOST_NO_AUTO_PTR -I'/Library/Frameworks/R.framework/Versions/4.2/Resources/library/plogr/include' -I'/Library/Frameworks/R.framework/Versions/4.2/Resources/library/Rcpp/include' -I/usr/local/include -fPIC -Wall -g -O2 -c logging.cpp -o logging.o
#> clang++ -mmacosx-version-min=10.13 -std=gnu++14 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/opt/libpq/include -Ivendor -DRCPP_DEFAULT_INCLUDE_CALL=false -DRCPP_USING_UTF8_ERROR_STRING -DBOOST_NO_AUTO_PTR -I'/Library/Frameworks/R.framework/Versions/4.2/Resources/library/plogr/include' -I'/Library/Frameworks/R.framework/Versions/4.2/Resources/library/Rcpp/include' -I/usr/local/include -fPIC -Wall -g -O2 -c result.cpp -o result.o
#> clang++ -mmacosx-version-min=10.13 -std=gnu++14 -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 DbColumn.o DbColumnDataSource.o DbColumnDataSourceFactory.o DbColumnStorage.o DbConnection.o DbDataFrame.o DbResult.o PqColumnDataSource.o PqColumnDataSourceFactory.o PqDataFrame.o PqResult.o PqResultImpl.o PqResultSource.o PqUtils.o RPostgres-init.o RcppExports.o connection.o encode.o encrypt.o logging.o result.o -L/usr/local/opt/libpq/lib -lpq -F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework -Wl,CoreFoundation
#> ld: warning: dylib (/usr/local/opt/libpq/lib/libpq.dylib) was built for newer macOS version (12.0) than being linked (10.13)
#> installing to /Library/Frameworks/R.framework/Versions/4.2/Resources/library/00LOCK-RPostgres/00new/RPostgres/libs
#> ** R
#> ** inst
#> ** byte-compile and prepare package for lazy loading
#> ** help
#> *** installing help indices
#> ** building package indices
#> ** installing vignettes
#> ** testing if installed package can be loaded from temporary location
#> ** checking absolute paths in shared objects and dynamic libraries
#> ** testing if installed package can be loaded from final location
#> ** testing if installed package keeps a record of temporary installation path
#> * DONE (RPostgres)
#>
#> The downloaded source packages are in
#> ‘/private/var/folders/np/n1zvy7cs7m9blq1w1_m_bqqw0000gn/T/RtmpcjWwNf/downloaded_packages’ |
Is this still a problem with the most recent CRAN binary? |
A duplicate of #404 perhaps? |
It is.
I'm currently on macOS 14.4.1 and R 4.3.3, and it remains to be the case that the binary version (now 1.4.6) of RPostgres installed from CRAN does not work with our Redshift. When I compile RPostgres from source, it does work. (I have postgresql@14 version 14.11 installed via Homebrew, which is used when compiling.) I'm on an Intel Mac, whereas the linked issue seemed to be specific to Apple Silicon, so I think this is something different. While the problem is easy enough to fix for me by compiling form source, I recently had a colleague run into the same issue, and they were unable to compile from source on an Apple Silicon Mac. I didn't look into that in more detail yet, as I will be upgrading from Intel later this month. I will then see if I can get to a similar fix on Apple Silicon too, but of course it would be ideal if the CRAN binary worked out of the box. One thing that has changed since originally reporting this is that it now affects both our Redshift instances (staging and production). So something (like an update, cert change, …) must have happened on the AWS side to the staging instance, as that used to work. Something perhaps worth repeating is that the error happens before authentication, as the error message is the same regardless of whether I'm using valid username/password or not. (And is also different from the one I get with invalid credentials when using the compiled-from-source version of the package.) |
I now understood Simon's comment. Can you please try compiling with libpq from https://mac.r-project.org/bin/darwin20/x86_64/ (or whatever subdirectory is appropriate for your platform)? If we need a newer/different libpq, we could send a pull request to https://github.com/R-macos/recipes/blob/master/recipes/libpq . |
OK, I:
And as a result I am running into the issue described above. So I take it the hunch is correct there that One thing I am confused by is that the compilation output mentions "autobrew bundle version 15.2":
But the entire output doesn't make it clear to me if it's actually using the 14.5 I installed manually, or the 15.2 it might download as part of the compilation. There are lines that point to directories where I put the manual installation, e.g.
So my questions:
|
I believe the autobrew source is here: https://github.com/autobrew/scripts/blob/master/libpq . In some cases (High Sierra?), we still seem to be using 14.5 here. The autobrew mechanism can be disabled by setting the The library used should be reported with @jeroen: Can/should we bump to 16.2 here? Would that work for the High Sierra case? |
High-sierra is no longer in use on CRAN or GHA or anywhere else so we don't need to worry about that. I have updated the script to libpq 16.0 (for which big-sur binaries were already available): autobrew/scripts@ea29fea. However, the problem is that the CRAN macbuilders now have another version of libpq 14.5 preinstalled on the server (via the recipes system) and therefore autobrew is not used. I think you can fix this by increasing to Lines 21 to 22 in 2b2081c
|
@ilarischeinin could you test the binary package from r-universe? If that one works, it is very likely that the next CRAN release will also work for you: install.packages("RPostgres", repos = c("https://r-dbi.r-universe.dev", "https://cran.r-project.org")) |
Let's keep it open for now until the fixes are confirmed. |
Thanks both!
Unfortunately it does not work. However, I'm not sure if I've somehow messed up my system when I did this earlier:
As now I can't get compiling from source to produce a working version either. I did delete the files I manually copied to /opt, so not sure what is going on. But as the source code on CRAN is exactly the same as before, I feel like the issue must be on my end. The only other change is the one Jeroen made to the autobrew script, the effect of which I do see in the output:
Whereas earlier it was 15.2 as mentioned above. If I set
This is becoming a real head-scratcher for me. One reason being the extra complexity brought in by the autobrew setup. Whereas I said that earlier compiling from source did work with There is still a way I can get
If I include those exports, as well as the |
But can you test the binary package? You should not have to compile anything. Which build of R do you use? Do you use an official R for MacOS from CRAN or the homebrew version of R? |
The working version compiled from source against
Whereas the one that uses autobrew (and doesn't work) has:
That one doesn't work. That also has
Perhaps autobrew should have 16.2 instead of 16.0? |
The former. Version 4.3.3. |
autobrew literally just has a copy of the last binary in homebrew when they still supported macos-11 (big-sur) a few months ago. I doubt that this is the issue, unless something was fixed very very recently... |
I'm on Sonoma, so should I be seeing that "Using autobrew" line at all? |
Well not if you use the binary packages. If you install from source, and no suitable libpq is found locally, it will get libpq from autobrew indeed. |
Right now
I'm trying to go up that list getting more paths working. While fixing 1. would of course be the best, even getting 3. to work would be nice. That's why I'm wondering if bumping the version in autobrew from 16.0 to 16.2 would help with that. |
Collecting from the various messages above
I'm not 100% sure that's causation there, or if there might be other moving parts too that are the real cause. Still, this makes me think if this might be something that was fixed separately in the 14.x/15.x/16.x major version paths in some x. And that's why bumping to e.g. 16.0 does not help. |
I asked a colleague who's on Apple Silicon to test this too (I'm still on Intel). The outcome was the same:
|
OK I'll try to build a static version of 16.2, so that we can rule that out. Another moving piece may be the gss implementation. We can link against the one included with MacOS, and another one that is in homebrew. We use the one from MacOS because |
OK I have updated the binaries on https://r-dbi.r-universe.dev/RPostgres to 16.2. Could you test if this changes anything? install.packages("RPostgres", repos = "https://r-dbi.r-universe.dev")
# Confirm that it is indeed 16.2
library(RPostgres)
DBI::dbGetInfo(RPostgres::Postgres()) |
Thank you! But it does not! 😭 Still the same error
And can confirm it is indeed 16.2: DBI::dbGetInfo(RPostgres::Postgres())
# $driver.version
# [1] ‘1.4.6.9008’
#
# $client.version
# [1] ‘16.2’ So at least we know this is not about the version. That With your better understanding on how those pre-compiled versions are generated vs. how it might happen when I compile locally, can you see a relevant difference between the two? Anything I could test, or anything I could do to increase logging to surface something more useful as for the error? |
FWIW, here's the full output from manual compilation, which results in a working binary.
|
Have you looked in your redshift server logs why it is rejecting the connection? That would probably give a clue where to look. Also did you try if the version of MacOS mattes? I do suspect the kerberos version could be related. On MacOS I see: krb5-config --version
# Kerberos 5 release 1.7-prerelease Which is a pretty old. Homebrew has krb5 1.21. I can try to build a static version of krb5 that we can use in the R package, but that might take a while. |
Can someone distill the bottom line here for me here, please? I'm about to bump the libraries on the CRAN build machines since we're about to do a full rebuild for R 4.4.0, so I'd like to know
|
We don't know... It seems like an auth failure for specific servers, I suspect krb5 included with MacOS is too old (it's about 15 years old). So we would need to build against a more recent kerberos, however building that as a static lib is not easy. |
I don't see anything in the
Nowadays I'm on Sonoma (as is the colleague who also tried this), but it looks like I had Big Sur when I originally filed the issue.
As I've installed |
One big challenge for troubleshooting is that this affects Redshit, i.e. a managed, commercial service. If it was e.g. Postgres, anyone could run the server via docker and test things. But I don't know if there is a Redshift instance running somewhere that would be publicly accessible. I can try to see if it would be possible for my workplace to temporarily turn on such a cluster. |
Read through all of this and am wondering if there is a solution yet? I ran into the same error:
See related StackOverflow question. |
I discovered an odd issue, which I thought I'd report and can help troubleshoot if needed. The tl;dr is that I cannot connect to one Redshift server with the Mac binary from CRAN, but can if I compile from source.
The current Mac binary of
RPostgres
(1.4.5) seems to have an issue with some, but not all, Redshift servers. The command I'm running isand the error I get is:
The error message is the same also when I don't provide a valid username/password, so it seems to happen before authentication.
The weird thing is that I get this error with only one Redshift server (our production one) and not with another (our staging) – even though they're both running the same version. Also, I can connect to both with
psql
from my Mac, and can connect to both withRPostgres
from within a docker container running on my Mac. This made me suspect it is somehow related to the Mac version ofRPostgres
. And in fact, if instead of installing the binary from CRAN I compile it from source with (I havelibpq
installed with Homebrew):The problem goes away and I can connect to both servers.
I don't know if the solution is to simply recompile the Mac binary version that is available on CRAN, and that will fix it. If not, I can help troubleshoot on my end, in case that helps. The fact that this seems to affect some, but not all, Redshift servers can understandably make this hard the reproduce. Is there something I can do to see debugging messages from
RPostgres
/DBI
?My
sessionInfo()
:The text was updated successfully, but these errors were encountered: