Skip to content

Instantly share code, notes, and snippets.

@dereckmezquita
Last active April 8, 2023 17:52
Show Gist options
  • Save dereckmezquita/ed860601138a46cf591a1bdcc95db0a2 to your computer and use it in GitHub Desktop.
Save dereckmezquita/ed860601138a46cf591a1bdcc95db0a2 to your computer and use it in GitHub Desktop.
Makevars and instructions for installing installing data.table on an M1 Mac; note config also works for installing slam/syuzhet.
# if you downloaded llvm manually above, replace with your chosen NEW_PATH/clang
LLVM_LOC = /opt/homebrew/opt/llvm
CC=$(LLVM_LOC)/bin/clang -fopenmp
CXX=$(LLVM_LOC)/bin/clang++ -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/opt/homebrew/opt/gettext/lib -L$(LLVM_LOC)/lib -Wl,-rpath,$(LLVM_LOC)/lib
CPPFLAGS=-I/opt/homebrew/opt/gettext/include -I$(LLVM_LOC)/include
@dereckmezquita
Copy link
Author

RStudio troubleshooting

If you have trouble running RStudio, installed by one user launched from another user on the same machine. Your permissions and ownership might be broken. Try first to re-install RStudio. If this doesn't work the run:

sudo chown -R root RStudio.app
sudo chmod -R 0755 RStudio.app

@gregmacfarlane
Copy link

As a note, this worked for me after being failed by the data.table instructions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment