From ripley at stats.ox.ac.uk  Fri Jan 20 08:23:35 2006
From: ripley at stats.ox.ac.uk (Prof Brian Ripley)
Date: Fri, 20 Jan 2006 07:23:35 +0000 (GMT)
Subject: [Rd] R CMD check, NAMESPACE, import: bad error?
In-Reply-To: <17360.27502.365586.740869@bossiaea.maths.uwa.edu.au>
References: <m24q3zbu0z.fsf@fhcrc.org>
	<17360.27502.365586.740869@bossiaea.maths.uwa.edu.au>
Message-ID: <Pine.LNX.4.61.0601200719490.25948@gannet.stats>

We do recommend you try INSTALLing and loading the package before R CMD 
check.  The most common problem I have found is that the DSO/DLL cannot be 
loaded, and there loading will give a more extensive error message.

On Fri, 20 Jan 2006, Berwin A Turlach wrote:

> G'day Seth,
>
>>>>>> "SF" == Seth Falcon <sfalcon at fhcrc.org> writes:
>
>    SF> I'm seeing errors with R CMD check that I don't understand
>    SF> when checking a package that uses a NAMESPACE file with an
>    SF> import directive.
> I came sometime ago across a similar problem and it took me some time
> to figure it out.  In my case it was that a .Fortran() call didn't
> have a "package=" argument.  My advise would be to check all .C() and
> .Fortran() calls in your package and add the "package=" argument if it
> is missing.

(It had better be PACKAGE= !)

> I also guess that if you temporarily remove the NAMESPACE file, the
> following step in the checking process:
>
>      * checking foreign function calls ... WARNING
>      Error: package/namespace load failed for 'DNAhelperseth'
>      Call sequence:
>      2: stop(gettextf("package/namespace load failed for '%s'", libraryPkgName(package)),        call. = FALSE, domain = NA)
>      1: library(package, lib.loc = lib.loc, character.only = TRUE, verbose = FALSE)
>      Execution halted
>      See section 'System and foreign language interfaces' of the 'Writing R
>      Extensions' manual.
>
> will tell you which call the culprit is.
>
> Cheers,
>
>        Berwin
>
> ______________________________________________
> 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



[Rd] R CMD check, NAMESPACE, import: bad error?
Prof Brian Ripley