Closed brockels closed 4 years ago
Used:
devtools::install_github(repo="knausb/vcfR")
and it installed just fine on my MacBook Pro. Do you have Xcode
installed? This does not appear to be an issue with Mac or R but instead is specific to your system.
@brockels If you are using Catalina, /usr/include is purged and protected by SIP, thus C fails to compile.
Make sure you have command line tools installed and updated (xcode-select --install
), then set the toolchain from the beginning with this tutorial on setting up the development toolchain for R4.0.0+, uninstall any devel toolchain you have first. You will also need to include on your new ~/.R/Makevars file the following
LOC = /usr/local/gfortran/
CC=$(LOC)/bin/gcc -fopenmp
CXX=$(LOC)/bin/g++ -fopenmp
# -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$(LOC)/lib -Wl,-rpath,$(LOC)/lib
CPPFLAGS=-I/usr/local/opt/gettext/include -I$(LOC)/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include
After that, if you get errors likeerror: no member named 'signbit' in the global namespace
, take a look at this post
Hi @soulsacross ,
Thank you for providing a detailed response with links to more information! I'm using macOS Catalina 10.15.6
and feel I'm seeing different things than you. I'm not using a Makevars file and am not finding compilers in the locations you appear to have specified.
Brians-MacBook-Pro-2:~ knausb$ ls ~/.R/Makevars
ls: /Users/knausb/.R/Makevars: No such file or directory
Brians-MacBook-Pro-2:~ knausb$ ls /usr/local/gfortran
ls: /usr/local/gfortran: No such file or directory
Brians-MacBook-Pro-2:~ knausb$ ls /bin/gcc
ls: /bin/gcc: No such file or directory
Brians-MacBook-Pro-2:~ knausb$ ls /bin/gcc++
ls: /bin/gcc++: No such file or directory
Yet vcfR
builds just fine on my system. I am concerned that your recommendations may be system specific (i.e., not portable). Perhaps users should make sure Xcode is installed first before trying your suggestions? Thank you!
Used