[R-SIG-Mac] Fwd: Compiling R-3.1.1 sources under OS X Yosemite

Amos B. Elberg amos.elberg at gmail.com
Tue Oct 28 09:32:34 CET 2014


It looks like you're trying to use Xcode plus the old gfortran to compile it. I've compiled it successfully with gcc 4.9 and llvm 3.5, installed by the homebrew package manager. If you want to use one of those compilers, I can give you configure scripts that will work.

(Also you should change -framework vecLib to -framework Accelerate in Yosemite)


> On Oct 28, 2014, at 4:24 AM, Qiong Cai <qiong.cai at gmail.com> wrote:
> 
> Hi,
> 
> Has anyone successfully compiled R-3.1.1 sources under OS X Yosemite?  If
> so, could you please pass me the right configure options? I got the
> following error when I tried to build it.  Is something wrong with my
> gfortran compiler?
> 
> thanks
> Qiong
> 
>> gcc --version
> Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr
> --with-gxx-include-dir=/usr/include/c++/4.2.1
> Apple LLVM version 6.0 (clang-600.0.54) (based on LLVM 3.5svn)
> Target: x86_64-apple-darwin14.0.0
> Thread model: posix
> 
>> gfortran --version
> gfortran: warning: couldn’t understand kern.osversion ‘14.0.0
> GNU Fortran (GCC) 4.9.1
> Copyright (C) 2014 Free Software Foundation, Inc.
> 
>> ./configure SHELL='/bin/bash' r_arch=x86_64 CC="gcc -arch x86_64
> -std=gnu99" CXX="g++ -arch x86_64" OBJC="gcc -arc x86_64" F77="gfortran
> -arch x86_64" FC="gfortran -arch x86_64" --with-system-zlib
> --with-blas='-framework vecLib' --with-lapack
> 
> // ....
> 
> checking for gcc -arch x86_64 -std=gnu99 option to support OpenMP...
> unsupported
> 
> checking how to get verbose linking output from gfortran -arch x86_64...
> configure: WARNING: compilation failed
> 
> checking for Fortran 77 libraries of gfortran -arch x86_64... checking how
> to get verbose linking output from gcc -arch x86_64 -std=gnu99... -v
> 
> checking for C libraries of gcc -arch x86_64 -std=gnu99...
> -L/usr/local/lib -lSystem
> /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/6.0/lib/darwin/libclang_rt.osx.a
> 
> checking for dummy main to link with Fortran 77 libraries... none
> 
> checking for Fortran 77 name-mangling scheme... configure: error: in
> `/Users/qiongcai/Codes/r-projects/R-3.1.1':
> 
> configure: error: cannot compile a simple Fortran program
> 
>    [[alternative HTML version deleted]]
> 
> _______________________________________________
> R-SIG-Mac mailing list
> R-SIG-Mac at r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-mac



More information about the R-SIG-Mac mailing list