Skip to content

[Rcpp-devel] Check error: undefined symbol

4 messages · Johannes Signer, Qiang Kou, Dirk Eddelbuettel

#
Dear Rcpp-Developers,

I have an R-package with some Rcpp code. If I build and install the 
package (`devtools::build()` and `devtools::install()`) everything works 
fine.

But, when I check the package for CRAN submission (`devtools::check()`), 
I keep getting the following error:

** testing if installed package can be loaded
Error: package or namespace load failed for ?amt? in dyn.load(file, 
DLLpath = DLLpath, ...):
  unable to load shared object '/tmp/RtmpLvrxAO/amt.Rcheck/amt/libs/amt.so':
   /tmp/RtmpLvrxAO/amt.Rcheck/amt/libs/amt.so: undefined symbol: 
_Z11within_rcppN4Rcpp6VectorILi14ENS_15PreserveStorageEEEii
Error: loading failed
Execution halted
ERROR: loading failed

I thought it maybe has something to do with the function `within_rcpp`, 
but when I remove this function from the source, the next function 
occurs with the same error (only a different function name).

I would appreciate any hints about how to resolve this error, or where 
it comes from.

Many thanks,
Johannes
#
Please share your code.

KK
On 14 Jul 2017 12:31 a.m., "Johannes Signer" <jsigner at gwdg.de> wrote:

            
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/rcpp-devel/attachments/20170714/13e9cbcd/attachment.html>
#
On 14 July 2017 at 08:13, Qiang Kou wrote:
| Please share your code.

And to quote R Core and CRAN member Uwe Ligges from his keynote last week:

   If things don't work, use the command-line.
   Do not use devtools, do not use RStudio.

Writing R Extensions explains everything in great detail. If you fail with
other tools which make the process opaque, simplify and go to base tools.

Dirk
#
Thanks for your replies. After a few more hours of searching, I found 
the error.

I had the line

help/*

in my `.Rbuildignore`, which was the reason for the check error.

Best Johannes
On 14.07.2017 17:31, Dirk Eddelbuettel wrote: