[Rd] specifying compiler path in configure

Mark Kimpel mwkimpel at gmail.com
Fri Aug 29 18:22:26 CEST 2008

After reading over the relevant sections of the manual more carefully,
I now see where the information is presented and I was able to get R
to compile with an alternate version of gcc. On thing, however,
remains unclear to me. If R is compiled with a non-default version of
a compiler, are subsequent add-on packages and updated automatically
directed to use the alternate or is it necessary to include this
information in 'install.packages' and 'update.packages'? If the
latter, then it is unclear to me how this is accomplished. Below is my
best attempt at putting this instruction into install.packages and it
failed to produce the intended result, with gcc-4.3 being used instead
of 4.2.

 install.packages("affxparser", repos=repos,configure.args =
c('CC=/usr/bin/gcc-4.2', 'CXX=/usr/bin/g++-4.2'))

Thanks, Mark

On Wed, Aug 27, 2008 at 4:38 PM, Prof Brian Ripley
<ripley at stats.ox.ac.uk> wrote:
> On Wed, 27 Aug 2008, Mark Kimpel wrote:
>> I'm having trouble building some packages while running Debian Lenny
>> (testing) and suspect that the issues are related to the default use
>> of gcc-4.3.
> You might want to compare your problems with the CRAN checks at
> http://cran.r-project.org/web/checks/check_summary.html
> as those are run with gcc 4.3.x on Debian testing.  From memory, the
> problems are confined to C++-(mis)using packages.
>> With Lenny, build-essentials depends on 4.3, so I'd like
>> to leave it installed but have also installed 4.2.1. How do I tell
>> ./configure the path to 4.2.1 ? I"m sure it's an option, but I don't
>> see it documented in the R-admin manual.
> From configure --help:
>  CC          C compiler command
>  CFLAGS      C compiler flags
> There are many examples of setting CC in the R-admin manual, and the first
> para of 'Essential Programs' seems to me to tell you that as well.
> --
> 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

Mark W. Kimpel MD ** Neuroinformatics ** Dept. of Psychiatry
Indiana University School of Medicine

15032 Hunter Court, Westfield, IN 46074

(317) 490-5129 Work, & Mobile & VoiceMail
(317) 663-0513 Home (no voice mail please)

More information about the R-devel mailing list