Problem Install MetaboAnalystR

I normally run R v4.2.2 and failed to install metaboanalystR as the package SSPA was not available via Bioconductor 3.16 (it was last available in v3.13). I tried manually installing SSPA v2.30.0 hit other errors.

To keep things simple, I removed all R versions (and RTools) and re-installed R4.1.3
R version 4.1.3 (2022-03-10)
Rtools is 4.0

Whichever route I try to install MetaboanalystR I get the following error

Error: package or namespace load failed for ‘MetaboAnalystR’ in namespaceExport(ns, exports):
undefined exports: CreateMummichogLibs, GetCompoundDetails, GetMummichogPathSetDetails, GroupPeakList, ListNMDRStudies, SetPeakList.GroupValues
Error: loading failed

Code and full output is below - any help much appreciated

devtools::install_github(“xia-lab/MetaboAnalystR”, build = TRUE, build_vignettes = FALSE)
Downloading GitHub repo xia-lab/MetaboAnalystR@HEAD
Skipping 9 packages not available: Biobase, pcaMethods, siggenes, MSnbase, impute, fgsea, edgeR, BiocParallel, RBGL
– R CMD build ----------------------------------------------------------------------------------------------------------
v checking for file ‘C:\Users\Steve Rolfe\AppData\Local\Temp\Rtmp4GIbpV\remotes15c8242175bd\xia-lab-MetaboAnalystR-d1b2e7e/DESCRIPTION’ …

  • preparing ‘MetaboAnalystR’: (3s)
    v checking DESCRIPTION meta-information …
  • cleaning src
  • excluding invalid files (996ms)
    Subdirectory ‘R’ contains invalid file names:
    ‘_util_api.R’ ‘_util_approx.R’ ‘_util_batch.R’ ‘_util_fgsea.R’
    ‘_util_heatmap.R’ ‘_util_lipid.R’ ‘_util_listheatmap.R’ ‘_util_lsd.R’
    ‘_util_missing.R’ ‘_util_multifac_mb_1d.R’ ‘_util_multifac_mb_2d.R’
    ‘_util_multifac_mb_manova.R’ ‘_util_mztab.R’ ‘_util_nmdr.R’
    ‘_util_peaks.R’ ‘_util_plot3d.R’ ‘_util_psea.R’ ‘_util_savedata.R’
    ‘_util_sspa.R’ ‘_util_univreport.R’
  • checking for LF line-endings in source and make files and shell scripts
  • checking for empty or unneeded directories
  • building ‘MetaboAnalystR_3.3.0.tar.gz’

Installing package into ‘C:/Users/Steve Rolfe/Documents/R/win-library/4.1’
(as ‘lib’ is unspecified)

  • installing source package ‘MetaboAnalystR’ …
    ** using staged installation
    ** libs

*** arch - i386
rm -f fortran/decorana.o c/Internal_utils_batch.o c/util.o c/fastmatch.o c/nncgc.o c/mzROI.o c/xcms_binners.o
/mingw32/bin/gfortran -fno-optimize-sibling-calls -O2 -mfpmath=sse -msse2 -mstackrealign -c fortran/decorana.f -o fortran/decorana.o
/mingw32/bin/gcc -I"C:/PROGRA~1/R/R-4.1.3/include" -DNDEBUG -I’C:/Users/Steve Rolfe/Documents/R/win-library/4.1/Rcpp/include’ -O2 -Wall -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c c/Internal_utils_batch.c -o c/Internal_utils_batch.o
c/Internal_utils_batch.c: In function ‘do_decorana’:
c/Internal_utils_batch.c:114:3: warning: this ‘for’ clause does not guard… [-Wmisleading-indentation]
for (i = 0, nid = 0; i < nr*nc; i++)
^~~
c/Internal_utils_batch.c:118:5: note: …this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’
int *ibegin = (int *) R_alloc(nr, sizeof(int));
^~~
/mingw32/bin/gcc -I"C:/PROGRA~1/R/R-4.1.3/include" -DNDEBUG -I’C:/Users/Steve Rolfe/Documents/R/win-library/4.1/Rcpp/include’ -O2 -Wall -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c c/util.c -o c/util.o
/mingw32/bin/gcc -I"C:/PROGRA~1/R/R-4.1.3/include" -DNDEBUG -I’C:/Users/Steve Rolfe/Documents/R/win-library/4.1/Rcpp/include’ -O2 -Wall -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c c/fastmatch.c -o c/fastmatch.o
In file included from c/fastmatch.c:16:
c/common.h:11: warning: “XLENGTH” redefined
#define XLENGTH(X) LENGTH(X)

