0

Is it possible to change the Makevars file? I am told on the STAN forums that I need to do this to get Rccp to work as well. When I try to change it, I am locked out and it saves it as a different file name. How can I override this?

To be more specific:

I need to change the file from this:

  # 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 -I/usr/local/include

    SHLIB_CXXLDFLAGS+=-Wl,-rpath,${R_HOME}/lib ${R_HOME}/lib/libc++abi.1.dylib
    # clang: end

To this:

# 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 -I/usr/local/include

CXX14FLAGS=-isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk
CPPF14LAGS=-isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include

SHLIB_CXXLDFLAGS+=-Wl,-rpath,${R_HOME}/lib ${R_HOME}/lib/libc++abi.1.dylib

SHLIB_CXX14LDFLAGS+=-Wl,-rpath,${R_HOME}/lib ${R_HOME}/lib/libc++abi.1.dylib
# clang: end

When I open the file in text editor, I see this at the top:

enter image description here When I manually edit this, it will not save as the original file name and makes a duplicate with this:

enter image description here

wolfsatthedoor
  • 7,163
  • 18
  • 46
  • 90
  • It will depend on the security features of your unstated OS. – IRTFM Jan 31 '20 at 02:04
  • 1
    This is moving out of the territory of R, and into general Unix/command line skills (I assume you're on Mac OS). You'll want to do things like `ls -l ~/.R/Makevars` to check the file permissions, maybe `sudo nano ~/.R/Makevars` to edit it etc., all of this is a bit hard to address in a SO question. – Marius Jan 31 '20 at 02:11
  • @42- Hi, yes I am on a mac os. I will change the tagging – wolfsatthedoor Jan 31 '20 at 02:54
  • You need to tell us how experienced you are with Terminal command line operations. Can you show us the contents of the file? Where is it? What are the exact operations that you are attempting and the exact error messages? (don't ever remember an OS messages saying "you are locked out".) – IRTFM Jan 31 '20 at 03:30
  • Hi 42, I can use the terminal, I have sort of introductionary experience in that I can ssh into clusters, move files around and delete them, but I don't have sysadmin skills. – wolfsatthedoor Jan 31 '20 at 04:18
  • sudo command helped, thank you! – wolfsatthedoor Jan 31 '20 at 04:22
  • I was under the impression that the recommended (by Simon Urbanek) clang and fortran compilers were available here: https://cran.r-project.org//bin/macosx/tools – IRTFM Jan 31 '20 at 16:04

0 Answers0