[R-pkg-devel] R CMD build with configure-args

Duncan Murdoch murdoch.duncan at gmail.com
Thu Jul 30 22:08:10 CEST 2015


On 30/07/2015 2:53 PM, Russell Almond wrote:
> 
> I've got a package that uses C code to link R to a third-party library.
> 
> I've set up my configure script to take an argument --with-netica
> which passes the location of the library, header files, &c.
> 
> So I can install the package using:
> 
>    $ R CMD INSTALL RNetica
> --configure-args='--with-netica=/home/ralmond/software/Netica_API_504/'
> 
> and check the packge (build the manual) using:
> 
>    $ R CMD check RNetica
> --install-args="--configure-args='--with-netica=/home/ralmond/software/Netica_API_504/'"
> 
> My problem comes when I want to build a source tarball for
> distribution.  I used to use:
> 
>    $ R CMD build RNetica
> --install-args="--configure-args='--with-netica=/home/ralmond/software/Netica_API_504/'"

When you say "used to use", when was that?  There was no --install-args
option in R 3.0.  I think there should be, and I can add it, but I'd
like to know if it was removed for a reason.

Duncan Murdoch

> 
> but that generates an error:
> 
>    gcc -std=gnu99 -I/usr/share/R/include -DNDEBUG     -I. -I/src -fpic
> -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat
> -Werror=format-security -D_FORTIFY_SOURCE=2 -g  -c Cases.c -o Cases.o
>    In file included from Cases.c:18:0:
>    ./RNetica.h:4:20: fatal error: Netica.h: No such file or directory
>     #include <Netica.h>
>                        ^
> 
> basically, it the Includes directory is not getting set correctly.  If
> I use the same syntax as the INSTALL (i.e., just configure-args and
> not the install-args wrapper) I get the same error message.  R CMD
> INSTALL --build creates a binary tarball and not a source.
> 
> I think used to work correctly under R 3.1.  Did I miss something in
> the release notes?
> 
> I'm having this problem under Ubuntu 14.4 (I think I'm also having the
> problem on Mac OS X; I'm not having the problem under Windows, but
> mostly because I'm using an environmental variable instead of a
> command line argument to pass the location of the 3rd party library.)
> 
> Thanks in advance for any help.
>



More information about the R-package-devel mailing list