[R-SIG-Mac] External header files not found

cstrato cstrato at aon.at
Sun Apr 21 15:10:01 CEST 2013


Dear Kasper,

Thank you for this suggestion, although I must admit that I do not quite 
understand how to use PKG_CPPFLAGS (eve after looking at 'Writing R 
Extensions').
Nevertheless, I found an earlier reply from you at:
https://stat.ethz.ch/pipermail/r-devel/2007-March/045016.html
which did help me. I needed to modify my Makefile and not my config 
file. Now everything works.

Best regards,
Christian


On 4/21/13 3:54 AM, Kasper Daniel Hansen wrote:
> Most likely, the error is the following.  For each of the CFLAGS.
> CPPFLAGS etc you have package specific additional flags like PKG_CFLAGS.
> PKG_CPPFLAGS.  You should use those instead.
>
> Kasper
>
>
> On Fri, Apr 19, 2013 at 3:59 PM, cstrato <cstrato at aon.at
> <mailto:cstrato at aon.at>> wrote:
>
>     Dear All,
>
>     Currently I am testing whether my package xps can be compiled on the
>     Mac with clang, and indeed everything is fine.
>
>     However, when I create ~/.R/Makevars to set CC and CXX as described in:
>     http://cran.r-project.org/doc/__manuals/r-patched/R-admin.__html#OS-X-packages
>     <http://cran.r-project.org/doc/manuals/r-patched/R-admin.html#OS-X-packages>
>     then the header files of the external framework that I use are no
>     longer found.
>
>     Since my package depends on the external C++ framework, I had to
>     create my own 'configure.in <http://configure.in>' and 'Makefile'
>     which checks e.g. for the presence of the variable ROOTSYS
>     containing the path to the framework.
>
>     Trying to follow the example:
>     http://cran.r-project.org/doc/__manuals/r-patched/R-exts.html#__Configure-example
>     <http://cran.r-project.org/doc/manuals/r-patched/R-exts.html#Configure-example>
>     I added following lines to my configure.in <http://configure.in> file:
>
>     : ${R_HOME=`R RHOME`}
>     if test -z "${R_HOME}"; then
>         echo "could not determine R_HOME"
>         exit 1
>     fi
>     CC=`"${R_HOME}/bin/R" CMD config CC`
>     CFLAGS=`"${R_HOME}/bin/R" CMD config CFLAGS`
>     CPPFLAGS=`"${R_HOME}/bin/R" CMD config CPPFLAGS`
>     AC_LANG(C++)
>     AC_PROG_CPP
>     AC_PROG_CC
>
>     ROOT_CPPFLAGS="-I. -I${ROOTSYS}/include"
>     CPPFLAGS="${CPPFLAGS} ${ROOT_CPPFLAGS}"
>
>     However, this did not help, the header files are still not found.
>
>     Can someone tell me what I need to do so that the external header
>     files are found, or does ~/.R/Makevars overwrite everything?
>
>     Best regards,
>     Christian
>     _._._._._._._._._._._._._._._.___._._
>     C.h.r.i.s.t.i.a.n   S.t.r.a.t.o.w.a
>     V.i.e.n.n.a           A.u.s.t.r.i.a
>     e.m.a.i.l:        cstrato at aon.at <http://aon.at>
>     _._._._._._._._._._._._._._._.___._._
>
>     _________________________________________________
>     R-SIG-Mac mailing list
>     R-SIG-Mac at r-project.org <mailto:R-SIG-Mac at r-project.org>
>     https://stat.ethz.ch/mailman/__listinfo/r-sig-mac
>     <https://stat.ethz.ch/mailman/listinfo/r-sig-mac>
>
>



More information about the R-SIG-Mac mailing list