[R] R CMD SHLIB gives error: bad value (generic) for -mtune= switch

Prof Brian Ripley ripley at stats.ox.ac.uk
Sun Nov 4 08:32:22 CET 2007


This is clearly a compiler configuration error, not an R error.  I note 
that you have c:\Rtools\MinGW\libexec\gcc\mingw32\3.4.5 in your path, 
which is *not* part of the instructions for R 2.6.0.  Please try again 
without it.

On Sat, 3 Nov 2007, McKay Curtis wrote:

> Hello,
>
> I am trying to compile C code using the R CMD SHLIB command.  I get this error:
>
>> R CMD SHLIB gibbs.c
> making gibbs.d from gibbs.c
> gibbs.c:0: error: bad value (generic) for -mtune= switch
> make: [gibbs.d] Error 1 (ignored)
> cat: gibbs.d: No such file or directory
> make: [makeMakedeps] Error 1 (ignored)
> gcc-sjlj  -std=gnu99  -IC:/PROGRA~1/R/R-26~1.0/include    -Wall -O3
> -c gibbs.c -o gibbs.o
> gibbs.c:1: error: bad value (generic) for -mtune= switch
> make: *** [gibbs.o] Error 1
>
>
> where gibbs.c contains
>
> #include <R.h>
> #include <Rmath.h>
> #include "gibbsiso.h"
>
> void gibbsiso(int *nmc){
>  Rprintf("Hello!");
>  }
>
> and gibbsiso.h contains
>
> void gibbsiso(int *);
>
>
> I have installed or am using the following
>
> * Rtools.exe 2.6.0
> * R version 2.6.0 (2007-10-03)
> * Windows Vista
> * Toshiba Laptop, Intel Centrino Duo, T2250 @1.73 GHz w/ 1GB of RAM
>
> My path variable is
> c:\Rtools\bin;c:\Rtools\perl\bin;c:\Rtools\MinGW\bin;c:\Rtools\MinGW\libexec\gcc\mingw32\3.4.5;C:\Program
> Files\MiKTeX 2.5\miktex\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Program
> Files\Common Files\Ulead Systems\MPEG;C:\Program
> Files\R\R-26~1.0;C:\Program Files\R\R-26~1.0\bin;C:\Program
> Files\gs\gs8.54\bin;
>
> I would appreciate any insight into this error.
>
> Thanks for your time!
> McKay Curtis
> (Stats grad student at NCSU)
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>

-- 
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-help mailing list