[Rcpp-devel] Rcpp.package.skeleton(module=TRUE) fails to load
Dirk Eddelbuettel
edd at debian.org
Wed Aug 15 16:32:51 CEST 2012
On 15 August 2012 at 14:56, Florian Oswald wrote:
| I tried out your RcppBDT package and I could build it without any
| problem, and it works in R. It's quite strange. I've used Rcpp many
| times before without problem, most of the time with inline tough. I'm
| using the apple default compiler llvm-g++-4.2.
|
| Thanks for any other suggestions. I'll try to reverse engineer RcppBDT
| and see how far I get.
Weird. I spent quite some time in March/April going over Rcpp modules and
the loading code as John had made changes -- we were then forced to wait for
R 2.15.1 to come out to use them.
The Rcpp modules vignette is mostly right. There are sort of two ways to do
it, and you have to follow things closely. But that is what the skeleton
does so I am unsure what goes haywire here.
Maybe someone else with an OS X box and R 2.15.1 can help?
Dirk
| Florian
|
| On 15 August 2012 14:14, Dirk Eddelbuettel <edd at debian.org> wrote:
| >
| > Florian,
| >
| > I cannot reproduce that on Linux -- just did a quick test from the
| > command-line:
| >
| > edd at max:~$ cd /tmp/
| > edd at max:/tmp$ r -lRcpp -e'Rcpp.package.skeleton("mypack",module=TRUE)'
| >
| > Attaching package: ‘utils’
| >
| > The following object(s) are masked from ‘package:Rcpp’:
| >
| > .DollarNames, prompt
| >
| > Creating directories ...
| > Creating DESCRIPTION ...
| > Creating NAMESPACE ...
| > Creating Read-and-delete-me ...
| > Saving functions and data ...
| > Making help files ...
| > Done.
| > Further steps are described in './mypack/Read-and-delete-me'.
| >
| > Adding Rcpp settings
| > >> added RcppModules: yada
| > >> added Depends: Rcpp
| > >> added LinkingTo: Rcpp
| > >> added useDynLib directive to NAMESPACE
| > >> added Makevars file with Rcpp settings
| > >> added Makevars.win file with Rcpp settings
| > >> added example header file using Rcpp classes
| > >> added example src file using Rcpp classes
| > >> added example R file calling the C++ example
| > >> added Rd file for rcpp_hello_world
| > >> copied the example module file
| > edd at max:/tmp$ R CMD INSTALL mypack
| > * installing to library ‘/usr/local/lib/R/site-library’
| > * installing *source* package ‘mypack’ ...
| > ** libs
| > ccache g++-4.6 -I/usr/share/R/include -DNDEBUG -I"/usr/local/lib/R/site-library/Rcpp/include" -fpic -g0 -O3 -Wall -pipe -Wno-variadic-macros -pedantic -c Num.cpp -o Num.o
| > ccache g++-4.6 -I/usr/share/R/include -DNDEBUG -I"/usr/local/lib/R/site-library/Rcpp/include" -fpic -g0 -O3 -Wall -pipe -Wno-variadic-macros -pedantic -c rcpp_hello_world.cpp -o rcpp_hello_world.o
| > ccache g++-4.6 -I/usr/share/R/include -DNDEBUG -I"/usr/local/lib/R/site-library/Rcpp/include" -fpic -g0 -O3 -Wall -pipe -Wno-variadic-macros -pedantic -c rcpp_module.cpp -o rcpp_module.o
| > ccache g++-4.6 -I/usr/share/R/include -DNDEBUG -I"/usr/local/lib/R/site-library/Rcpp/include" -fpic -g0 -O3 -Wall -pipe -Wno-variadic-macros -pedantic -c stdVector.cpp -o stdVector.o
| > g++-4.6 -shared -o mypack.so Num.o rcpp_hello_world.o rcpp_module.o stdVector.o -L/usr/local/lib/R/site-library/Rcpp/lib -lRcpp -Wl,-rpath,/usr/local/lib/R/site-library/Rcpp/lib -L/usr/lib/R/lib -lR
| > installing to /usr/local/lib/R/site-library/mypack/libs
| > ** R
| > ** preparing package for lazy loading
| > ** help
| > Warning: /tmp/mypack/man/mypack-package.Rd:31: All text must be in a section
| > Warning: /tmp/mypack/man/mypack-package.Rd:32: All text must be in a section
| > *** installing help indices
| > ** building package indices
| > ** testing if installed package can be loaded
| >
| > * DONE (mypack)
| > edd at max:/tmp$ r -lmypack -e'cat("Hello, world\n")'
| > Hello, world
| > edd at max:/tmp$
| >
| > and dito in an R session I had open:
| >
| > R> library(mypack)
| > R> mypack::foo()
| > [1] 1
| > R>
| >
| > Also note that these package.skeleton tests are part of the normal unit
| > tests.
| >
| > With Romain taking it a little easier these days, there is no committed
| > developer access to OS X so I am afraid you (or someone else) will have to
| > debug this.
| >
| > One last thing: you could try my package RcppBDT and RcppCNPy which both use
| > Modules. They are pretty small, see if you can get them built and loaded.
| >
| > Dirk
| >
| > --
| > Dirk Eddelbuettel | edd at debian.org | http://dirk.eddelbuettel.com
--
Dirk Eddelbuettel | edd at debian.org | http://dirk.eddelbuettel.com
More information about the Rcpp-devel
mailing list