fstpackage / fst

Lightning Fast Serialization of Data Frames for R
http://www.fstpackage.org/fst/
GNU Affero General Public License v3.0
619 stars 42 forks source link

mac os, apple M1 installation guide should be updated to include the paths of homebrew installed libomp when using xcode-select c++ compiler #265

Closed milanglacier closed 2 years ago

milanglacier commented 2 years ago

I'm using apple M1, macOS 12.1, I'm using xcode-select installed c++ compiler. Following the wiki's instruction, I brew installed libomp, add the makevars file's file, but cannot compile data.table because it says that I cannot find omp.h. After change the makevars file to include the path of openMP, it compiles successful: .R/Makevars:

CPPFLAGS += -Xclang -fopenmp -I /opt/homebrew/Cellar/libomp/14.0.0/include
LDFLAGS += -lomp -L /opt/homebrew/Cellar/libomp/14.0.0/lib

Besides, for those newbie, the wiki installation should be more clear that, to include multi-thread support, we must compile from source, just have libomp installed and makevars updated is not enough, we should then build from source.

milanglacier commented 2 years ago

Sorry, I think I should post it in data.table git repo, it is a mistake.