Open JDMcIninch opened 3 years ago
Hey!
You can run this into your Makevars file =
HOMEBREW_LOC=/usr/local LLVM_LOC=$(HOMEBREW_LOC)/opt/llvm CC=$(LLVM_LOC)/bin/clang -fopenmp CXX=$(LLVM_LOC)/bin/clang++ -fopenmp CFLAGS=-g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe CXXFLAGS=-g -O3 -Wall -pedantic -std=c++11 -mtune=native -pipe LDFLAGS=-L$(HOMEBREW_LOC)/opt/gettext/lib -L$(LLVM_LOC)/lib -Wl,-rpath,$(LLVM_LOC)/lib CPPFLAGS=-I$(HOMEBREW_LOC)/opt/gettext/include -I$(LLVM_LOC)/include
You need to run this lines as well in your terminal (install packages):
brew install libopenmp
brew install libopenmpt
brew install --cask openmtp
brew install gcc
brew install llvm
Check please that you set your paths correctly:
export PATH=/opt/homebrew/bin:$PATH
export LDFLAGS="-L/opt/homebrew/opt/llvm/lib"
export CPPFLAGS="-I/opt/homebrew/opt/llvm/include"
With this, you are ready to go!
I'm attempting to compile data.table from source to use with R 4.1.2 on macOS 15.6 using the Homebrew LLVM toolchain. The code appropriately finds the OpenMP support and compiles, but the package fails at the testing stage with an error complaining about class ITime being an undefined export Any ideas?
Older versions of data.table will not compile do to an issue with the definition of the macro "match" in the R headers and the usage in the OpenMP code. I haven't really explored that.
Compilation:
Session info:
Makevars file: