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 -- View this message in context: r.789695.n4.nabble.com/error-in-R-CMD-build-when-editing-c-function-in-R-package-tp4343619p4343619.html Sent from the R help mailing list archive at Nabble.com.
Prof Brian Ripley
2012-Jan-31 08:30 UTC
[R] error in R CMD build when editing c function in R package
You are using Mac OS X without telling us! See the appropriate FAQ at 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 R-project.org/posting-guide.htmlPlease so. -- Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, 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