[R-SIG-Mac] compiling packages from source fails

wouter.buytaert at scarlet.be wouter.buytaert at scarlet.be
Thu Sep 6 12:43:37 CEST 2007

Hi list,

I just upgraded to R 2.5.1 (OSX 10.4.10) and tried to reinstall some packages 
from source. But the compilation fails because -I/usr/include is not passed to 
the compiler and it can't find the header files. Any ideas how to solve 
this? (gcc works fine in other circumstances - I tried several packages 
with the same problem).


the output:

macbook:~/Desktop wouter$ sudo R CMD install gstat_0.9-39.tar.gz
* Installing to library '/Library/Frameworks/R.framework/Resources/library'
* Installing *source* package 'gstat' ...
creating cache ./config.cache
checking for gcc... gcc
checking whether the C compiler (gcc  ) works... yes
creating src/config.h
creating src/machine.h
** libs
** arch - i386
gcc-4.0 -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -no-cpp-precomp 
-I/Library/Frameworks/R.framework/Resources/include/i386  -msse3 
-D__NO_MATH_INLINES  -fPIC  -g -O2 -std=gnu99 -march=nocona -c block.c -o 
block.c:30:19: error: stdio.h: No such file or directory
block.c:31:18: error: math.h: No such file or directory
In file included from block.c:34:

More information about the R-SIG-Mac mailing list