The behavior changed somewhere along the line. I think it is related to the version bump from 3.1 to 3.2, but it could have been earlier.

It used to be when I wanted to release a version of my package I would run:

INSTALL
check
build
INSTALL --build (on each of a Windows and Mac box).

to create source and binary tarballs.

I was never quite sure if I needed the check syntax or the INSTALL syntax for build. Somewhere along the line it stopped working. I'm not sure exactly when, because I was working around by creating the source tarball on the Windows box where I was using an environmental variable instead of the command line arg.

I suspect that what must have happened is that previously build did not try to recompile the package (or used my source directory where the binaries where already in place). Now it does, so it would probably be useful to add the --install-args switch.

        --Russell


On 07/30/2015 04:08 PM, Duncan Murdoch wrote:
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.



--
Russell Almond
Associate Professor, Measurement & Statistics
Educational Psychology and Learning Systems
1114 W. Call St.
Florida State University
Tallahassee, FL 32306
(850) 644-5203
ralm...@fsu.edu
http://ralmond.net/

______________________________________________
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel

Reply via email to