[R-pkg-devel] Build fails on Mavericks

Zhian Kamvar kamvarz at science.oregonstate.edu
Thu Nov 19 20:18:01 CET 2015


Might it be an issue with your Makevars file?

As far as I can tell, by default, OS X sets clang as the C compiler. If you installed gcc separately, then you have to tell R to use it in ~/.R/Makevars

Here's an example of my Makevars file so that I can run C code with openmp: https://gist.github.com/zkamvar/9a7c4b8251a0a662f214

Zhian

> On Nov 19, 2015, at 09:28 , Daniel Marcelino <dmarcelino at live.com> wrote:
> 
> Yes, I do use homebrew for installing almost everything.
> 
> I ended up solving the issue with $ brew link readline --forc
> e
> 
> Daniel
> 
> On Thu, Nov 19, 2015 at 2:37 PM, Rainer M Krug <Rainer at krugs.de> wrote:
>> Duncan Murdoch <murdoch.duncan at gmail.com> writes:
>> 
>>> On 19/11/2015 9:05 AM, Daniel Marcelino wrote:
>>>> Hi, I'm having this error when building C functions from a package:
>>>> 
>>>>  clang: error: no such file or directory: '/usr/local/lib/libreadline.a'
>>>> 
>>>> Apparently, it's a path issue caused by xcode/gfortran, but I couldn't figure out how to solve it.
>>>> "which gcc" points to "/usr/bin/gcc"
>>>> Does someone have any idea on how on this?
>>> 
>>> You didn't say what system you're on, but the message is coming from
>>> clang, not gcc, so it looks like OSX, and "which gcc" is irrelevant.
>>> If so, you probably want to ask on the R-sig-mac group.  If not, give
>>> more details.
>> 
>> Also: did you use the official R installer or installed it using homebrew?
>> 
>> The path looks very much like homebrew. If yes, try installing readline
>> From homebrew.
>> 
>> Cheers,
>> 
>> Rainer
>> 
>>> 
>>> Duncan Murdoch
>>> 
>>> ______________________________________________
>>> R-package-devel at r-project.org mailing list
>>> https://stat.ethz.ch/mailman/listinfo/r-package-devel
>> 
>> --
>> Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany)
>> 
>> Centre of Excellence for Invasion Biology
>> Stellenbosch University
>> South Africa
>> 
>> Tel :       +33 - (0)9 53 10 27 44
>> Cell:       +33 - (0)6 85 62 59 98
>> Fax :       +33 - (0)9 58 10 27 44
>> 
>> Fax (D):    +49 - (0)3 21 21 25 22 44
>> 
>> email:      Rainer at krugs.de
>> 
>> Skype:      RMkrug
>> 
>> PGP: 0x0F52F982
> 
> ______________________________________________
> R-package-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-package-devel



More information about the R-package-devel mailing list