[R-SIG-Mac] Installation of RPostgreSQL fails : no acceptable C compiler found in $PATH

Prof Brian Ripley ripley at stats.ox.ac.uk
Wed Mar 24 10:56:09 CET 2010


On Wed, 10 Mar 2010, Christiaan Pauw wrote:

>
> Hi Everybody
>
> I use R2.9.2 on Mac OS X 10.5.2. I tried to install RPostgreSQL from
> source
> on CRAN via the package installer. Apparently the program cannot find
> my C
> compiler gcc  . Here is the output message
>
> trying URL '
> http://cran.za.r-project.org/src/contrib/RPostgreSQL_0.1-6.tar.gz'
> Content type 'application/x-gzip' length 141399 bytes (138 Kb)
> opened URL
> ==================================================
> downloaded 138 Kb
>
> * Installing *source* package ?RPostgreSQL? ...
> checking for gcc... no
> checking for cc... no
> checking for cl.exe... no
> configure: error: no acceptable C compiler found in $PATH
> See `config.log' for more details.
> ERROR: configuration failed for package ?RPostgreSQL?
> * Removing
> ?/Library/Frameworks/R.framework/Versions/2.9/Resources/library/
> RPostgreSQL?
>
> I an sure I have gcc-4.0 installed because I can type "gcc-4.0 --
> version" in
> the terminal and get
>
> i686-apple-darwin9-gcc-4.0.1 (GCC) 4.0.1 (Apple Inc. build 5465)
> Copyright (C) 2005 Free Software Foundation, Inc.
> This is free software; see the source for copying conditions.  There
> is NO
> warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR
> PURPOSE.
>
> How do I tell R where gcc is?

It is not R which is asking but RPostgreSQL, so you should take 
this up with the package maintainer (but see the posting guide).
(RPostgreSQL does not pick up the compiler from the R, as required in 
'Writing R Extensions'.)

But first, was R compiled with gcc-4.0?  R 2.9.2 is not current, and 
if you update your OS (10.5.8 is the latest), Xcode and R you may find 
this works.  (I do have

tystie% which gcc
/usr/bin/gcc

under an up-to-date 2.5.8 system, and R 2.10.1 was compiled with 
gcc-4.2 according to

tystie% R CMD config CC
gcc-4.2 -arch i386 -std=gnu99
.)

The normal way to tell a configure script the version of the compiler 
is to set the environment variable CC.



>
> regards
> Christiaan
>
>
> Christiaan Pauw
> Tel   +27 44 6950 749
> Mob +27 82 557 4328
> www.nova.org.za
>
>
>
>
>
>
> 	[[alternative HTML version deleted]]
>
>

-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595



More information about the R-SIG-Mac mailing list