Hello,
I’m using R v4.4.2 on an apple silicon M3 macbook air with macOS Sequoia 15.2 and am having trouble installing the MetaboAnalystR package. I’ve reinstalled the compatible gfortran version after seeing this on some forums and it still isn’t working.
The warning message says “Warning message: package ‘MetaboAnalystR’ is not available for Bioconductor version ‘3.20’” - so does this mean MetaboAnalystR is just not compatible with the updated version of Bioconductor? I tried to install the previous version of Bioconductor, but it was not compatible with R v4.4.2. The weird thing is that a colleague using the same R version as me has managed to install the package and has it working.
I’ve tried reinstalling Homebrew as I originally had the wrong version for silicon, reinstalled and upgraded gcc, and have just tried reinstalling rccp in R as well, but still to no avail. I’m wondering if because it is the new M3 chip that there is a comptability issue? Does anyone know if MetaboAnalystR has been used at all with the M3?
I should also mention I sometimes get the error: " Old packages: ‘fgsea’, ‘igraph’ " but have updated both of these packages and it still occurs.
Many thanks,
Daisy
Cxmmm
January 15, 2025, 9:48pm
2
Try the method of Cloning Github and installing locally.
That works for M1 and M4
Hi,
Thanks for your response. I cloned the source and found to use this code on another forum…
install.packages("devtools")
library(devtools)
my_cloned_library_build = devtools::build("~Users/daisyshaw/MetaboAnalystR")
devtools::install_local(my_cloned_library_build)
And this is the output I get as a result…
These packages have more recent versions available.
It is recommended to update all of them.
Which would you like to update?
1: All
2: CRAN packages only
3: None
4: igraph (2.1.2 -> 2.1.3) [CRAN]
Enter one or more numbers, or an empty line to skip updates: 1
igraph (2.1.2 -> 2.1.3) [CRAN]
Skipping 9 packages not available: Biobase, pcaMethods, siggenes, MSnbase, impute, fgsea, edgeR, BiocParallel, RBGL
Installing 1 packages: igraph
trying URL 'http://cran.ma.imperial.ac.uk/bin/macosx/big-sur-arm64/contrib/4.4/igraph_2.1.2.tgz'
Content type 'application/x-gzip' length 9720193 bytes (9.3 MB)
==================================================
downloaded 9.3 MB
The downloaded binary packages are in
/var/folders/40/zw5kns156cdfy9jq336nh5dh0000gn/T//RtmpTOQefk/downloaded_packages
── R CMD build ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
✔ checking for file ‘/private/var/folders/40/zw5kns156cdfy9jq336nh5dh0000gn/T/RtmpTOQefk/remotes3d1f3cf8c88a/MetaboAnalystR/DESCRIPTION’ ...
─ preparing ‘MetaboAnalystR’:
✔ checking DESCRIPTION meta-information ...
─ cleaning src
─ checking for LF line-endings in source and make files and shell scripts
─ checking for empty or unneeded directories
─ building ‘MetaboAnalystR_4.0.0.tar.gz’
* installing *source* package ‘MetaboAnalystR’ ...
** using staged installation
** libs
using C++ compiler: ‘Apple clang version 16.0.0 (clang-1600.0.26.6)’
using C++11
using SDK: ‘MacOSX15.2.sdk’
rm -f fortran/decorana.o c/Internal_utils_batch.o c/util.o c/fastmatch.o c/nncgc.o cpp/melt.o c/mzROI.o c/xcms_binners.o Exports.o
/opt/gfortran/bin/gfortran -arch arm64 -fPIC -Wall -g -O2 -c fortran/decorana.f -o fortran/decorana.o
clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I'/Library/Frameworks/R.framework/Versions/4.4-arm64/Resources/library/Rcpp/include' -I/opt/R/arm64/include -fPIC -falign-functions=64 -Wall -g -O2 -c c/Internal_utils_batch.c -o c/Internal_utils_batch.o
clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I'/Library/Frameworks/R.framework/Versions/4.4-arm64/Resources/library/Rcpp/include' -I/opt/R/arm64/include -fPIC -falign-functions=64 -Wall -g -O2 -c c/util.c -o c/util.o
clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I'/Library/Frameworks/R.framework/Versions/4.4-arm64/Resources/library/Rcpp/include' -I/opt/R/arm64/include -fPIC -falign-functions=64 -Wall -g -O2 -c c/fastmatch.c -o c/fastmatch.o
clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I'/Library/Frameworks/R.framework/Versions/4.4-arm64/Resources/library/Rcpp/include' -I/opt/R/arm64/include -fPIC -falign-functions=64 -Wall -g -O2 -c c/nncgc.c -o c/nncgc.o
clang++ -arch arm64 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I'/Library/Frameworks/R.framework/Versions/4.4-arm64/Resources/library/Rcpp/include' -I/opt/R/arm64/include -fPIC -falign-functions=64 -Wall -g -O2 -c cpp/melt.cpp -o cpp/melt.o
In file included from cpp/melt.cpp:1:
In file included from /Library/Frameworks/R.framework/Versions/4.4-arm64/Resources/library/Rcpp/include/Rcpp.h:27:
In file included from /Library/Frameworks/R.framework/Versions/4.4-arm64/Resources/library/Rcpp/include/RcppCommon.h:30:
In file included from /Library/Frameworks/R.framework/Versions/4.4-arm64/Resources/library/Rcpp/include/Rcpp/r/headers.h:66:
/Library/Frameworks/R.framework/Versions/4.4-arm64/Resources/library/Rcpp/include/Rcpp/platform/compiler.h:100:10: fatal error: 'cmath' file not found
100 | #include <cmath>
| ^~~~~~~
1 error generated.
make: *** [cpp/melt.o] Error 1
ERROR: compilation failed for package ‘MetaboAnalystR’
* removing ‘/Library/Frameworks/R.framework/Versions/4.4-arm64/Resources/library/MetaboAnalystR’
Warning message:
In i.p(...) :
installation of package ‘/var/folders/40/zw5kns156cdfy9jq336nh5dh0000gn/T//RtmpTOQefk/file3d1ff0532fe/MetaboAnalystR_4.0.0.tar.gz’ had non-zero exit status
It looks like the main error it is throwing out is to do with cpp - how do I get round this?
Many thanks,
Daisy
Cxmmm
January 16, 2025, 5:50pm
4
Sorry, I’m not really sure about this.
Maybe you can check your Xcode and GNU Fortran?
It’s on the tutorial page of MetaboAnalysisR
https://thecoatlessprofessor.com/programming/cpp/r-compiler-tools-for-rcpp-on-macos/
I’ve checked my Xcode and GNU Fortran and they are both up to date. I think I’ve found an issue, although not sure if it is causing the installation problem or not.
When in bash, my system is choosing Clang over Homebrew GCC, and despite following step by step instructions to explicitly set gc-14, it is still pointing to Clang. Could this be causing the issue with installation?