[R-SIG-Mac] Apple Silicon aka M1 Macs

Jeroen Ooms jeroenoom@ @end|ng |rom gm@||@com
Thu Dec 24 22:50:19 CET 2020


On Thu, Dec 24, 2020 at 7:32 PM Denis-Alexander Engemann
<denis.engemann using gmail.com> wrote:
>
> Hi everyone,
>
> I'm finally joining the party here and so far made good progress
> following Taras' instructions.
>
> Disclaimer - I'm new to working with R sources.
> But would be very happy to help with testing and reporting to
> accelerate support native M1 builds.
>
> I am using the R-4.0.3 sources with the latest gfortran release from
> François-Xavier Coudert:
> https://github.com/fxcoudert/gfortran-for-macOS/releases/tag/11-arm-alpha2
>
> Currently I'm facing some issues at step 5.
> It seems that for some reasons liblzma cannot be found although it is
> well installed via xz at step 3.
> I also verified that the liblzma can be easily discovered along the lines of 3.
>
> The lines before ./configure stops are:
>
> ```
> checking lzma.h usability... no
> checking lzma.h presence... no
> checking for lzma.h... no
> configure: error: "liblzma library and headers are required"
> ```
>
> As mentioned, all is well installed in the include and lib directories at:
> /opt/homebrew/Cellar/xz/5.2.5
>
> Would you have a suggestion where I should link the headers/library to
> be picked up by ./configure ?

Homebrew now has an arm64 binary for R:
https://github.com/homebrew/homebrew-core/blob/master/Formula/r.rb .
Hence you can simply use: brew install r

To tweak the build, use "brew edit r", save your changes, and then:
brew install r --build-from-source



More information about the R-SIG-Mac mailing list