Closed GabrielHoffman closed 3 years ago
I did a little more testing and it is a problem with PythonEmbedInR
:
> packageVersion("PythonEmbedInR")
[1] ‘0.5.73’
Both of these were in fresh R sessions:
> library(PythonEmbedInR)
Loading required package: R6
Loading required package: rjson
*** caught segfault ***
address 0x18, cause 'memory not mapped'
Traceback:
1: pyIsConnected()
2: pyConnect()
3: fun(libname, pkgname)
4: doTryCatch(return(expr), name, parentenv, handler)
5: tryCatchOne(expr, names, parentenv, handlers[[1L]])
6: tryCatchList(expr, classes, parentenv, handlers)
7: tryCatch(fun(libname, pkgname), error = identity)
8: runHook(".onLoad", env, package.lib, package)
9: loadNamespace(package, lib.loc)
10: doTryCatch(return(expr), name, parentenv, handler)
11: tryCatchOne(expr, names, parentenv, handlers[[1L]])
12: tryCatchList(expr, classes, parentenv, handlers)
13: tryCatch({ attr(package, "LibPath") <- which.lib.loc ns <- loadNamespace(package, lib.loc) env <- attachNamespace(ns, pos = pos, deps, exclude, include.only)}, error = function(e) { P <- if (!is.null(cc <- conditionCall(e))) paste(" in", deparse(cc)[1L]) else "" msg <- gettextf("package or namespace load failed for %s%s:\n %s", sQuote(package), P, conditionMessage(e)) if (logical.return) message(paste("Error:", msg), domain = NA) else stop(msg, call. = FALSE, domain = NA)})
14: library(PythonEmbedInR)
Possible actions:
1: abort (with core dump, if enabled)
2: normal R exit
3: exit R without saving workspace
4: exit R saving workspace
and
>
> PythonEmbedInR::pyIsConnected()
*** caught segfault ***
address 0x18, cause 'memory not mapped'
Traceback:
1: pyIsConnected()
2: pyConnect()
3: fun(libname, pkgname)
4: doTryCatch(return(expr), name, parentenv, handler)
5: tryCatchOne(expr, names, parentenv, handlers[[1L]])
6: tryCatchList(expr, classes, parentenv, handlers)
7: tryCatch(fun(libname, pkgname), error = identity)
8: runHook(".onLoad", env, package.lib, package)
9: loadNamespace(name)
10: getNamespace(ns)
11: asNamespace(ns)
12: getExportedValue(pkg, name)
13: PythonEmbedInR::pyIsConnected
Possible actions:
1: abort (with core dump, if enabled)
2: normal R exit
3: exit R without saving workspace
4: exit R saving workspace
Hi @GabrielHoffman,
Thanks for reporting this. Indeed I can repro this on Mac with a source compiled R 4.0.3 with PythonEmbedInR v 0.5.73 (but not with the previous 0.4.65, and not on a Mac with a pkg installed R 4.0.3). I'll see if I can isolate what the difference is and update this issue accordingly.
In the meantime, is there a way to install the previous version with install_github
or something else? I couldn't figure it out
Thanks
@GabrielHoffman You could download the older versions of the binary packages and install them directly, e.g.
curl -O http://ran.synapse.org/bin/macosx/contrib/4.0/PythonEmbedInR_0.4.65.tgz curl -O http://ran.synapse.org/bin/macosx/contrib/4.0/synapser_0.7.64.tgz
R CMD INSTALL PythonEmbedInR_0.4.65.tgz R CMD INSTALL synapser_0.7.64.tgz
This assumes the other dependencies were already successfully installed, but I'm guessing they were if you encountered the error at this point.
Out of curiosity is there a reason you prefer not to use the binary installation of R 4.0.3? Normally you could use e.g. devtools::install_version to install an older version of a RAN package but I do not think that will work if you are using a source compiled R and want to install binary packages.
1) Perfect, thanks.
2) Why R from source? I develop R packages so I have multiple R versions with different Bioconductor versions on my machine so I can test my code. I might be able to do this with R binaries, but I'm so used to Unix systems that I install everything from source.
@GabrielHoffman
If you have a chance can you try installing the following release candidate (synapser 0.9.72) binary installation from the synapse staging RAN repo. It loads successfully for me on Mac catalina with a compiled 4.0.3 R but I'd appreciate confirmation. If it resolves this issue it will be included in the next release. e.g.
install.packages("synapser", repos=c("http://staging-ran.synapse.org", "http://cran.fhcrc.org"), type="mac.binary")
Thanks!
It installed fine, and basic usage of the synapser package works as expected
Thanks for fixing this Gabriel
The latest production release (syanpser 0.9.77) incorporates this fix. Installable from the synapse prod RAN repo e.g. install.packages("synapser", repos=c("http://ran.synapse.org", "http://cran.fhcrc.org"), type="mac.binary")
I just computed R 4.0.3 from source on my Mac. When I install
synapser
withand then load the package in an empty R session I get:
Here is my system info:
Thanks, Gabriel