In file included from c/common.h:8,
from c/fastmatch.c:16:
C:/PROGRA~1/R/R-4.1.3/include/Rinternals.h:484: note: this is the location of the previous definition
#define XLENGTH(x) XLENGTH_EX(x)

In file included from c/fastmatch.c:16:
c/common.h:12: warning: “IS_LONG_VEC” redefined
#define IS_LONG_VEC(X) 0

In file included from c/common.h:8,
from c/fastmatch.c:16:
C:/PROGRA~1/R/R-4.1.3/include/Rinternals.h:467: note: this is the location of the previous definition

define IS_LONG_VEC(x) 0

c/fastmatch.c:215:15: warning: ‘NA_int2real’ defined but not used [-Wunused-function]
static double NA_int2real(hash_index_t res) {
^~~~~~~~~~~
/mingw32/bin/gcc -I"C:/PROGRA~1/R/R-4.1.3/include" -DNDEBUG -I’C:/Users/Steve Rolfe/Documents/R/win-library/4.1/Rcpp/include’ -O2 -Wall -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c c/nncgc.c -o c/nncgc.o
/mingw32/bin/gcc -I"C:/PROGRA~1/R/R-4.1.3/include" -DNDEBUG -I’C:/Users/Steve Rolfe/Documents/R/win-library/4.1/Rcpp/include’ -O2 -Wall -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c c/mzROI.c -o c/mzROI.o
/mingw32/bin/gcc -I"C:/PROGRA~1/R/R-4.1.3/include" -DNDEBUG -I’C:/Users/Steve Rolfe/Documents/R/win-library/4.1/Rcpp/include’ -O2 -Wall -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c c/xcms_binners.c -o c/xcms_binners.o
c/xcms_binners.c:11:1: warning: "/" within comment [-Wcomment]
/

c/xcms_binners.c: In function ‘_breaks_on_binSize’:
c/xcms_binners.c:361:7: warning: unused variable ‘idx’ [-Wunused-variable]
int idx = 0;
^~~
/mingw32/bin/g++ -shared -s -static-libgcc -o MetaboAnalystR.dll tmp.def fortran/decorana.o c/Internal_utils_batch.o c/util.o c/fastmatch.o c/nncgc.o c/mzROI.o c/xcms_binners.o -fopenmp -LC:/PROGRA~1/R/R-4.1.3/bin/i386 -lRlapack -LC:/PROGRA~1/R/R-4.1.3/bin/i386 -lRblas -lgfortran -lm -lquadmath -LC:/PROGRA~1/R/R-4.1.3/bin/i386 -lR
installing to C:/Users/Steve Rolfe/Documents/R/win-library/4.1/00LOCK-MetaboAnalystR/00new/MetaboAnalystR/libs/i386

*** arch - x64
rm -f fortran/decorana.o c/Internal_utils_batch.o c/util.o c/fastmatch.o c/nncgc.o c/mzROI.o c/xcms_binners.o
/mingw64/bin/gfortran -fno-optimize-sibling-calls -O2 -mfpmath=sse -msse2 -mstackrealign -c fortran/decorana.f -o fortran/decorana.o
/mingw64/bin/gcc -I"C:/PROGRA~1/R/R-4.1.3/include" -DNDEBUG -I’C:/Users/Steve Rolfe/Documents/R/win-library/4.1/Rcpp/include’ -O2 -Wall -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c c/Internal_utils_batch.c -o c/Internal_utils_batch.o
c/Internal_utils_batch.c: In function ‘do_decorana’:
c/Internal_utils_batch.c:114:3: warning: this ‘for’ clause does not guard… [-Wmisleading-indentation]
for (i = 0, nid = 0; i < nr*nc; i++)
^~~
c/Internal_utils_batch.c:118:5: note: …this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’
int ibegin = (int ) R_alloc(nr, sizeof(int));
^~~
/mingw64/bin/gcc -I"C:/PROGRA~1/R/R-4.1.3/include" -DNDEBUG -I’C:/Users/Steve Rolfe/Documents/R/win-library/4.1/Rcpp/include’ -O2 -Wall -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c c/util.c -o c/util.o
/mingw64/bin/gcc -I"C:/PROGRA~1/R/R-4.1.3/include" -DNDEBUG -I’C:/Users/Steve Rolfe/Documents/R/win-library/4.1/Rcpp/include’ -O2 -Wall -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c c/fastmatch.c -o c/fastmatch.o
/mingw64/bin/gcc -I"C:/PROGRA~1/R/R-4.1.3/include" -DNDEBUG -I’C:/Users/Steve Rolfe/Documents/R/win-library/4.1/Rcpp/include’ -O2 -Wall -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c c/nncgc.c -o c/nncgc.o
/mingw64/bin/gcc -I"C:/PROGRA~1/R/R-4.1.3/include" -DNDEBUG -I’C:/Users/Steve Rolfe/Documents/R/win-library/4.1/Rcpp/include’ -O2 -Wall -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c c/mzROI.c -o c/mzROI.o
/mingw64/bin/gcc -I"C:/PROGRA~1/R/R-4.1.3/include" -DNDEBUG -I’C:/Users/Steve Rolfe/Documents/R/win-library/4.1/Rcpp/include’ -O2 -Wall -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c c/xcms_binners.c -o c/xcms_binners.o
c/xcms_binners.c:11:1: warning: "/
" within comment [-Wcomment]
/

c/xcms_binners.c: In function ‘_breaks_on_binSize’:
c/xcms_binners.c:361:7: warning: unused variable ‘idx’ [-Wunused-variable]
int idx = 0;
^~~
/mingw64/bin/g++ -shared -s -static-libgcc -o MetaboAnalystR.dll tmp.def fortran/decorana.o c/Internal_utils_batch.o c/util.o c/fastmatch.o c/nncgc.o c/mzROI.o c/xcms_binners.o -fopenmp -LC:/PROGRA~1/R/R-4.1.3/bin/x64 -lRlapack -LC:/PROGRA~1/R/R-4.1.3/bin/x64 -lRblas -lgfortran -lm -lquadmath -LC:/PROGRA~1/R/R-4.1.3/bin/x64 -lR
installing to C:/Users/Steve Rolfe/Documents/R/win-library/4.1/00LOCK-MetaboAnalystR/00new/MetaboAnalystR/libs/x64
** R
** inst
** byte-compile and prepare package for lazy loading
Note: possible error in 'fast.write.csv(df, file = oriFile, ': unused argument (quote = FALSE)
** help
*** installing help indices <omitted to keep within 32k char limit>
** building package indices
** testing if installed package can be loaded from temporary location
*** arch - i386
Error: package or namespace load failed for ‘MetaboAnalystR’ in namespaceExport(ns, exports):
undefined exports: CreateMummichogLibs, GetCompoundDetails, GetMummichogPathSetDetails, GroupPeakList, ListNMDRStudies, SetPeakList.GroupValues
Error: loading failed
Execution halted
*** arch - x64
Error: package or namespace load failed for ‘MetaboAnalystR’ in namespaceExport(ns, exports):
undefined exports: CreateMummichogLibs, GetCompoundDetails, GetMummichogPathSetDetails, GroupPeakList, ListNMDRStudies, SetPeakList.GroupValues
Error: loading failed
Execution halted
ERROR: loading failed for ‘i386’, ‘x64’

  • removing ‘C:/Users/Steve Rolfe/Documents/R/win-library/4.1/MetaboAnalystR’
1 Like

I’m having the same problem.

I couldnt get it to install using any of the instructions even after downgrading to R 4.1.3. Eventually i downloaded all of the source files from git hub then sourced them individually. This identified all of the packages that were needed (and there were quite a few). One of the packages (cant recall which, not at work at the moment) wouldnt source so i just ignored it.
I then ran the code from web version and dealt with missing variables as they cropped up. I wanted to hack a function to get a tree object out which worked well enough.