Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[statet-users] Building rj package for StatET on MacOS Mojave

Thought I’d share the steps necessary to build rj from sources on Mojave.
It’s quite tricky for a non-developer.

RJ package is required to run R via the great StatET plugin for Eclipse.
Most complete IDE for R by far. Looking forward to the new release!


1. Install LLVM via homebrew (assuming you have home brew; If not, install it first)
brew install llvm

Make sure brew clang (/usr/local/opt/llvm/bin) comes before apple clang in the path.
Up to you if you want this permanent (added to .bash_profile) or just temporary.




2. Populate /usr/include folder with required headers - by default Apple does not create this folder

This assumes you already have MacOS command line tools. If not install that first.
sudo open /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg 

3. Set linker flags for LLVM and symlinks. Otherwise apple linker will likely be used.

Add to .bash_profile the lines 

export LDFLAGS=“-L/usr/local/opt/llvm/lib -Wl,-rpath,/usr/local/opt/llvm/lib"
export CPPFLAGS="-I/usr/local/opt/llvm/include -I/usr/local/opt/llvm/include/c++/v1/"
alias ld='ld.lld'
alias ls='ls -alh'



More resources:



Back to the top