[Rd] C headers

Prof Brian Ripley ripley at stats.ox.ac.uk
Thu Feb 6 10:25:41 CET 2014


This is an R-sig-mac issue, so Cc:ed there.

I have seen this after an upgrade to Mavericks: you have a partial 
installation of the pre-Mavericks Xcode Command Line Tools after the 
upgrade (which removed some of it).

See the current R-admin manual for how to use the CRAN binary of R 3.0.2 
with Mavericks.  Or get R_patched from r.research.att.com, which will 
change the compiler specs for you.

On 06/02/2014 08:49, Adrian Dușa wrote:
> Dear list,
>
> Just upgraded to MacOS Mavericks, fresh install of R 3.0.2 and trying to
> install a previous version of my QCA package (the most recent one source
> file, which passed the R CMD check --as-cran with R 3.0.1)
>
> I seem to have some difficulties in the C code, apparently it doesn't find
> some headers (please see below):
>
> ============
> $ R CMD INSTALL --no-multiarch QCA.history/QCA_1.1-1.tar.gz
> * installing to library
> ‘/Library/Frameworks/R.framework/Versions/3.0/Resources/library’
> * installing *source* package ‘QCA’ ...
> ** libs
> llvm-gcc-4.2 -arch x86_64 -std=gnu99
> -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG
>   -I/usr/local/include    -fPIC  -mtune=core2 -g -O2  -c allSol.c -o allSol.o
> In file included from allSol.c:1:
> /Library/Frameworks/R.framework/Resources/include/R.h:28:20: error:
> stdlib.h: No such file or directory
> /Library/Frameworks/R.framework/Resources/include/R.h:29:73: error:
> stdio.h: No such file or directory
> In file included from
> /Library/Frameworks/R.framework/Resources/include/R.h:30,
>                   from allSol.c:1:
> /usr/llvm-gcc-4.2/bin/../lib/gcc/i686-apple-darwin11/4.2.1/include/limits.h:15:25:
> error: limits.h: No such file or directory
> In file included from allSol.c:1:
> /Library/Frameworks/R.framework/Resources/include/R.h:31:18: error: math.h:
> No such file or directory
> In file included from
> /Library/Frameworks/R.framework/Resources/include/R.h:44,
>                   from allSol.c:1:
> /Library/Frameworks/R.framework/Resources/include/R_ext/RS.h:26:47: error:
> string.h: No such file or directory
> In file included from allSol.c:2:
> /Library/Frameworks/R.framework/Resources/include/Rinternals.h:862: error:
> expected declaration specifiers or ‘...’ before ‘FILE’
> /Library/Frameworks/R.framework/Resources/include/Rinternals.h:865: error:
> expected declaration specifiers or ‘...’ before ‘FILE’
> allSol.c: In function ‘allSol’:
> allSol.c:62: warning: implicit declaration of function ‘div’
> allSol.c:62: error: request for member ‘quot’ in something not a structure
> or union
> allSol.c:62: error: request for member ‘rem’ in something not a structure
> or union
> allSol.c:213: error: request for member ‘quot’ in something not a structure
> or union
> allSol.c:213: error: request for member ‘rem’ in something not a structure
> or union
> allSol.c:279: error: request for member ‘quot’ in something not a structure
> or union
> allSol.c:279: error: request for member ‘rem’ in something not a structure
> or union
> make: *** [allSol.o] Error 1
> ERROR: compilation failed for package ‘QCA’
> * removing
> ‘/Library/Frameworks/R.framework/Versions/3.0/Resources/library/QCA’
> * restoring previous
> ‘/Library/Frameworks/R.framework/Versions/3.0/Resources/library/QCA’
> ============
>
> It doesn't find stdlib.h, stdio.h, limits.h, math.h, string.h (etc,
> basically all important ones).
>
> I have Xcode version 5.0.2 installed, do I need anything else installed in
> the system?
>
> Thank you,
> Adrian
>
>
>
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
>


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