Hi there,
I am trying to download the MetaboAnalystR package and keep running into issues. I’m using a new (M1) Mac and have all of the required softwares installed (Xcode command line, Xquartz11), but have just run into a problem which seems to be due to the ‘Rcpp’ package. I re-installed the package, but that didn’t work, unfortunately. Any help or advice would be really appreciated! Thanks very much!
Below is the code that I am using to install MetaboAnalystR:
if (!requireNamespace("BiocManager", quietly = TRUE))
install.packages("BiocManager")
BiocManager::install("BiocVersion", force = TRUE)
BiocManager::install(c("impute","pcaMethods","globaltest","GlobalAncova","Rgraphviz","preprocessCore",
"genefilter","sva","limma","KEGGgraph","siggenes","BiocParallel","MSnbase",
"multtest","RBGL","edgeR","fgsea", "ctc"), force = TRUE)
install.packages("devtools")
library(devtools)
## Restart r
Sys.which("make")
find_rtools()
install.packages(c("pls","Rserve","ellipse","scatterplot3d","Cairo","randomForest","caTools","e1071","som",
"RJSONIO","ROCR","pheatmap","pROC","fitdistrplus","lars","Hmisc","caret","crmn"))
install.packages("igraph")
library("igraph")
devtools::install_version('mnormt', version = "1.5-7", repos="http://cran.rstudio.com")
library("quantreg")
install.packages("Rcpp", dependencies = TRUE)
install.packages(c("impute", "pcaMethods", "globaltest","GlobalAncova",
"Rgraphviz", "preprocessCore", "genefilter", "SSPA",
"sva", "limma", "KEGGgraph", "siggenes","BiocParallel",
"MSnbase", "multtest","RBGL","edgeR","fgsea","httr","qs",
"metap","entropy","rsm","Rcpp","gplots","reshape","spls"))
package_dependencies <-(c("impute","pcaMethods","globaltest","GlobalAncova","Rgraphviz","preprocessCore",
"genefilter","sva","limma","KEGGgraph","siggenes","BiocParallel","MSnbase",
"multtest","RBGL","edgeR","fgsea","httr","pls","Rserve","ellipse","scatterplot3d","Cairo","randomForest","caTools","e1071","som",
"RJSONIO","ROCR","pheatmap","pROC","fitdistrplus","lars","Hmisc","caret","crmn", "impute", "pcaMethods", "globaltest","GlobalAncova",
"Rgraphviz", "preprocessCore", "genefilter",
"sva", "limma", "KEGGgraph", "siggenes","BiocParallel",
"MSnbase", "multtest","RBGL","edgeR","fgsea","httr","qs",
"metap","entropy","rsm","Rcpp","gplots","reshape","spls", "mnormt"))
lapply(package_dependencies, require, character.only = TRUE)
devtools::install_github("xia-lab/MetaboAnalystR", build = TRUE, build_vignettes = TRUE, build_manual =T)
And here are the error messages that I am getting:
Installing package into ‘/Users/alex.ward/Library/R/x86_64/4.1/library’
(as ‘lib’ is unspecified)
* installing *source* package ‘MetaboAnalystR’ ...
** using staged installation
** libs
rm -f fortran/decorana.o c/Internal_utils_batch.o c/util.o cpp/melt.o c/fastmatch.o c/nncgc.o c/mzROI.o c/xcms_binners.o Exports.o
gfortran -mmacosx-version-min=10.13 -fno-optimize-sibling-calls -fPIC -Wall -g -O2 -c fortran/decorana.f -o fortran/decorana.o
clang -mmacosx-version-min=10.13 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I'/Users/alex.ward/Library/R/x86_64/4.1/library/Rcpp/include' -I/usr/local/include -fPIC -Wall -g -O2 -c c/Internal_utils_batch.c -o c/Internal_utils_batch.o
clang -mmacosx-version-min=10.13 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I'/Users/alex.ward/Library/R/x86_64/4.1/library/Rcpp/include' -I/usr/local/include -fPIC -Wall -g -O2 -c c/util.c -o c/util.o
clang++ -mmacosx-version-min=10.13 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I'/Users/alex.ward/Library/R/x86_64/4.1/library/Rcpp/include' -I/usr/local/include -fPIC -Wall -g -O2 -c cpp/melt.cpp -o cpp/melt.o
clang -mmacosx-version-min=10.13 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I'/Users/alex.ward/Library/R/x86_64/4.1/library/Rcpp/include' -I/usr/local/include -fPIC -Wall -g -O2 -c c/fastmatch.c -o c/fastmatch.o
clang -mmacosx-version-min=10.13 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I'/Users/alex.ward/Library/R/x86_64/4.1/library/Rcpp/include' -I/usr/local/include -fPIC -Wall -g -O2 -c c/nncgc.c -o c/nncgc.o
clang -mmacosx-version-min=10.13 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I'/Users/alex.ward/Library/R/x86_64/4.1/library/Rcpp/include' -I/usr/local/include -fPIC -Wall -g -O2 -c c/mzROI.c -o c/mzROI.o
clang -mmacosx-version-min=10.13 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I'/Users/alex.ward/Library/R/x86_64/4.1/library/Rcpp/include' -I/usr/local/include -fPIC -Wall -g -O2 -c c/xcms_binners.c -o c/xcms_binners.o
c/xcms_binners.c:11:1: warning: '/*' within block comment [-Wcomment]
/*
^
c/xcms_binners.c:361:7: warning: unused variable 'idx' [-Wunused-variable]
int idx = 0;
^
2 warnings generated.
clang++ -mmacosx-version-min=10.13 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I'/Users/alex.ward/Library/R/x86_64/4.1/library/Rcpp/include' -I/usr/local/include -fPIC -Wall -g -O2 -c Exports.cpp -o Exports.o
clang++ -mmacosx-version-min=10.13 -std=gnu++11 -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 MetaboAnalystR.so fortran/decorana.o c/Internal_utils_batch.o c/util.o cpp/melt.o c/fastmatch.o c/nncgc.o c/mzROI.o c/xcms_binners.o Exports.o -L/Library/Frameworks/R.framework/Resources/lib -lRlapack -L/Library/Frameworks/R.framework/Resources/lib -lRblas -L/usr/local/gfortran/lib/gcc/x86_64-apple-darwin18/8.2.0 -L/usr/local/gfortran/lib -lgfortran -lquadmath -lm -F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework -Wl,CoreFoundation
ld: warning: directory not found for option '-L/usr/local/gfortran/lib/gcc/x86_64-apple-darwin18/8.2.0'
ld: warning: ignoring file fortran/decorana.o, building for macOS-x86_64 but attempting to link with file built for unknown-arm64
ld: warning: ignoring file /usr/local/gfortran/lib/libgfortran.dylib, building for macOS-x86_64 but attempting to link with file built for macOS-arm64
ld: warning: ignoring file /usr/local/gfortran/lib/libquadmath.dylib, building for macOS-x86_64 but attempting to link with file built for macOS-arm64
installing to /Users/alex.ward/Library/R/x86_64/4.1/library/00LOCK-MetaboAnalystR/00new/MetaboAnalystR/libs
** R
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded from temporary location
Error: package or namespace load failed for ‘MetaboAnalystR’ in dyn.load(file, DLLpath = DLLpath, ...):
unable to load shared object '/Users/alex.ward/Library/R/x86_64/4.1/library/00LOCK-MetaboAnalystR/00new/MetaboAnalystR/libs/MetaboAnalystR.so':
dlopen(/Users/alex.ward/Library/R/x86_64/4.1/library/00LOCK-MetaboAnalystR/00new/MetaboAnalystR/libs/MetaboAnalystR.so, 0x0006): symbol not found in flat namespace '_cutup_'
Error: loading failed
Execution halted
ERROR: loading failed
* removing ‘/Users/alex.ward/Library/R/x86_64/4.1/library/MetaboAnalystR’
Warning message:
In i.p(...) :
installation of package ‘/var/folders/70/_g5nwm3j2734nzw774byyydw0000gn/T//RtmpWZMr2r/file3eb617da5c0d/MetaboAnalystR_3.2.0.tar.gz’ had non-zero exit status
Thanks a lot for reading through!