I've installed Qiime2 2018.2 (2018.2.0, with dada2 version 2018.2.0) in its own conda environment following the official instructions. I am getting a segfault when Qiime tries to load the dada2 R package. I came across the problem while trying to run qiime dada2 denoise-paired
, but all I need to do to trigger the error is activate the conda environment, open an R session, and execute library(dada2)
. The error message is:
Loading required package: Rcpp
*** caught segfault ***
address 0x1310, cause 'memory not mapped'
Traceback:
1: dyn.load(file, DLLpath = DLLpath, ...)
2: library.dynam(lib, package, package.lib)
3: loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]])
4: asNamespace(ns)
5: namespaceImportFrom(ns, loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]), i[[2L]], from = package)
6: loadNamespace(package, lib.loc)
7: doTryCatch(return(expr), name, parentenv, handler)
8: tryCatchOne(expr, names, parentenv, handlers[[1L]])
9: tryCatchList(expr, classes, parentenv, handlers)
10: tryCatch({ attr(package, "LibPath") <- which.lib.loc ns <- loadNamespace(package, lib.loc) env <- attachNamespace(ns, pos = pos, deps)}, 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)})
11: library(dada2)
So it just seems to be a matter of getting this library to work within that environment.
A few notes:
- I can load dada2 from an R session from my global environment without a problem (that is, without activating any conda environment)
- I can load dada2 fine within an environment with Qiime2 2017.11.0 (dada2 2017.11.0) but not 2017.12.1 (dada2 2017.12.1).
- In this thread it is recommended to reinstall dada2 using
CDPATH= R -e 'source("https://bioconductor.org/biocLite.R"); biocLite("dada2")'
. When I try that, I get the errorERROR: failed to lock directory ‘/Users/greg/Library/R/3.4/library’ for modifying, Try removing ‘/Users/greg/Library/R/3.4/library/00LOCK-dada2’
. Which, to me, makes it seem like it's trying to install in my global environment...When I remove that directory and run the command, it builds dada2 but then gives me the segfault error again when it tries to install it. Furthermore, dada2 then fails to load in my global environment (but works again when I reinstall it outside the conda environment).
I am running Mac OS X High Sierra 10.13.3.
I'm aware of several previous related posts (DADA2 (2017-12) segfault, memory not mapped error and DADA2: error caught segfault) where it appears that a patch has been made to 2017.12, but I get the same segfault when I install 2017.12 (version 2017.12.1) in its own conda environment. I thought I would start a new post, since those threads seem to have been closed.