hannes / MonetDBLite

MonetDB reconfigured as a library
108 stars 11 forks source link

Error: 'src_sql' is not an exported object from 'namespace:dplyr' #167

Closed lptolik closed 7 years ago

lptolik commented 7 years ago

Hi,

I've recently updated version of the dplyr package and got the following error:

library(DBI) library(dplyr) library(MonetDBLite) dbdir <- '~/path/to/db/dir/' prepareCon<-function(dbdir){ con <- dbConnect(MonetDBLite::MonetDBLite(), dbdir) if(dbIsValid(con)){ cat(paste(dbGetInfo(con),collapse = '\n')) }else{ stop('DB is not connected') } dbBegin(con) return(con) } con <- prepareCon(dbdir) monetdb_conn <- src_monetdb(con = con)

The last statement returns an error:

Error: 'src_sql' is not an exported object from 'namespace:dplyr'

The connection is working fine, the problem is in dplyr association.

Recent dplyr documentation proposed to call dplyr::tbl with connection:

t<- tbl(con,'spectra') Error in dbFetch(qry, 0) : Fetch 0 rows? Really?

That does not work as well. The code was functional with dplyr 0.5, on their site they listed that type of errors and send to your bugtracker.

ajdamico commented 7 years ago

hi, could you double-check this with the development version? i cannot reproduce these errors

devtools::install_github("hannesmuehleisen/MonetDBLite")
lptolik commented 7 years ago

devtools::install_github("hannesmuehleisen/MonetDBLite") Downloading GitHub repo hannesmuehleisen/MonetDBLite@master from URL https://api.github.com/repos/hannesmuehleisen/MonetDBLite/zipball/master Installation failed: Could not find build tools necessary to build MonetDBLite

CRAN version installed properly.

ajdamico commented 7 years ago

hi, that sounds like a separate issue. please do some googling to fix. maybe this? thanks

https://github.com/hadley/devtools/issues/1176#issuecomment-217750428

lptolik commented 7 years ago

Hi, I'm on MacOS:

R version 3.3.2 (2016-10-31) Platform: x86_64-apple-darwin13.4.0 (64-bit) Running under: macOS Sierra 10.12.5

locale: [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages: [1] stats graphics grDevices utils datasets methods base

other attached packages: [1] MonetDBLite_0.3.1

loaded via a namespace (and not attached): [1] httr_1.2.1 R6_2.2.2 DBI_0.7 tools_3.3.2 withr_1.0.2 curl_2.7 memoise_1.1.0 codetools_0.2-15 [9] git2r_0.18.0 digest_0.6.12 devtools_1.13.2

ajdamico commented 7 years ago

i do not think your issue is related to monetdblite? did you upgrade gcc?

hannes commented 7 years ago

I think you need to install Xcode command line tools

On 5 Jul 2017, at 19:47, Anthony Damico notifications@github.com wrote:

i do not think your issue is related to monetdblite? did you upgrade gcc?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

lptolik commented 7 years ago

yes, I've updated clang, gcc, installed R 3.4 and now I have a problem with shared library:

devtools::install_github("hannesmuehleisen/MonetDBLite") Downloading GitHub repo hannesmuehleisen/MonetDBLite@master from URL https://api.github.com/repos/hannesmuehleisen/MonetDBLite/zipball/master Installing MonetDBLite '/Library/Frameworks/R.framework/Resources/bin/R' --no-site-file --no-environ \ --no-save --no-restore --quiet CMD INSTALL \ '/private/var/folders/b2/vx2cstxj6kd4_0tc428h4_qm0000gn/T/RtmpCcWTc9/devtools7c852406336e/hannesmuehleisen-MonetDBLite-3cb70b3' \ --library='/Library/Frameworks/R.framework/Versions/3.4/Resources/library' \ --install-tests

I have reinstall monetdb via Homebrew, but I don't have libmonetdb5.so, I have libmonetdb5.dylib

hannes commented 7 years ago

" C compiler cannot create executables " that's the issue here I think.

lptolik commented 7 years ago

Hi, I've manage to compile, the problem was in OpenMP support in clang4 for Mac. The error disappeared with version from github, but a can confirm, that the error exists on CRAN binary version for Mac and Windows.

Cheers, Anatoly

ajdamico commented 7 years ago

makes sense since there was a big dplyr update recently and the monetdblite cran version is a year old. i think hannes plans to release the github version to cran in the next month. thanks for following up!