If this is the first time you build and install an R package you can follow this link, which has simple installation instructions for Windows, Mac OSX and Linux.
To specifically install the command-line tools of Xcode for Mac OSX you might also need to run this line in terminal:
For Windows or Linux (exclude the python.app):
name: giotto_env channels: — defaults dependencies: — pip=3.4 — pandas — networkx - python-igraph - leidenalg - python-louvain - python.app (!!only for OSX!!) - scikit-learn prefix: /Users/your_username/anaconda3/envs/giotto_env
If you see this error on your MacOS:
You can install another clang and point R to use that clang, which supports the -fopenmp paramter. This solution was provided on stackoverflow
# comment out first line 'CC= ... if there are errors with compiling a package CC=/usr/local/opt/llvm/bin/clang -fopenmp CXX=/usr/local/opt/llvm/bin/clang++ # Also potentially CXX11 (for C++11 compiler) CXX11=/usr/local/opt/llvm/bin/clang++ # -O3 should be faster than -O2 (default) level optimisation .. CFLAGS=-g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe CXXFLAGS=-g -O3 -Wall -pedantic -std=c++11 -mtune=native -pipe LDFLAGS=-L/usr/local/opt/gettext/lib -L/usr/local/opt/llvm/lib -Wl,-rpath,/usr/local/opt/llvm/lib CPPFLAGS=-I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include
If you see this error on your MacOS, most likely with the macOS Mojave:
Error message: ld: warning: directory not found for option '-L/usr/local/gfortran/lib/gcc/x86_64-apple-darwin15/6.1.0' ld: warning: directory not found for option '-L/usr/local/gfortran/lib' ld: library not found for -lgfortran clang-9: error: linker command failed with exit code 1 (use -v to see invocation)
solution: Installing the latest version of gofortran. https://github.com/fxcoudert/gfortran-for-macOS/releases/download/8.2/gfortran-8.2-Mojave.dmg
Reference: https://stackoverflow.com/questions/35999874/mac-os-x-r-error-ld-warning-directory-not-found-for-option “I am having Mac OS Catalina and in my case installation of Homebrew, the newest gcc and Gfortran 8.2.0 solved the issue.” – Magda Orzechowska “This worked for me in Mac OS Catalina as well! I used the gfortran 8.2 Mojave installation github.com/fxcoudert/gfortran-for-macOS/releases” – Danny
If you use the latest MacOS ‘Catalina’ and the latest R version 3.6.3 then you need to install Clang 7.0.0 and GNU Fortran 6.1 as per instructions.
Additionally, you might have to specify some flags in “~/.R/Makevars”
# clang: start CFLAGS=-isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk CCFLAGS=-isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk CXXFLAGS=-isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk CPPFLAGS=-isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk # clang: end
We hope that these issues will be resolved soon.
If you encounter this error:
Install the necessary package development tools.
If you encounter this or similar error:
## avoid converting warnings to errors by setting this environment variable to true (from within R) Sys.setenv("R_REMOTES_NO_ERRORS_FROM_WARNINGS"=TRUE) library(devtools) # if not installed do install.package('devtools') library(remotes) # if not installed do install.package('remotes') remotes::install_github("RubD/Giotto", build_vignettes = F)