[R-SIG-Mac] Building R 4.0.2 from source via clang/xcode for MKL on macOS

rollin ro|||n|or@|| @end|ng |rom gm@||@com
Mon Sep 28 08:07:54 CEST 2020


I wanted to build R from source on macos (10.15.5) so I could include
Intel's MKL.  So I first looked at building R from source without MKL.

>From the installation doc, I modified config.site to have the following:

CC=clang
OBJC=$CC
FC=/usr/local/bin/gfortran
CXX=clang++


I then ran configuration via the command:

./configure -C --enable-R-shlib --enable-memory-profiling
--x-includes=/opt/X11/include --x-libraries=/opt/X11/lib
PKG_CONFIG_PATH=/opt/X11/lib/pkgconfig:/usr/local/lib/pkgconfig:/usr/lib/pkgconfig


And received the following information and error:

checking if bzip2 version >= 1.0.6... no
checking whether bzip2 support suffices... configure: error: bzip2 library
and headers are required


By looking at the log, I saw a compiler error due to an implicit function.
I then made the following change in config.site:

CFLAGS='-Wno-implicit-function-declaration -g -O2''


And configure now ran without errors.

However, when I looked at configuring to use MKL, I discovered that MKL on
macos does not support gnu fortran so, unless I purchase Intel's Fortran
compiler, it looks like I'm sol.

Has anyone built R with MKL on macos (10.15)?  In any event, I wanted to at
least note the issue and work around I encountered when building R on
macos with clang/xcode.

	[[alternative HTML version deleted]]



More information about the R-SIG-Mac mailing list