Discussion:
[Rcpp-devel] Check error: undefined symbol
Johannes Signer
2017-07-14 07:31:13 UTC
Permalink
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
Qiang Kou
2017-07-14 15:13:32 UTC
Permalink
Please share your code.

KK
Post by Johannes Signer
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
** testing if installed package can be loaded
Error: package or namespace load failed for ‘amt’ in dyn.load(file,
unable to load shared object '/tmp/RtmpLvrxAO/amt.Rcheck/am
_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
_______________________________________________
Rcpp-devel mailing list
https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel
Dirk Eddelbuettel
2017-07-14 15:31:23 UTC
Permalink
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
--
http://dirk.eddelbuettel.com | @eddelbuettel | ***@debian.org
Johannes Signer
2017-07-14 19:01:11 UTC
Permalink
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
Post by Dirk Eddelbuettel
| Please share your code.
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
Loading...