[R] error in R CMD build when editing c function in R package

Prof Brian Ripley ripley at stats.ox.ac.uk
Tue Jan 31 09:30:04 CET 2012


You are using Mac OS X without telling us!  See the appropriate FAQ at
http://cran.r-project.org/bin/macosx/RMacOSX-FAQ.html

And please post Mac-specific questions on R-sig-mac .

On 31/01/2012 06:21, moli wrote:
> I have modified a C function in the `phmm` package. Now I want to rebuild the
> package, but the following error occurred. How can I fix the error?
>
>
>      $ cd ~/Desktop/phmmw
>      $ R CMD build phmm
>      * checking for file ‘phmm/DESCRIPTION’ ... OK
>      * preparing ‘phmm’:
>      * checking DESCRIPTION meta-information ... OK
>      * cleaning src
>      * installing the package to re-build vignettes
>            -----------------------------------
>      * installing *source* package ‘phmm’ ...
>      ** libs
>      *** arch - x86_64
>      gcc-4.2 -arch x86_64 -std=gnu99
> -I/Library/Frameworks/R.framework/Resources/include
> -I/Library/Frameworks/R.framework/Resources/include/x86_64
> -I/usr/local/include    -fPIC  -g -O2 -c arms.c -o arms.o
>      make: gcc-4.2: No such file or directory
>      make: *** [arms.o] Error 1
>      ERROR: compilation failed for package ‘phmm’
>      * removing
> ‘/private/var/folders/r0/9qv15p6j59j6jtfq775k6j380000gn/T/RtmpIPgvDE/Rinst48317ea7/phmm’
>            -----------------------------------
>      ERROR: package installation failed


> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html

Please so.


-- 
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